Everything efficiency.

This commit is contained in:
Nihilistzsche 2023-02-10 17:21:35 -08:00
parent 2519480319
commit 63bf6332b6
No known key found for this signature in database
GPG key ID: E046460F41BAA12C
4 changed files with 28 additions and 5 deletions

View file

@ -963,6 +963,19 @@ function util.set_item_icons(item_name, icons)
end
end
-- Gets an item or fluid icon
function util.get_item_or_fluid_icon(name)
icon = ""
if data.raw.item[name] then
icon = data.raw.item[name].icon
if not icon then icon = data.raw.item[name].icons[1].icon end
elseif data.raw.fluid[name] then
icon = data.raw.fluid[name].icon
if not icon then icon = data.raw.fluid[name].icons[1].icon end
end
return icon
end
function util.set_to_founding(recipe, options)
util.set_category(recipe, "founding", options)
util.set_subgroup(recipe, "foundry-intermediate", options)