From f4fe17bb0f0415291ada235273ff2925bda98b6e Mon Sep 17 00:00:00 2001 From: cheapie Date: Fri, 30 Aug 2024 13:30:01 -0500 Subject: Fix deprecated entity property handling --- init.lua | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 0c2018c..41e9cc9 100644 --- a/init.lua +++ b/init.lua @@ -212,22 +212,26 @@ local vsize = {x=1.0/1.5, y=1.0/1.5} local ecbox = {0, 0, 0, 0, 0, 0} minetest.register_entity("areasprotector:display_large", { - physical = false, - collisionbox = ecbox, - visual = "wielditem", - visual_size = vsize, - textures = {"areasprotector:display_node_large"}, + initial_properties = { + physical = false, + collisionbox = ecbox, + visual = "wielditem", + visual_size = vsize, + textures = {"areasprotector:display_node_large"}, + }, on_step = function(self, dtime) on_step(self, dtime, "large") end }) minetest.register_entity("areasprotector:display_small", { - physical = false, - collisionbox = ecbox, - visual = "wielditem", - visual_size = vsize, - textures = {"areasprotector:display_node_small"}, + initial_properties = { + physical = false, + collisionbox = ecbox, + visual = "wielditem", + visual_size = vsize, + textures = {"areasprotector:display_node_large"}, + }, on_step = function(self, dtime) on_step(self, dtime, "small") end -- cgit v1.2.3