From b81de912733d1e64dbe72588893d3d58ac9b0fa2 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 6 Jan 2025 13:44:18 +0100 Subject: [PATCH 1/4] Refactoring --- lignumis/prototypes/content/data.lua | 1 + lignumis/prototypes/{ => content}/technology.lua | 0 2 files changed, 1 insertion(+) rename lignumis/prototypes/{ => content}/technology.lua (100%) diff --git a/lignumis/prototypes/content/data.lua b/lignumis/prototypes/content/data.lua index a8e2a31..e8ad506 100644 --- a/lignumis/prototypes/content/data.lua +++ b/lignumis/prototypes/content/data.lua @@ -1,3 +1,4 @@ +require("technology") require("lignumis/planet") require("lignumis/autoplace-controls") require("wooden-gearwheel") diff --git a/lignumis/prototypes/technology.lua b/lignumis/prototypes/content/technology.lua similarity index 100% rename from lignumis/prototypes/technology.lua rename to lignumis/prototypes/content/technology.lua From 72a9cf4a2d15962632658cd88b2a796e38f922e7 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 6 Jan 2025 13:44:44 +0100 Subject: [PATCH 2/4] Add cf-lib --- lignumis/data.lua | 3 ++- lignumis/info.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lignumis/data.lua b/lignumis/data.lua index e29792f..6620624 100644 --- a/lignumis/data.lua +++ b/lignumis/data.lua @@ -1,3 +1,4 @@ +require("__cf-lib__/util") + require("prototypes/content/data") require("prototypes/integrations/data") -require("prototypes/technology") \ No newline at end of file diff --git a/lignumis/info.json b/lignumis/info.json index a103429..fbbe646 100644 --- a/lignumis/info.json +++ b/lignumis/info.json @@ -9,6 +9,7 @@ "dependencies": [ "base", "space-age >= 2.0.0", + "cf-lib >= 0.0.1", "wood-military >= 2.0.0", "Wood-Walls >= 1.2.0", "wood-logistics >= 2.1.1", From dc2005ff88ec5711ab924d7d2cc856b15b2e3748 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 6 Jan 2025 15:29:06 +0100 Subject: [PATCH 3/4] Add wood fuel --- lignumis/data-updates.lua | 1 + lignumis/locale/en/strings.cfg | 3 +++ .../content/burner-long-handed-inserter.lua | 4 +-- lignumis/prototypes/content/data.lua | 1 + .../content/fuel-category-updates.lua | 27 +++++++++++++++++++ lignumis/prototypes/content/fuel-category.lua | 6 +++++ .../prototypes/content/gold/stromatolite.lua | 4 ++- lignumis/prototypes/content/updates.lua | 1 + lignumis/prototypes/integrations/vanilla.lua | 6 ++--- 9 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 lignumis/data-updates.lua create mode 100644 lignumis/prototypes/content/fuel-category-updates.lua create mode 100644 lignumis/prototypes/content/fuel-category.lua create mode 100644 lignumis/prototypes/content/updates.lua diff --git a/lignumis/data-updates.lua b/lignumis/data-updates.lua new file mode 100644 index 0000000..e3e118d --- /dev/null +++ b/lignumis/data-updates.lua @@ -0,0 +1 @@ +require("prototypes/content/updates") \ No newline at end of file diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 00de6ce..adc2fbd 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -81,5 +81,8 @@ basic-construction-robotics-copper=Basic construction robotics (copper) wood-floor=Wood floor natural-gold-soil=Gold-infused soil +[fuel-category-name] +wood=Wood fuel + [lignumis] start-new-game=Lignumis is meant to be played in a fresh game as it extends the early game before Nauvis. \ No newline at end of file diff --git a/lignumis/prototypes/content/burner-long-handed-inserter.lua b/lignumis/prototypes/content/burner-long-handed-inserter.lua index c777c18..4c3621b 100644 --- a/lignumis/prototypes/content/burner-long-handed-inserter.lua +++ b/lignumis/prototypes/content/burner-long-handed-inserter.lua @@ -18,8 +18,8 @@ long_handed_inserter.energy_source = { fuel_categories = { "chemical" }, effectivity = 1, fuel_inventory_size = 1, - initial_fuel = "wood", - initial_fuel_percent = 0.5, + initial_fuel = "coal", + initial_fuel_percent = 0.25, light_flicker = { color = { 0, 0, 0 } }, smoke = { { diff --git a/lignumis/prototypes/content/data.lua b/lignumis/prototypes/content/data.lua index e8ad506..d34dcc6 100644 --- a/lignumis/prototypes/content/data.lua +++ b/lignumis/prototypes/content/data.lua @@ -17,6 +17,7 @@ require("steam-science") require("wood-liquefaction") require("wooden-rocket-silo") require("basic-gun-turret") +require("fuel-category") require("basic-construction-robots") require("noise") diff --git a/lignumis/prototypes/content/fuel-category-updates.lua b/lignumis/prototypes/content/fuel-category-updates.lua new file mode 100644 index 0000000..34b3a5c --- /dev/null +++ b/lignumis/prototypes/content/fuel-category-updates.lua @@ -0,0 +1,27 @@ +local blacklist = { + --"burner-assembling-machine", + --"stone-furnace", + --"desiccation-furnace", + --"lumber-mill" +} + +function update_fuel_categories(t) + for _, entity in pairs(t) do + if entity.energy_source + and entity.energy_source.type == "burner" + and not table.contains(blacklist, entity.name) + and entity.energy_source.fuel_categories + and table.contains(entity.energy_source.fuel_categories, "chemical") + then + table.insert(entity.energy_source.fuel_categories, "wood") + end + end +end + +data.raw.item["wood"].fuel_category = "wood" +data.raw.item["lumber"].fuel_category = "wood" +data.raw.item["tree-seed"].fuel_category = "wood" +data.raw.item["wooden-wall"].fuel_category = "wood" + +-- Add more if incompatibilities arise +update_fuel_categories(data.raw["boiler"]) \ No newline at end of file diff --git a/lignumis/prototypes/content/fuel-category.lua b/lignumis/prototypes/content/fuel-category.lua new file mode 100644 index 0000000..99191c9 --- /dev/null +++ b/lignumis/prototypes/content/fuel-category.lua @@ -0,0 +1,6 @@ +data:extend({ + { + type = "fuel-category", + name = "wood" + } +}) \ No newline at end of file diff --git a/lignumis/prototypes/content/gold/stromatolite.lua b/lignumis/prototypes/content/gold/stromatolite.lua index 3d50035..753f5f3 100644 --- a/lignumis/prototypes/content/gold/stromatolite.lua +++ b/lignumis/prototypes/content/gold/stromatolite.lua @@ -184,7 +184,9 @@ local seed = { drop_sound = space_age_item_sounds.agriculture_inventory_move, stack_size = 10, default_import_location = "lignumis", - weight = 10 * kg + weight = 10 * kg, + fuel_category = "wood", + fuel_value = "100kJ" } local bacteria = { diff --git a/lignumis/prototypes/content/updates.lua b/lignumis/prototypes/content/updates.lua new file mode 100644 index 0000000..c6d2a3f --- /dev/null +++ b/lignumis/prototypes/content/updates.lua @@ -0,0 +1 @@ +require("fuel-category-updates") \ No newline at end of file diff --git a/lignumis/prototypes/integrations/vanilla.lua b/lignumis/prototypes/integrations/vanilla.lua index a7c43db..74036aa 100644 --- a/lignumis/prototypes/integrations/vanilla.lua +++ b/lignumis/prototypes/integrations/vanilla.lua @@ -29,6 +29,8 @@ burner_inserter.hand_base_picture.filename = "__lignumis__/graphics/entity/burne burner_inserter.hand_closed_picture.filename = "__lignumis__/graphics/entity/burner-inserter-hand-closed.png" burner_inserter.hand_open_picture.filename = "__lignumis__/graphics/entity/burner-inserter-hand-open.png" burner_inserter.platform_picture.sheet.filename = "__lignumis__/graphics/entity/burner-inserter-platform.png" +burner_inserter.energy_source.initial_fuel = "coal" +burner_inserter.energy_source.initial_fuel_percent = 0.15 data.raw.item["burner-inserter"].icon = "__lignumis__/graphics/icons/burner-inserter.png" @@ -44,10 +46,6 @@ local wood_processing = data.raw.recipe["wood-processing"] wood_processing.ingredients[1].amount = 1 wood_processing.icon = data.raw.item["tree-seed"].icon -local tree_seed = data.raw.item["tree-seed"] -tree_seed.fuel_category = nil -tree_seed.fuel_value = nil - for _, tree in pairs(data.raw.tree) do tree.minable.result = nil tree.minable.count = nil From cd3565832b1945f10de3950d743e1cda4b19d778 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 6 Jan 2025 15:29:11 +0100 Subject: [PATCH 4/4] Update readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e1c3002..78e9caf 100644 --- a/README.md +++ b/README.md @@ -77,4 +77,8 @@ Unsorted [daydev](https://mods.factorio.com/mod/EquipmentPlusPortableEngine) -- Portable engine \ No newline at end of file +- Portable engine + +[Zithorian's Extra Storage Tanks](https://mods.factorio.com/mod/zithorian-extra-storage-tanks) + +- Gold storage tank \ No newline at end of file