From 09960de024d61f59df0f7099864104092d253fad Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 11 Dec 2022 02:19:23 +0200 Subject: [PATCH 1/2] Added Nullius support --- cybersyn/data-final-fixes.lua | 8 ++++++++ cybersyn/prototypes/item.lua | 4 ++++ cybersyn/prototypes/tech.lua | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 cybersyn/data-final-fixes.lua diff --git a/cybersyn/data-final-fixes.lua b/cybersyn/data-final-fixes.lua new file mode 100644 index 0000000..486175d --- /dev/null +++ b/cybersyn/data-final-fixes.lua @@ -0,0 +1,8 @@ +if mods["nullius"] then + -- Place combinator in the same subgroup as the regular train stop + data.raw["recipe"][COMBINATOR_NAME].subgroup = data.raw["train-stop"]["train-stop"].subgroup + data.raw["item"][COMBINATOR_NAME].subgroup = data.raw["item"]["train-stop"].subgroup + -- Nullius makes modded technologies part of its research tree + -- Place combinator in the same place on the research tree as LTN + table.insert(data.raw.technology["nullius-broadcasting-1"].prerequisites, "cybersyn-train-network") +end \ No newline at end of file diff --git a/cybersyn/prototypes/item.lua b/cybersyn/prototypes/item.lua index 5749e50..c2bf98d 100644 --- a/cybersyn/prototypes/item.lua +++ b/cybersyn/prototypes/item.lua @@ -5,3 +5,7 @@ combinator_item.icon_size = 64 combinator_item.icon_mipmaps = 4 combinator_item.order = data.raw["item"]["decider-combinator"].order.."-b" combinator_item.place_result = COMBINATOR_NAME +if (mods["nullius"]) then + -- Enable item in Nullius and place next to the regular train stop + combinator_item.order = "nullius-eca" +end \ No newline at end of file diff --git a/cybersyn/prototypes/tech.lua b/cybersyn/prototypes/tech.lua index d4daad1..35c2725 100644 --- a/cybersyn/prototypes/tech.lua +++ b/cybersyn/prototypes/tech.lua @@ -5,6 +5,18 @@ combinator_recipe.ingredients = { {"advanced-circuit", 5}, } combinator_recipe.enabled = false +if (mods["nullius"]) then + -- Enable recipe and place it just after regular station + combinator_recipe.order = "nullius-eca" + -- Use the same costs (minus the train stop) and metadata as for LTN + combinator_recipe.category = "medium-crafting" + combinator_recipe.always_show_made_in = true + combinator_recipe.energy_required = 3 + combinator_recipe.ingredients = { + {"arithmetic-combinator", 2}, + {"green-wire", 4} + } +end cybersyn_tech = { type = "technology", @@ -33,3 +45,19 @@ cybersyn_tech = { }, order = "c-g-c" } + +if (mods["nullius"]) then + -- Enable technology + cybersyn_tech.order = "nullius-" .. (cybersyn_tech.order or "") + -- Use the same costs and requirements as for LTN + cybersyn_tech.unit = { + count = 100, + ingredients = { + { "nullius-geology-pack", 1 }, { "nullius-climatology-pack", 1 }, + { "nullius-mechanical-pack", 1 }, { "nullius-electrical-pack", 1 } + }, + time = 25 + } + cybersyn_tech.prerequisites = { "nullius-checkpoint-optimization", "nullius-traffic-control" } + cybersyn_tech.ignore_cybersyn_tech_cost_multiplier = true +end \ No newline at end of file From 18dc76de6f5cff0e1ff84ff3dce5838561c485fa Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 11 Dec 2022 14:13:15 +0200 Subject: [PATCH 2/2] Fixed typo in tech multiplier disabler & changed crafting category to match other combinators. --- cybersyn/prototypes/tech.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cybersyn/prototypes/tech.lua b/cybersyn/prototypes/tech.lua index 35c2725..b788b53 100644 --- a/cybersyn/prototypes/tech.lua +++ b/cybersyn/prototypes/tech.lua @@ -8,9 +8,10 @@ combinator_recipe.enabled = false if (mods["nullius"]) then -- Enable recipe and place it just after regular station combinator_recipe.order = "nullius-eca" - -- Use the same costs (minus the train stop) and metadata as for LTN - combinator_recipe.category = "medium-crafting" + -- In Nullius, most combinators are tiny crafts + combinator_recipe.category = "tiny-crafting" combinator_recipe.always_show_made_in = true + -- Use the same costs (minus the train stop) as for LTN combinator_recipe.energy_required = 3 combinator_recipe.ingredients = { {"arithmetic-combinator", 2}, @@ -59,5 +60,5 @@ if (mods["nullius"]) then time = 25 } cybersyn_tech.prerequisites = { "nullius-checkpoint-optimization", "nullius-traffic-control" } - cybersyn_tech.ignore_cybersyn_tech_cost_multiplier = true + cybersyn_tech.ignore_tech_tech_cost_multiplier = true end \ No newline at end of file