From ce33c2856f464aaf37def717fd99e291af08651c Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 20 Jan 2025 03:30:50 -0800 Subject: [PATCH] wooden industry kiln --- basic-foundry.lua | 13 +++++++------ changelog.txt | 2 ++ locale/en/zirconium.cfg | 2 ++ me.lua | 9 ++++++++- settings.lua | 12 ++++++++++++ zirconium-recipe-updates.lua | 6 +++++- 6 files changed, 36 insertions(+), 8 deletions(-) diff --git a/basic-foundry.lua b/basic-foundry.lua index 974308b..6d4bb11 100644 --- a/basic-foundry.lua +++ b/basic-foundry.lua @@ -5,7 +5,9 @@ local sounds = require("__base__.prototypes.entity.sounds") local hit_effects = require("__base__.prototypes.entity.hit-effects") if mods["space-age"] then -if not data.raw.item["basic-foundry"] then +util.add_new_crafting_category("basic-metallurgy") + +if util.me.basic_foundry() and not data.raw.item["basic-foundry"] then local graphics_set = require("__space-age__.prototypes.entity.foundry-pictures").graphics_set graphics_set.animation.layers[1].tint = {.6, .8, .8} data:extend({ @@ -140,10 +142,9 @@ data:extend({ results = {util.item("steel-plate", 1)}, }, }) -end -util.add_new_crafting_category("basic-metallurgy") -util.add_crafting_category("assembling-machine", "foundry", "basic-metallurgy") -util.add_unlock("advanced-material-processing-2", "steel-basic") util.add_unlock("advanced-material-processing-2", "basic-foundry") -util.add_prerequisite("nuclear-power", "advanced-material-processing-2") +util.add_unlock("advanced-material-processing-2", "steel-basic") +end +util.add_prerequisite("nuclear-power", "advanced-material-processing-2") +util.add_crafting_category("assembling-machine", "foundry", "basic-metallurgy") end diff --git a/changelog.txt b/changelog.txt index c01f331..49fb97e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,8 @@ Date: 2025-01-19 Most recipes made from lava now have a byproduct of both stone and zircon. So, recyclers are no longer required for full automation, but will help with balancing once available. LDS casting now requires zirconia. + - Space Age & Wooden Industry: With kilns available, basic foundry is disabled by default, but + there's an option to keep it available. --------------------------------------------------------------------------------------------------- Version: 2.0.3 Date: 2025-01-15 diff --git a/locale/en/zirconium.cfg b/locale/en/zirconium.cfg index a554e61..c7f6188 100644 --- a/locale/en/zirconium.cfg +++ b/locale/en/zirconium.cfg @@ -76,6 +76,7 @@ bzzirconium-enable-intermediates=Enable cermet bzzirconium-enable-sorting=Enable stone sorting bzzirconium-early=Early zircon bzzirconium-ammo=Enable magazine +bzzirconium-basic-foundry=Enable basic foundry [mod-setting-description] bzzirconium-recipe-bypass=Skip modifying these recipes (comma-separated list). @@ -84,3 +85,4 @@ bzzirconium-enable-intermediates=Enable cermet, an advanced intermediate made fr bzzirconium-enable-sorting=Enable "sorting" recipes to convert between zircon and stone. This is no longer as useful for burner phase as it used to be, but left as an option for certain map layouts or existing factories. bzzirconium-early=If [color=green]enabled[/color], zircon is required in small quantities early in the game.\nIf [color=orange]disabled[/color], zircon is not required until after logistic science. bzzirconium-ammo=If enabled, adds a new explosive ammunition magazine. +bzzirconium-basic-foundry=Defaults to enabled unless another suitable crafting machine is present (such as a Kiln from Wooden Industry). diff --git a/me.lua b/me.lua index c8588b9..e3da5d6 100644 --- a/me.lua +++ b/me.lua @@ -22,7 +22,6 @@ function me.ammo() -- return me.get_setting("bzzirconium-ammo") end - function me.use_cermet() if me.get_setting("bz-all-intermediates") then return true end return me.get_setting("bzzirconium-enable-intermediates") == "yes" @@ -32,6 +31,14 @@ function me.enable_sorting() return me.get_setting("bzzirconium-enable-sorting") end +function me.basic_foundry() + if me.get_setting("bzzirconium-basic-foundry") == nil then + return true + else + return me.get_setting("bzzirconium-basic-foundry") + end +end + function me.get_setting(name) if settings.startup[name] == nil then return nil diff --git a/settings.lua b/settings.lua index 383c640..d410de3 100644 --- a/settings.lua +++ b/settings.lua @@ -45,3 +45,15 @@ data:extend({ order = "m-a-a", } or nil, }) + +if mods["wood-industry"] then +data:extend({ + { + type = "bool-setting", + name = "bzzirconium-basic-foundry", + setting_type = "startup", + default_value = false, + order = "k-a-a", + }, +}) +end diff --git a/zirconium-recipe-updates.lua b/zirconium-recipe-updates.lua index e0d5123..6cd0450 100644 --- a/zirconium-recipe-updates.lua +++ b/zirconium-recipe-updates.lua @@ -15,7 +15,7 @@ end util.replace_ingredient("metallurgic-science-pack", "tungsten-plate", "zirconium-tungstate") util.add_ingredient("cryogenic-plant", "zirconium-tungstate", 20) -if mods["space-age"] and mods.bztin then +if mods["space-age"] and mods.bztin and util.me.basic_foundry() then util.copy_recipe("bronze-plate", "bronze-plate-basic") util.set_category("bronze-plate-basic", "basic-metallurgy") util.set_localised_name("bronze-plate-basic", {"item-name.bronze-plate"}) @@ -23,6 +23,10 @@ if mods["space-age"] and mods.bztin then util.multiply_ingredients("bronze-plate", 2) end +-- Wooden Industry kilns +util.add_crafting_category("assembling-machine", "brick-kiln", "basic-metallurgy") +util.add_crafting_category("assembling-machine", "electric-kiln", "basic-metallurgy") + if util.me.early() then util.replace_some_ingredient("stone-furnace", "stone", 1, "zircon", 1)