summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-08-30 13:30:01 -0500
committercheapie <no-email-for-you@example.com>2024-08-30 13:30:01 -0500
commitf4fe17bb0f0415291ada235273ff2925bda98b6e (patch)
treea2469bec3362ac3dc444785a1d297c1c4c117c5c
parent115f2290f42b7d7c2c7b70e545ba9e6a4e58950e (diff)
downloadareasprotector-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.lua24
1 files 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