There is a handful of useful functions on LuaItemStack like is_tool, is_armor, is_blueprint.
Putting aside the fact that I would have to call them all, there are no checks for capsules or wires.
I could check for type and expect "item" only, but wire is an item.
How can I check if an entity is a building that can be placed by the player in the world?
How to detect if item is a building and can be placed in the world?
Re: How to detect if item is a building and can be placed in the world?
Code: Select all
if item.prototype.place_result then
-- item is a building
end
