From ade23d7b2abbc6419acacf60db981bc52806a9cb Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 9 Jan 2021 23:12:16 -0800 Subject: [PATCH] k2 matter price --- changelog.txt | 6 ++++++ data-util.lua | 12 ++++++++++++ info.json | 2 +- titanium-matter.lua | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index cf30c71..2b1854f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 0.9.9 +Date: 2021-01-09 + Changes: + - Matter to titanium ore recipe cost + - Very minor compatibility tweaks for py +--------------------------------------------------------------------------------------------------- Version: 0.9.8 Date: 2021-01-07 Fixes: diff --git a/data-util.lua b/data-util.lua index 367b379..8f5fa24 100644 --- a/data-util.lua +++ b/data-util.lua @@ -56,6 +56,18 @@ function data_util.add_titanium_prerequisite(technology) table.insert(technology.prerequisites, data_util.titanium_processing) end +--- removes a prerequisite tech +function data_util.remove_prerequisite(tech, prereq) + if data.raw.technology[tech] then + for i=1, #data.raw.technology[tech].prerequisites, 1 do + if data.raw.technology[tech].prerequisites[i] == prereq then + table.remove(data.raw.technology[tech].prerequisites, i) + break + end + end + end +end + --- Change all occurances of steel plates to titanium plates in a given recipe function data_util.steel_to_titanium(recipe) data_util.replace_ingredient(recipe, "steel-plate", data_util.titanium_plate) diff --git a/info.json b/info.json index d32ccab..581dc6e 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "0.9.8", + "version": "0.9.9", "factorio_version": "1.1", "title": "Titanium", "author": "Brevven", diff --git a/titanium-matter.lua b/titanium-matter.lua index 90f801d..53af8de 100644 --- a/titanium-matter.lua +++ b/titanium-matter.lua @@ -40,7 +40,7 @@ local titanium_ore_matter = minimum_conversion_quantity = 10, matter_value = 8, energy_required = 1, - need_stabilizer = true, + need_stabilizer = false, unlocked_by_technology = "titanium-matter-processing" } matter.createMatterRecipe(titanium_ore_matter)