From e6e4fc610660359a9591162ebafdeee60eaf056b Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 22 Dec 2025 12:02:46 +0100 Subject: [PATCH] Add steam inserters --- lignumis/locale/en/strings.cfg | 2 + .../content/burner-long-handed-inserter.lua | 4 +- lignumis/prototypes/content/data.lua | 1 + .../prototypes/content/steam-inserters.lua | 107 ++++++++++++++++++ 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 lignumis/prototypes/content/steam-inserters.lua diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index e63f760..3b0d74c 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -22,6 +22,8 @@ peat=Peat burner-agricultural-tower=Burner agricultural tower burner-assembling-machine=Burner assembling machine burner-long-handed-inserter=Burner long handed inserter +steam-inserter=Steam inserter +steam-long-handed-inserter=Steam long handed inserter lumber-mill=Lumber mill gold-stromatolite=Gold stromatolite gold-stromatolite-plant=Gold stromatolite plant diff --git a/lignumis/prototypes/content/burner-long-handed-inserter.lua b/lignumis/prototypes/content/burner-long-handed-inserter.lua index b6dffcf..f3bc55e 100644 --- a/lignumis/prototypes/content/burner-long-handed-inserter.lua +++ b/lignumis/prototypes/content/burner-long-handed-inserter.lua @@ -58,7 +58,9 @@ data:extend({ pick_sound = item_sounds.inserter_inventory_pickup, drop_sound = item_sounds.inserter_inventory_move, place_result = "burner-long-handed-inserter", - stack_size = 50 + stack_size = 50, + weight = 20 * kg, + default_import_location = "lignumis" }, { type = "recipe", diff --git a/lignumis/prototypes/content/data.lua b/lignumis/prototypes/content/data.lua index 9dca318..f7a6d22 100644 --- a/lignumis/prototypes/content/data.lua +++ b/lignumis/prototypes/content/data.lua @@ -15,6 +15,7 @@ require("gold") require("deep-miner") require("desiccation-furnace") require("steam-assembling-machine") +require("steam-inserters") require("steam-science") require("wood-liquefaction") require("wooden-rocket-silo") diff --git a/lignumis/prototypes/content/steam-inserters.lua b/lignumis/prototypes/content/steam-inserters.lua new file mode 100644 index 0000000..f326156 --- /dev/null +++ b/lignumis/prototypes/content/steam-inserters.lua @@ -0,0 +1,107 @@ +require("__base__.prototypes.entity.pipecovers") +local item_sounds = require("__base__.prototypes.item_sounds") +local pipecovers = require("__lignumis__.prototypes.content.gold.pipecovers") +local machinepipes = require("__lignumis__.prototypes.content.gold.machinepipes") +local Technology = require("__cf-lib__/data/Technology") + +local inserter = table.deepcopy(data.raw["inserter"]["burner-inserter"]) +inserter.name = "steam-inserter" +inserter.icon = nil +inserter.icons = { + { icon = Lignumis.graphics .. "icons/burner-inserter.png", icon_size = 64 }, + { icon = "__base__/graphics/icons/fluid/steam.png", icon_size = 64, scale = 0.25, shift = { 8, -8 } }, +} +inserter.minable.result = "steam-inserter" +inserter.energy_source = { + type = "fluid", + maximum_temperature = 165, + scale_fluid_usage = true, + effectivity = 1, + fluid_box = { + filter = "steam", + pipe_covers = pipecovers(), + pipe_picture = machinepipes(), + volume = 50, + pipe_connections = { + { direction = defines.direction.north, position = { 0, 0 } }, + { direction = defines.direction.south, position = { 0, 0 } }, + { direction = defines.direction.west, position = { 0, 0 } }, + { direction = defines.direction.east, position = { 0, 0 } }, + }, + production_type = "input-output", + secondary_draw_orders = { north = -1 } + } +} +inserter.extension_speed = 0.035 +inserter.rotation_speed = 0.0135 + +local long_handed_inserter = table.deepcopy(data.raw["inserter"]["burner-long-handed-inserter"]) +long_handed_inserter.name = "steam-long-handed-inserter" +long_handed_inserter.icon = nil +long_handed_inserter.icons = { + { icon = Lignumis.graphics .. "icons/burner-long-handed-inserter.png" }, + { icon = "__base__/graphics/icons/fluid/steam.png", icon_size = 64, scale = 0.25, shift = { 8, -8 } } +} +long_handed_inserter.minable.result = "steam-long-handed-inserter" +long_handed_inserter.energy_source = inserter.energy_source +long_handed_inserter.extension_speed = 0.04 +long_handed_inserter.rotation_speed = 0.016 + +data:extend({ + inserter, + long_handed_inserter, + { + type = "item", + name = "steam-inserter", + icons = inserter.icons, + subgroup = "inserter", + order = "b1[steam-inserter]", + inventory_move_sound = item_sounds.inserter_inventory_move, + pick_sound = item_sounds.inserter_inventory_pickup, + drop_sound = item_sounds.inserter_inventory_move, + place_result = "steam-inserter", + stack_size = 50, + weight = 20 * kg, + default_import_location = "lignumis" + }, + { + type = "recipe", + name = "steam-inserter", + category = "crafting", + enabled = false, + ingredients = { + { type = "item", name = "gold-pipe", amount = 2 }, + { type = "item", name = "burner-inserter", amount = 1 } + }, + results = { { type = "item", name = "steam-inserter", amount = 1 } } + }, + { + type = "item", + name = "steam-long-handed-inserter", + icons = long_handed_inserter.icons, + subgroup = "inserter", + order = "b2[steam-long-handed-inserter]", + inventory_move_sound = item_sounds.inserter_inventory_move, + pick_sound = item_sounds.inserter_inventory_pickup, + drop_sound = item_sounds.inserter_inventory_move, + place_result = "steam-long-handed-inserter", + stack_size = 50, + weight = 20 * kg, + default_import_location = "lignumis" + }, + { + type = "recipe", + name = "steam-long-handed-inserter", + category = "crafting", + enabled = false, + ingredients = { + { type = "item", name = "gold-pipe", amount = 2 }, + { type = "item", name = "burner-long-handed-inserter", amount = 1 } + }, + results = { { type = "item", name = "steam-long-handed-inserter", amount = 1 } } + } +}) + +Technology:new("steam-automation") + :addRecipe("steam-inserter") + :addRecipe("steam-long-handed-inserter") \ No newline at end of file