summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-04-20 15:37:31 -0500
committercheapie <no-email-for-you@example.com>2024-04-20 15:37:31 -0500
commit34dba4609c5dd7651b312d20c78b24a57251ef19 (patch)
tree390339775ad4f0803f87460e851bfac56a154a1a
parent5c85c16570e5b7f12d149a4b52747606d0ee2940 (diff)
downloadcelevator-34dba4609c5dd7651b312d20c78b24a57251ef19.tar
celevator-34dba4609c5dd7651b312d20c78b24a57251ef19.tar.gz
celevator-34dba4609c5dd7651b312d20c78b24a57251ef19.tar.bz2
celevator-34dba4609c5dd7651b312d20c78b24a57251ef19.tar.xz
celevator-34dba4609c5dd7651b312d20c78b24a57251ef19.zip
Mark drive metadata as private
Both on placement and also on first move (for existing drives)
-rw-r--r--drive_entity.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/drive_entity.lua b/drive_entity.lua
index d3d9295..c1e4285 100644
--- a/drive_entity.lua
+++ b/drive_entity.lua
@@ -171,6 +171,7 @@ minetest.register_node("celevator:drive",{
meta:set_string("state","uninit")
meta:set_string("startpos","0")
meta:set_string("doorstate","closed")
+ meta:mark_as_private({"apos","dpos","vel","maxvel","state","startpos","doorstate"})
update_ui(pos)
end,
on_destruct = stopbuzz,
@@ -468,6 +469,7 @@ minetest.register_globalstep(celevator.drives.entity.step)
function celevator.drives.entity.moveto(pos,target)
local meta = celevator.get_meta(pos)
+ meta:mark_as_private({"apos","dpos","vel","maxvel","state","startpos","doorstate"})
local carid = celevator.get_meta(pos):get_int("carid")
local carinfo = minetest.deserialize(celevator.storage:get_string(string.format("car%d",carid)))
if not (carinfo and carinfo.machinepos) then return end