Fix booleans being strings

This commit is contained in:
Simon Brodtmann 2025-11-01 13:01:42 +01:00
parent 8db4982e5b
commit 04a1e986dd

View file

@ -1193,8 +1193,8 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier)
end end
util.remove_prior_unlocks(tech, old) util.remove_prior_unlocks(tech, old)
for i, recipe in pairs(data.raw.recipe) do for i, recipe in pairs(data.raw.recipe) do
if (recipe.enabled and recipe.enabled ~= 'false') if (recipe.enabled and recipe.enabled ~= false)
and (not recipe.hidden or recipe.hidden == 'true') -- probably don't want to change hidden recipes and (not recipe.hidden or recipe.hidden == true) -- probably don't want to change hidden recipes
and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :( and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :(
then then
-- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :| -- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :|