mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
CAO 'node' visual (#15683)
This commit is contained in:
parent
5a8720a484
commit
27bbe3a873
14 changed files with 267 additions and 91 deletions
|
@ -197,13 +197,17 @@ void ScriptApiEntity::luaentity_GetProperties(u16 id,
|
|||
// Set default values that differ from ObjectProperties defaults
|
||||
prop->hp_max = 10;
|
||||
|
||||
auto *idef = getServer()->idef();
|
||||
|
||||
// Deprecated: read object properties directly
|
||||
// TODO: this should be changed to not read the legacy place
|
||||
// if `initial_properties` exists!
|
||||
logDeprecationForExistingProperties(L, -1, entity_name);
|
||||
read_object_properties(L, -1, self, prop, getServer()->idef());
|
||||
read_object_properties(L, -1, self, prop, idef, true);
|
||||
|
||||
// Read initial_properties
|
||||
lua_getfield(L, -1, "initial_properties");
|
||||
read_object_properties(L, -1, self, prop, getServer()->idef());
|
||||
read_object_properties(L, -1, self, prop, idef);
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue