From 58a136c0e9ab8bda52bc5380d4e7a0119acdd0ee Mon Sep 17 00:00:00 2001 From: Brevven Date: Wed, 16 Jun 2021 21:06:27 -0700 Subject: [PATCH] modmashsplinter electronics compat --- changelog.txt | 3 ++- data-final-fixes.lua | 11 +++++++++++ info.json | 1 + recipe-updates.lua | 6 ++++-- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 50769d1..707476c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,7 +2,8 @@ Version: 0.7.1 Date: 2021-06-16 Features: - - Ja locale updates from Sakuro + - ja locale updates from Sakuro + - Mod Mash Electronics recipes --------------------------------------------------------------------------------------------------- Version: 0.7.0 Date: 2021-06-16 diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 79bca8f..51ccef4 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -1,2 +1,13 @@ require("deadlock-stacking") require("modules") + +local util = require("__bzsilicon__.util"); + +-- Mod Mash Splinter Electronics +if mods.modmashsplinterelectronics then + if util.more_intermediates() then + util.multiply_recipe("advanced-circuit", 3) + util.add_ingredient("advanced-circuit", "silicon-wafer", 1) + end + util.add_ingredient("processing-unit", "silicon-wafer", 1) +end diff --git a/info.json b/info.json index 58f9995..6648e16 100644 --- a/info.json +++ b/info.json @@ -8,6 +8,7 @@ "homepage": "", "dependencies": [ "? Krastorio2", + "? modmashsplinterelectronics", "base >= 0.18" ], "description": "Adds simple Silica and Silicon to the game, along with basic fiber optics." diff --git a/recipe-updates.lua b/recipe-updates.lua index 3fd2647..fca7d9d 100644 --- a/recipe-updates.lua +++ b/recipe-updates.lua @@ -30,8 +30,10 @@ if not mods["Krastorio2"] then util.add_effect("solar-energy", {type = "unlock-recipe", recipe="solar-cell"}) - util.multiply_recipe("advanced-circuit", 3) - util.replace_some_ingredient("advanced-circuit", "electronic-circuit", 3, "silicon-wafer", 1) + if not mods.modmashsplinterelectronics then + util.multiply_recipe("advanced-circuit", 3) + util.replace_some_ingredient("advanced-circuit", "electronic-circuit", 3, "silicon-wafer", 1) + end util.add_prerequisite("advanced-electronics", util.silicon_processing) else