Fix deprecation warnings

Move defined object properties into the initial_properties table.
This commit is contained in:
Wade T. Cline 2024-01-06 20:01:14 -08:00
parent 408e33b76f
commit 699012db80

View File

@ -69,14 +69,16 @@ local function mummy_update_visuals_def(self)
end end
local MUMMY_DEF = { local MUMMY_DEF = {
hp_max = mummy_hp, initial_properties = {
physical = true, hp_max = mummy_hp,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4}, physical = true,
visual = "mesh", collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual_size = {x=8,y=8}, visual = "mesh",
mesh = mummy_mesh, visual_size = {x=8,y=8},
textures = mummy_texture, mesh = mummy_mesh,
makes_footstep_sound = true, textures = mummy_texture,
makes_footstep_sound = true,
},
npc_anim = 0, npc_anim = 0,
timer = 0, timer = 0,
turn_timer = 0, turn_timer = 0,
@ -117,16 +119,18 @@ local function check_if_mummy_spawner_entity_exists(pos, self)
end end
local spawner_DEF = { local spawner_DEF = {
hp_max = 1, initial_properties = {
physical = false, hp_max = 1,
pointable = false, physical = false,
visual = "mesh", pointable = false,
visual_size = {x=3.3,y=3.3}, visual = "mesh",
mesh = mummy_mesh, visual_size = {x=3.3,y=3.3},
textures = mummy_texture, mesh = mummy_mesh,
makes_footstep_sound = false, textures = mummy_texture,
makes_footstep_sound = false,
automatic_rotate = math.pi * 2.9,
},
timer = 0, timer = 0,
automatic_rotate = math.pi * 2.9,
} }
spawner_DEF.on_activate = function(self) spawner_DEF.on_activate = function(self)