Compare commits

...

2 commits

Author SHA1 Message Date
Simon Brodtmann
4e3f6cedde Integrate deep miner code into this mod 2025-12-14 10:51:45 +01:00
Simon Brodtmann
141aa9a124 Add Ko-fi to readme 2025-12-14 10:51:41 +01:00
2 changed files with 181 additions and 42 deletions

View file

@ -1,4 +1,4 @@
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/ufvFUJtVwk)[![Forgejo](https://img.shields.io/badge/source%20code-%23f4f4f5?style=for-the-badge&logo=forgejo&logoColor=%23c2410c)](https://git.cacklingfiend.info/cacklingfiend/lignumis)[![Downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fmods.factorio.com%2Fapi%2Fmods%2Flignumis&query=%24.downloads_count&suffix=%20Downloads&style=for-the-badge&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI%2FPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI%2BCjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iMTIxNnB0IiBoZWlnaHQ9IjEyODBwdCIgdmlld0JveD0iMCAwIDEyMTYgMTI4MCIKIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPgo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDEyODApIHNjYWxlKDAuMSwtMC4xKSIKZmlsbD0iI2ZmZmZmZiIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTM0NzAgOTYwMCBsMCAtMzIwMCAtMTczMSAwIGMtOTUyIDAgLTE3MjkgLTQgLTE3MjcgLTggNCAtMTIgNjA2MgotNjM5MCA2MDY4IC02MzkwIDYgMCA2MDY0IDYzNzggNjA2OCA2MzkwIDIgNCAtNzc1IDggLTE3MjcgOCBsLTE3MzEgMCAwIDMyMDAKMCAzMjAwIC0yNjEwIDAgLTI2MTAgMCAwIC0zMjAweiIvPgo8L2c%2BCjwvc3ZnPgo%3D&label=&labelColor=%23e39827&color=%23e39827)](https://mods.factorio.com/mod/lignumis/metrics?range=last_two_months&type=mod_downloads) [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/ufvFUJtVwk)[![Forgejo](https://img.shields.io/badge/source%20code-%23f4f4f5?style=for-the-badge&logo=forgejo&logoColor=%23c2410c)](https://git.cacklingfiend.info/cacklingfiend/lignumis)[![Downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fmods.factorio.com%2Fapi%2Fmods%2Flignumis&query=%24.downloads_count&suffix=%20Downloads&style=for-the-badge&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI%2FPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI%2BCjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iMTIxNnB0IiBoZWlnaHQ9IjEyODBwdCIgdmlld0JveD0iMCAwIDEyMTYgMTI4MCIKIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPgo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDEyODApIHNjYWxlKDAuMSwtMC4xKSIKZmlsbD0iI2ZmZmZmZiIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTM0NzAgOTYwMCBsMCAtMzIwMCAtMTczMSAwIGMtOTUyIDAgLTE3MjkgLTQgLTE3MjcgLTggNCAtMTIgNjA2MgotNjM5MCA2MDY4IC02MzkwIDYgMCA2MDY0IDYzNzggNjA2OCA2MzkwIDIgNCAtNzc1IDggLTE3MjcgOCBsLTE3MzEgMCAwIDMyMDAKMCAzMjAwIC0yNjEwIDAgLTI2MTAgMCAwIC0zMjAweiIvPgo8L2c%2BCjwvc3ZnPgo%3D&label=&labelColor=%23e39827&color=%23e39827)](https://mods.factorio.com/mod/lignumis/metrics?range=last_two_months&type=mod_downloads)[![Ko-fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/cacklingfiend)
_________________ _________________
![Lignumis poster](https://git.cacklingfiend.info/cacklingfiend/lignumis-assets/raw/branch/main/sources/readme/poster.jpg) ![Lignumis poster](https://git.cacklingfiend.info/cacklingfiend/lignumis-assets/raw/branch/main/sources/readme/poster.jpg)

View file

@ -1,44 +1,183 @@
local DeepMinerFactory = require(MF.buildings .. "CoreExtractor") local hit_effects = require("__base__.prototypes.entity.hit-effects")
local DeepMiner = DeepMinerFactory("deep-miner") local item_sounds = require("__base__.prototypes.item_sounds")
local sounds = require("__base__.prototypes.entity.sounds")
local Entity = require("__cf-lib__/data/Entity")
local entity = DeepMiner.EntityBuilder:new():build({ local gfx = Lignumis.graphics .. "entity/deep-miner/"
resource_searching_radius = 0.49, local techGfx = Lignumis.graphics .. "technology/"
energy_usage = "25MW", local name = "deep-miner"
mining_speed = 7.5,
energy_source = { local function animationLayer()
emissions_per_minute = { noise = 2000 } return {
priority = "high",
width = 704,
height = 704,
frame_count = 120,
lines_per_file = 8,
animation_speed = 0.3,
scale = 0.5,
stripes = {
{
filename = gfx .. "core-extractor-animation-1.png",
width_in_frames = 8,
height_in_frames = 8
},
{
filename = gfx .. "core-extractor-animation-2.png",
width_in_frames = 8,
height_in_frames = 7
}
}
}
end
data:extend({
{
type = "mining-drill",
name = name,
icon = gfx .. "core-extractor-icon.png",
flags = { "placeable-neutral", "player-creation" },
minable = { mining_time = 0.2, result = name },
fast_replaceable_group = name,
max_health = 500,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
collision_box = Entity.collisionBox(11, 11),
selection_box = Entity.selectionBox(11, 11),
damaged_trigger_effect = hit_effects.entity(),
drawing_box_vertical_extension = 1.3,
module_slots = 4,
icon_draw_specification = { scale = 2, shift = { 0, -0.3 } },
icons_positioning = {
{ inventory_index = defines.inventory.assembling_machine_modules, shift = { 0, 1.25 } }
},
allowed_effects = { "consumption", "speed", "pollution", "quality", "productivity" },
mining_speed = 7.5,
resource_categories = { "deep-mining" },
drops_full_belt_stacks = true,
resource_searching_radius = 0.49,
vector_to_place_result = { 0, -5.85 },
resource_drain_rate_percent = 75,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = { noise = 2000 }
},
energy_usage = "25MW",
perceived_performance = { minimum = 0.25, performance_to_activity_rate = 0.25, maximum = 2 },
graphics_set = {
animation = {
layers = {
{
filename = gfx .. "core-extractor-shadow.png",
priority = "high",
width = 1400,
height = 1400,
frame_count = 1,
line_length = 1,
repeat_count = 120,
animation_speed = 0.3,
draw_as_shadow = true,
scale = 0.5
},
animationLayer()
}
},
working_visualisations = {
{
fadeout = true,
animation = {
layers = {
animationLayer(),
{
priority = "high",
draw_as_glow = true,
blend_mode = "additive",
width = 704,
height = 704,
frame_count = 120,
lines_per_file = 8,
animation_speed = 0.3,
scale = 0.5,
stripes = {
{
filename = gfx .. "core-extractor-emission-1.png",
width_in_frames = 8,
height_in_frames = 8
},
{
filename = gfx .. "core-extractor-emission-2.png",
width_in_frames = 8,
height_in_frames = 7
}
}
}
}
}
}
}
},
open_sound = sounds.drill_open,
close_sound = sounds.drill_close,
working_sound = {
main_sounds = {
sound = { filename = "__space-age__/sound/entity/big-mining-drill/big-mining-drill-working-loop.ogg", volume = 0.3, audible_distance_modifier = 0.6 },
sound = { filename = "__space-age__/sound/entity/big-mining-drill/big-mining-drill-loop.ogg", volume = 0.4, audible_distance_modifier = 1 },
fade_in_ticks = 4,
fade_out_ticks = 30
},
sound_accents = {
{ sound = { filename = Lignumis.sound .. "entity/deep-miner/deep-miner-drop.ogg", volume = 2, audible_distance_modifier = 10 }, frame = 16 },
},
max_sounds_per_prototype = 4
}
}, },
resource_drain_rate_percent = 75 {
}) type = "item",
entity.resource_categories = { "deep-mining" } name = name,
data:extend({ entity }) icon = gfx .. "core-extractor-icon.png",
DeepMiner.ItemBuilder:new()
:itemsPerRocket(1)
:apply({
subgroup = "extraction-machine", subgroup = "extraction-machine",
order = "a[items]-d[deep-miner]" order = "a[items]-d[deep-miner]",
}) inventory_move_sound = item_sounds.mechanical_large_inventory_move,
pick_sound = item_sounds.mechanical_large_inventory_pickup,
DeepMiner.RecipeBuilder:new() drop_sound = item_sounds.mechanical_large_inventory_move,
:ingredients({ place_result = name,
{ type = "item", name = "processing-unit", amount = 100 }, stack_size = 20,
{ type = "item", name = "electric-engine-unit", amount = 100 }, default_import_location = "nauvis",
{ type = "item", name = "steel-plate", amount = 200 }, weight = 1000 * kg
{ type = "item", name = "concrete", amount = 50 } },
}) {
:apply({ type = "recipe",
category = "metallurgy-or-assembling" name = name,
}) category = "metallurgy-or-assembling",
enabled = false,
DeepMiner.TechnologyBuilder:new() ingredients = {
:prerequisites({ "space-science-pack" }) { type = "item", name = "processing-unit", amount = 100 },
:count(500) { type = "item", name = "electric-engine-unit", amount = 100 },
:ingredients({ { type = "item", name = "steel-plate", amount = 200 },
{ "automation-science-pack", 1 }, { type = "item", name = "concrete", amount = 50 }
{ "logistic-science-pack", 1 }, },
{ "chemical-science-pack", 1 }, energy_required = 60,
{ "space-science-pack", 1 } results = { { type = "item", name = name, amount = 1 } }
}) },
:time(60) {
:apply() type = "technology",
name = name,
icon = techGfx .. "core-extractor.png",
icon_size = 256,
effects = {
{ type = "unlock-recipe", recipe = name }
},
prerequisites = { "space-science-pack" },
unit = {
count = 500,
ingredients = {
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "space-science-pack", 1 }
},
time = 60
}
}
})