diff options
author | cheapie <no-email-for-you@example.com> | 2024-08-30 13:30:01 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-08-30 13:30:01 -0500 |
commit | f4fe17bb0f0415291ada235273ff2925bda98b6e (patch) | |
tree | a2469bec3362ac3dc444785a1d297c1c4c117c5c | |
parent | 115f2290f42b7d7c2c7b70e545ba9e6a4e58950e (diff) | |
download | areasprotector-f4fe17bb0f0415291ada235273ff2925bda98b6e.tar areasprotector-f4fe17bb0f0415291ada235273ff2925bda98b6e.tar.gz areasprotector-f4fe17bb0f0415291ada235273ff2925bda98b6e.tar.bz2 areasprotector-f4fe17bb0f0415291ada235273ff2925bda98b6e.tar.xz areasprotector-f4fe17bb0f0415291ada235273ff2925bda98b6e.zip |
Fix deprecated entity property handling
-rw-r--r-- | init.lua | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -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 |