From 67c568c4a1ec1b6774375090938e42321159fa21 Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 14 Jun 2021 23:49:02 -0700 Subject: [PATCH] bobs+se compat --- changelog.txt | 6 ++++++ data-final-fixes.lua | 3 +++ info.json | 2 +- locale/en/tungsten.cfg | 1 + locale/ja/tungsten.cfg | 1 + locale/ru/tungsten.cfg | 1 + tungsten-recipe-se.lua | 2 +- tungsten-recipe-updates.lua | 16 ++++++++-------- tungsten-recipe.lua | 2 +- tungsten-util.lua | 5 +++++ 10 files changed, 28 insertions(+), 11 deletions(-) diff --git a/changelog.txt b/changelog.txt index a9dffa6..c71e47c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 0.1.3 +Date: 2021-06-15 + Fixes: + - Fix load cycle error with SE+K2+Bobs Lib+Tungsten + - Try to prevent another potential issue with possible duplicate ingredients. +--------------------------------------------------------------------------------------------------- Version: 0.1.2 Date: 2021-06-14 Features: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 1cfcb16..b8efc67 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -25,3 +25,6 @@ end util.remove_prerequisite("kr-radar", "optics") util.add_prerequisite("kr-radar", "electricity") + +-- SE don't gate tungsten +util.remove_prerequisite("tungsten-processing", "se-material-science-pack-1") diff --git a/info.json b/info.json index 071bbe2..d09e78b 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztungsten", - "version": "0.1.2", + "version": "0.1.3", "factorio_version": "1.1", "title": "Tungsten", "author": "Brevven", diff --git a/locale/en/tungsten.cfg b/locale/en/tungsten.cfg index 65a50da..6a6e867 100644 --- a/locale/en/tungsten.cfg +++ b/locale/en/tungsten.cfg @@ -28,6 +28,7 @@ advanced-carbon-furnace=For making tungsten carbide quickly and efficiently. Bur [technology-name] tungsten-processing=Tungsten processing +bz-tungsten-processing=Tungsten processing enriched-tungsten=Enriched tungsten tungsten-matter-processing=Tungsten conversion advanced-carbon-furnace=__ITEM__advanced-carbon-furnace__ diff --git a/locale/ja/tungsten.cfg b/locale/ja/tungsten.cfg index 2631315..83600a9 100644 --- a/locale/ja/tungsten.cfg +++ b/locale/ja/tungsten.cfg @@ -28,6 +28,7 @@ advanced-carbon-furnace=高速かつ効率的に炭化タングステンを生 [technology-name] tungsten-processing=タングステン処理 +bz-tungsten-processing=タングステン処理 enriched-tungsten=タングステン純化 tungsten-matter-processing=タングステン変換 advanced-carbon-furnace=__ITEM__advanced-carbon-furnace__ diff --git a/locale/ru/tungsten.cfg b/locale/ru/tungsten.cfg index 17be844..5e787db 100644 --- a/locale/ru/tungsten.cfg +++ b/locale/ru/tungsten.cfg @@ -21,6 +21,7 @@ enriched-tungsten=Может быть эффективно переплавле [technology-name] tungsten-processing=Обработка вольфрама +bz-tungsten-processing=Обработка вольфрама enriched-tungsten=Обогащенный вольфрам tungsten-matter-processing=Преобразование вольфрама diff --git a/tungsten-recipe-se.lua b/tungsten-recipe-se.lua index d2bd764..1c579ed 100644 --- a/tungsten-recipe-se.lua +++ b/tungsten-recipe-se.lua @@ -89,5 +89,5 @@ if mods["aai-industry"] and not mods["Krastorio2"] then }, } }) - util.add_effect("tungsten-processing", {type = "unlock-recipe", recipe= "tungsten-carbide-coal"}) + util.add_effect(util.tungsten_processing, {type = "unlock-recipe", recipe= "tungsten-carbide-coal"}) end diff --git a/tungsten-recipe-updates.lua b/tungsten-recipe-updates.lua index a36d043..ef0ce29 100644 --- a/tungsten-recipe-updates.lua +++ b/tungsten-recipe-updates.lua @@ -1,7 +1,7 @@ local util = require("__bztungsten__.tungsten-util"); -- Lamps -util.add_prerequisite("optics", "tungsten-processing") +util.add_prerequisite("optics", util.tungsten_processing) util.set_tech_recipe("optics", {{"automation-science-pack", 1}, {"logistic-science-pack", 1}}) util.add_ingredient("small-lamp", "tungsten-plate", 1) @@ -11,14 +11,14 @@ util.add_ingredient("rail-signal", "small-lamp", 1) util.add_ingredient("rail-chain-signal", "small-lamp", 1) -- Ammunition -util.add_prerequisite("military-2", "tungsten-processing") +util.add_prerequisite("military-2", util.tungsten_processing) util.replace_ingredient("piercing-rounds-magazine", "copper-plate", "tungsten-plate") util.replace_ingredient("piercing-shotgun-shell", "copper-plate", "tungsten-plate") util.replace_ingredient("cannon-shell", "copper-plate", "tungsten-plate") -- Tooling -util.add_prerequisite("automation-2", "tungsten-processing") +util.add_prerequisite("automation-2", util.tungsten_processing) util.replace_some_ingredient("assembling-machine-2", "steel-plate", 1, "tungsten-carbide", 1) util.add_ingredient("assembling-machine-3", "tungsten-carbide", 4) util.add_ingredient("chemical-plant", "tungsten-carbide", 2) @@ -28,12 +28,12 @@ util.add_ingredient("electric-furnace", "tungsten-carbide", 1) util.replace_ingredient("accumulator", "iron-plate", "tungsten-plate") util.add_ingredient("oil-refinery", "tungsten-plate", 1) util.add_ingredient("chemical-plant", "tungsten-plate", 1) -util.add_prerequisite("engine", "tungsten-processing") +util.add_prerequisite("engine", util.tungsten_processing) util.add_ingredient("engine-unit", "tungsten-plate", 1) -- Hot stuff -util.add_prerequisite("advanced-materials-processing-2", "tungsten-processing") +util.add_prerequisite("advanced-materials-processing-2", util.tungsten_processing) util.replace_some_ingredient("electric-furnace", "stone-brick", 5, "tungsten-plate", 10) util.replace_some_ingredient("heat-exchanger", "copper-plate", 50, "tungsten-plate", 50) util.replace_some_ingredient("heat-pipe", "copper-plate", 10, "tungsten-plate", 10) @@ -94,7 +94,7 @@ if mods["Krastorio2"] then util.remove_prerequisite("kr-sentinel", "optics") - util.add_prerequisite("tungsten-processing", "kr-mineral-water-gathering") + util.add_prerequisite(util.tungsten_processing, "kr-mineral-water-gathering") util.remove_prerequisite("kr-mineral-water-gathering", "fluid-handling") -- engines come later with Tungsten. @@ -232,7 +232,7 @@ util.add_ingredient("vtk-deepcore-mining-drill-advanced", "tungsten-carbide", 50 -- Advanced Mining Drills util.add_ingredient("advanced-mining-drill", "tungsten-carbide", 1) -util.add_prerequisite("advanced-mining-drill", "tungsten-processing") +util.add_prerequisite("advanced-mining-drill",util.tungsten_processing) util.add_ingredient("elite-mining-drill", "tungsten-carbide", 5) util.add_ingredient("ultimate-mining-drill", "tungsten-carbide", 10) @@ -298,7 +298,7 @@ util.add_ingredient("mega-furnace", "tungsten-plate", 5) -- Mundas util.add_ingredient("munda_big_machine", "tungsten-carbide", 32) -util.add_prerequisite("munda_big_machine", "tungsten-processing") +util.add_prerequisite("munda_big_machine", util.tungsten_processing) -- Realistic reactors diff --git a/tungsten-recipe.lua b/tungsten-recipe.lua index add7e49..2cf3ee8 100644 --- a/tungsten-recipe.lua +++ b/tungsten-recipe.lua @@ -54,7 +54,7 @@ data:extend( }, { type = "technology", - name = "tungsten-processing", + name = util.tungsten_processing, icon_size = 256, icon_mipmaps = 4, icon = "__bztungsten__/graphics/technology/tungsten-processing.png", effects = diff --git a/tungsten-util.lua b/tungsten-util.lua index c6924f0..161fff5 100644 --- a/tungsten-util.lua +++ b/tungsten-util.lua @@ -3,6 +3,11 @@ local util = {} util.tungsten_ore = "tungsten-ore" util.tungsten_plate = "tungsten-plate" +util.tungsten_processing = "tungsten-processing" +if bobmods and bobmods.lib and bobmods.lib.recipe and bobmods.lib.tech then + util.tungsten_processing = "bz-tungsten-processing" +end + function util.get_setting(name) if settings.startup[name] == nil then return nil