From 126ac39dfabbb52b139f2cc337f1bf3ed055716f Mon Sep 17 00:00:00 2001 From: Brevven Date: Tue, 2 Aug 2022 18:56:31 -0700 Subject: [PATCH] handcrafting --- changelog.txt | 5 +++++ data-final-fixes.lua | 21 +++++---------------- info.json | 2 +- locale/en/gas.cfg | 2 ++ me.lua | 5 +++++ settings.lua | 6 ++++++ 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/changelog.txt b/changelog.txt index 9bf08f5..a462ff5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.0.13 +Date: 2022-08-02 + Features: + - Add a setting to enable a handcrafting-only electronic circuit recipe +--------------------------------------------------------------------------------------------------- Version: 0.0.12 Date: 2022-08-01 Changes: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 73d5de4..30c9504 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -9,23 +9,8 @@ local util = require("data-util"); util.add_to_product("se-core-fragment-omni", "gas", -56) --- Electronic circuits need final fixes -if data.raw.recipe["electronic-circuit-stone"] then - util.set_hidden("electronic-circuit-stone") - util.replace_ingredient("electronic-circuit-stone", "stone-tablet", "bakelite") - util.remove_recipe_effect("electronics", "electronic-circuit-stone") - util.set_hidden("electronic-circuit-stone") -end - --- electronic circuits should each require one bakelite -local amt = util.get_amount("electronic-circuit") -util.remove_ingredient("electronic-circuit", "wood") -util.remove_ingredient("electronic-circuit", "iron-plate") -util.remove_ingredient("electronic-circuit", "stone-tablet") -util.add_ingredient("electronic-circuit", "bakelite", amt) -util.set_icons("electronic-circuit", nil) - -- Vanilla burner phase tweaks -- green circuits after electronics +-- Electronic circuit recipe set below in compatibility script if not mods.Krastorio2 and not mods["aai-industry"] and not mods.bzaluminum and not mods.bzcarbon then util.replace_ingredient("offshore-pump", "electronic-circuit", "copper-cable") util.replace_ingredient("lab", "electronic-circuit", "copper-cable") @@ -49,5 +34,9 @@ if not mods.Krastorio2 and not mods["aai-industry"] and not mods.bzaluminum and end util.remove_ingredient("small-lamp", "blank-circuit") -- mod mash + +-- Should come as late as possible, doesn't need to be last +require("compatibility/electronic-circuit") + -- Must be last util.create_list() diff --git a/info.json b/info.json index b145a58..e3dee30 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzgas", - "version": "0.0.12", + "version": "0.0.13", "factorio_version": "1.1", "title": "Natural Gas", "author": "Brevven", diff --git a/locale/en/gas.cfg b/locale/en/gas.cfg index 2e65617..d7142fc 100644 --- a/locale/en/gas.cfg +++ b/locale/en/gas.cfg @@ -41,12 +41,14 @@ gas-reforming=Steam-methane reforming & water-gas shift bzgas-recipe-bypass=Bypass recipes bzgas-list=Make a list of modified recipes bzgas-more-intermediates=Enable more intermediates +bzgas-handcraft=Add hand-craft circuit recipe bzgas-boiler=Enable ElAdamo's fluid boiler [mod-setting-description] bzgas-recipe-bypass=Skip modifying these recipes (comma-separated list). bzgas-list=If enabled, the text command [color=orange]BZList[/color] will dump a file to the script-output directory with a full list of recipes modified.\nRecommended to turn this off after you are done configuring your other settings. bzgas-boiler=Natural gas mod currnelty can incorporate ElAdamo's public domain fluid boiler. If that mod is updated to 1.1, this may be removed. +bzgas-handcraft=This enables an alternative wood-based handcrafting-only recipe for electronic circuits. Defaults to off, as bakelite only takes a few steps to make, but provided to enable varying playstyles. [string-mod-setting] bzgas-more-intermediates-no=No diff --git a/me.lua b/me.lua index 2c486d5..6182b20 100644 --- a/me.lua +++ b/me.lua @@ -7,6 +7,11 @@ function me.finite() -- Krastorio 2 return me.get_setting("kr-finite-oil") end +function me.handcraft() + return me.get_setting("bzgas-handcraft") +end + + function me.use_boiler() return me.get_setting("bzgas-boiler") end diff --git a/settings.lua b/settings.lua index c36e9ae..d998bee 100644 --- a/settings.lua +++ b/settings.lua @@ -20,6 +20,12 @@ data:extend({ default_value = "phenol", allowed_values = {"phenol", "no"}, }, + { + type = "bool-setting", + name = "bzgas-handcraft", + setting_type = "startup", + default_value = false, + }, { type = "bool-setting", name = "bzgas-boiler",