[Request]Access to entity properties from control code
Posted: Tue Feb 03, 2015 12:56 pm
I would think it would make modding very much easier if there was a method to get a hold of the properties set in files like entity.lua from control code, like control.lua.
In the past few days I've been doing things where I wish I could just write a line like
The above is just an example, that would most probably look for entities on another layer that occupies the same space as what a player just placed down.
This would make it easier to write more advanced mods, when you can access things like how many animation steps an entity has, what fuel source it can use, what crafting type it uses or how hard it is to mine. This would be even more useful when we are able to make our own entity types in the future.
If there is a way to do this right now, I have not found it, but I still think a method for entities would make this a lot easier.
In the past few days I've been doing things where I wish I could just write a line like
Code: Select all
area = event.createdentity.getproperty(collision_box)
game.findentities{area}
This would make it easier to write more advanced mods, when you can access things like how many animation steps an entity has, what fuel source it can use, what crafting type it uses or how hard it is to mine. This would be even more useful when we are able to make our own entity types in the future.
If there is a way to do this right now, I have not found it, but I still think a method for entities would make this a lot easier.