TheTermos / mobkit

Entity API for Minetest
MIT License
27 stars 12 forks source link

Fix deprecated use of inline properties #16

Closed rubenwardy closed 4 years ago

rubenwardy commented 4 years ago

Defining things directly in the entity definition table is deprecated

Instead, properties should be done like so:

initial_properties = {
    physical = true,
    collide_with_objects = true,
    collisionbox = {...},
    visual = "mesh",
    mesh = "...",
    textures = {...},
}

note: this only applies to Object Properties, as set by object:set_property()

TheTermos commented 4 years ago

Good point, but that requires some changes in lua, because there's an implicit assumption these properties are defined directly. Gonna pull it in as soon as that's done.

rubenwardy commented 4 years ago

Please note that initial_properties is only for engine properties. You shouldn't put anything in there that the engine doesn't understand, and you shouldn't access it from code - use get_properties() instead

TheTermos commented 4 years ago

Added support for initial_properties in init.lua. Thanks