Is there an easy way to get the dimensions of a building LuaEntity?
I could hard-code a table of them all, but that's not very compatible with other mods.
Entity dimensions
Re: Entity dimensions
I don't know what you want, but game.entityprototypes have a list of all entities, return a prototype
maybe with a for, you can take a specific entity
maybe with a for, you can take a specific entity
Code: Select all
for _,v ipairs(game.entityprototypes)}
if v.name = [name] then
[collision_box] = v.collision_box
[collision_mask] = v.collision_mask
[selection_box] = v.selection_box
end
end