-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed crash when paired with the editor extensions mod.
- Loading branch information
1 parent
2c25ddb
commit c7c4bfa
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
if not mods.quality then return end | ||
|
||
local deadrecipes = {} | ||
for r, recipe in pairs(data.raw.recipe) do | ||
if string.match(recipe.name, "recycling") ~= nil then | ||
if data.raw.item[recipe.ingredients[1].name] == nil or data.raw.item[recipe.results[1].name] == nil then | ||
table.insert(deadrecipes, recipe.name) | ||
end | ||
end | ||
end | ||
|
||
for r, recipe in pairs(deadrecipes) do | ||
log("WARNING @ quality.lua: Deleting quality recycling recipe " .. recipe) | ||
data.raw.recipe[recipe] = nil | ||
end | ||
local deadrecipes = {} | ||
|
||
for t, tech in pairs(data.raw.technology) do | ||
for e, effect in pairs(tech.effects or {}) do | ||
if effect.type == "unlock-recipe" then | ||
if data.raw.recipe[effect.recipe] == nil then | ||
log("WARNING @ quality.lua " .. tech.name .. ": Recipe unlock effect " .. effect.recipe .. " does not exist!") | ||
data.raw.technology[tech.name].effects[e] = nil | ||
end | ||
end | ||
end | ||
end |