In addition to this, i think there's no way to find out whether an LuaItemPrototype can be placed as a tile, so maybe add place_as_tile with the resulting tile there?
Right now i have to do some pretty ugly stuff to try and dynamically find tiles and the corresponding item in data-final-fixes (to get modded concrete):
Code: Select all
local meta_concrete = copyPrototype("recipe", "deconstruction-planner", "farl-meta-concrete")
meta_concrete.ingredients = {}
meta_concrete.enabled = true
meta_concrete.hidden = false
for _, ent in pairs(data.raw["item"]) do
if ent.place_as_tile and ent.place_as_tile.result and type(ent.place_as_tile.result) == "string" then
local item_name = false
local amount = 1
local tile = data.raw["tile"][ent.place_as_tile.result]
if tile and tile.minable and tile.minable.result then
item_name = ent.name
if ent.place_as_tile.result ~= item_name then
amount = 2
end
else
item_name = false
log("FARL: No item found for tile: "..ent.name)
end
if item_name then
table.insert(meta_concrete.ingredients, {item_name, amount})
end
end
end
If i'm missing something that would make this easier please let me know
