From 781cccafb770017ec6a4330284c0b82f35ae9c9a Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 4 Jul 2022 05:48:22 -0700 Subject: [PATCH] used in more glass --- aluminum-recipe-updates.lua | 11 +++++++++++ aluminum-recipe.lua | 1 - changelog.txt | 2 ++ compatibility/248k.lua | 4 ++++ data-util.lua | 4 ++-- info.json | 3 ++- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/aluminum-recipe-updates.lua b/aluminum-recipe-updates.lua index a6e3790..61960bf 100644 --- a/aluminum-recipe-updates.lua +++ b/aluminum-recipe-updates.lua @@ -74,14 +74,25 @@ util.replace_some_ingredient("glass", "sand", 3, "alumina", 1) -- aai util.multiply_recipe("glass-from-sand", 4) util.replace_some_ingredient("glass-from-sand", "sand", 3, "alumina", 1) +util.set_category("glass-from-sand", "basic-founding") -- se util.replace_some_ingredient("se-glass-vulcanite", "sand", 3, "alumina", 1) +-- sand-and-glass +util.multiply_recipe("sng-glass-plate", 4) +util.replace_some_ingredient("sng-glass-plate", "sng-sand", 3, "alumina", 1) +util.set_category("sng-glass-plate", "basic-founding") + + + + if not mods.Krastorio2 then util.set_to_founding("glass") util.set_to_founding("glass-from-sand") util.set_to_founding("se-glass-vulcanite") + util.set_to_founding("sng-glass-plate") end + -- End glass diff --git a/aluminum-recipe.lua b/aluminum-recipe.lua index baeea11..9f8f178 100644 --- a/aluminum-recipe.lua +++ b/aluminum-recipe.lua @@ -414,5 +414,4 @@ if mods.bztitanium then end end - end diff --git a/changelog.txt b/changelog.txt index 0a72025..bff0237 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,8 @@ Version: 0.3.4 Date: 2022-07-04 Changes: + - Sand & Glass: recipe requires alumina, in foundry + - 248K: motlen glass requires alumina - K2 Shelter uses aluminum cable --------------------------------------------------------------------------------------------------- Version: 0.3.3 diff --git a/compatibility/248k.lua b/compatibility/248k.lua index 5e565d0..d8939da 100644 --- a/compatibility/248k.lua +++ b/compatibility/248k.lua @@ -14,6 +14,10 @@ end -- Remove 248k titanium plate util.remove_raw("item", al2) +-- glass uses alumina +util.multiply_recipe("fi_arc_glass_recipe", 2) +util.replace_some_ingredient("fi_arc_glass_recipe", "silica", 2, "alumina", 1) + -- Stone purification should produce even outputs now util.add_to_ingredient("el_purify_stone_recipe", "stone", 5) util.add_to_ingredient("el_purify_stone_recipe", "water", 50) diff --git a/data-util.lua b/data-util.lua index 0994028..8b49132 100644 --- a/data-util.lua +++ b/data-util.lua @@ -551,7 +551,7 @@ end -- Set recipe category function util.set_category(recipe_name, category) if me.bypass[recipe_name] then return end - if data.raw.recipe[recipe_name] then + if data.raw.recipe[recipe_name] and data.raw["recipe-category"][category] then me.add_modified(recipe_name) data.raw.recipe[recipe_name].category = category end @@ -601,7 +601,7 @@ end -- Add crafting category to an entity function util.add_crafting_category(entity_type, entity, category) - if data.raw[entity_type][entity] then + if data.raw[entity_type][entity] and data.raw["recipe-category"][category] then for i, existing in pairs(data.raw[entity_type][entity].crafting_categories) do if existing == category then log(entity.." not adding "..category.." -- duplicate") diff --git a/info.json b/info.json index 829e497..7ff65de 100644 --- a/info.json +++ b/info.json @@ -8,7 +8,7 @@ "homepage": "", "dependencies": [ "base >= 1.1.0", - "bzfoundry", + "bzfoundry >= 0.2.1", "? bztitanium >= 1.0.3", "? bzlead", "? bzzirconium >= 0.5.4", @@ -17,6 +17,7 @@ "? space-exploration", "? aai-industry", "? Krastorio2", + "? sand-and-glass", "? 248k", "? deadlock-beltboxes-loaders", "? DeadlockCrating"