diff --git a/changelog.txt b/changelog.txt index 8940eca..e6bacd9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 3.0.22 +Date: ? + Changes: + - Fixed multiple melonlib functions still check for .expensive and .normal. Resolves https://github.com/pyanodon/pybugreports/issues/773 +--------------------------------------------------------------------------------------------------- Version: 3.0.21 Date: 2025-1-2 Changes: diff --git a/info.json b/info.json index bd15f0a..6e8e3ff 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "pypostprocessing", - "version": "3.0.21", + "version": "3.0.22", "factorio_version": "2.0", "title": "Pyanodons Post-processing", "author": "Pyanodon, Shadowglass", diff --git a/lib/metas/recipe.lua b/lib/metas/recipe.lua index ab12d5a..85248f6 100644 --- a/lib/metas/recipe.lua +++ b/lib/metas/recipe.lua @@ -52,18 +52,6 @@ RECIPE = setmetatable(data.raw.recipe, { }) metas.standardize = function(self) - if self.normal then - for k, v in pairs(self.normal) do - if not self[k] then self[k] = v end - end - elseif self.expensive then - for k, v in pairs(self.expensive) do - if not self[k] then self[k] = v end - end - end - self.normal = nil - self.expensive = nil - if self.results and type(self.results) == "table" then self.result = nil self.result_count = nil diff --git a/lib/metas/technology.lua b/lib/metas/technology.lua index 7f43b01..1178f87 100644 --- a/lib/metas/technology.lua +++ b/lib/metas/technology.lua @@ -26,24 +26,7 @@ TECHNOLOGY = setmetatable(data.raw.technology, { local metas = {} metas.standardize = function(self) - if self.normal then - for k, v in pairs(self.normal) do - if not self[k] then self[k] = v end - end - elseif self.expensive then - for k, v in pairs(self.expensive) do - if not self[k] then self[k] = v end - end - end - - -- unit is not mandatory is 2.0 - -- if not self.unit then self.unit = {ingredients = {}} end - - --TODO: See if SA launch version still requires the shorthand spec - --[[ - for k, p in pairs(self.unit.ingredients) do - self.unit.ingredients[k] = py.standardize_product(p) - end]] + if not self.unit then self.unit = {ingredients = {}} end self.prerequisites = self.prerequisites or {} self.dependencies = self.dependencies or {}