diff --git a/changelog.txt b/changelog.txt index 273e194..8e65ce1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version: 0.0.15 Date: 2023-12-29 Changes: - SE: Meteor/umbrella defense tech requires rocket science packs + - Bob's: Merge CPU/CPUs items into one. (Might need further balancing or progression changes.) --------------------------------------------------------------------------------------------------- Version: 0.0.14 Date: 2023-04-16 diff --git a/compatibility/bobelectronics.lua b/compatibility/bobelectronics.lua new file mode 100644 index 0000000..a10577f --- /dev/null +++ b/compatibility/bobelectronics.lua @@ -0,0 +1,22 @@ +local util = require("data-util") + +if mods.bobelectronics or mods.MDbobelectronics then + util.replace_ingredient("advanced-processing-unit", "processing-electronics", "cpu", 4) + util.remove_recipe_effect("advanced-electronics-3", "processing-electronics") + util.remove_raw("recipe", "processing-electronics") + util.remove_raw("item", "processing-electronics") + + for j, module in pairs(data.raw.module) do + if module.effect then + for effect_name, effect in pairs(module.effect) do + if effect_name == "productivity" and effect.bonus > 0 and module.limitation and #module.limitation > 0 then + for k = #module.limitation, 1, -1 do + if module.limitation[k] == "processing-electronics" then + table.remove(module.limitation, k) + end + end + end + end + end + end +end diff --git a/data-updates.lua b/data-updates.lua index ddd4b0e..55f1f8e 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -1,5 +1,6 @@ require("prototypes/tech-updates") require("prototypes/processing-unit-updates") +require("compatibility/bobelectronics") require("prototypes/recipe-updates") require("prototypes/recipe-updates-se") require("map-gen-preset-updates") diff --git a/migrations/bzgold.0.0.15.json b/migrations/bzgold.0.0.15.json new file mode 100644 index 0000000..882479a --- /dev/null +++ b/migrations/bzgold.0.0.15.json @@ -0,0 +1,6 @@ +{ + "item": + [ + ["processing-electronics", "cpu"] + ] +}