diff options
author | cheapie <no-email-for-you@example.com> | 2023-08-12 14:58:41 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2023-08-12 14:58:41 -0500 |
commit | a72dc1ff70cda30dcaa8ea23193795bee508bc9b (patch) | |
tree | fa9053292af1367b6f1bad07ac9c39a5d500a25a /controller.lua | |
parent | 407a3fa6834c8fe06fa01b71aeeee72ae0c2f5ea (diff) | |
download | celevator-a72dc1ff70cda30dcaa8ea23193795bee508bc9b.tar celevator-a72dc1ff70cda30dcaa8ea23193795bee508bc9b.tar.gz celevator-a72dc1ff70cda30dcaa8ea23193795bee508bc9b.tar.bz2 celevator-a72dc1ff70cda30dcaa8ea23193795bee508bc9b.tar.xz celevator-a72dc1ff70cda30dcaa8ea23193795bee508bc9b.zip |
Mark controller memory as private
This significantly reduces the network bandwidth usage.
Diffstat (limited to 'controller.lua')
-rw-r--r-- | controller.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/controller.lua b/controller.lua index ee9a3b5..3de026c 100644 --- a/controller.lua +++ b/controller.lua @@ -149,6 +149,7 @@ minetest.register_node("celevator:controller",{ on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_string("mem",minetest.serialize({})) + meta:mark_as_private("mem") local event = {} event.type = "program" celevator.controller.run(pos,event) @@ -504,7 +505,8 @@ function celevator.controller.run(pos,event) table.insert(celevator.controller.equeue[hash],event) celevator.storage:set_string("controller_equeue",minetest.serialize(celevator.controller.equeue)) if #celevator.controller.equeue[hash] > 5 then - minetest.log("warning","[celevator] [controller] Async process for controller at %s is falling behind, %d events in queue",minetest.pos_to_string(pos),#celevator.controller.equeue[hash]) + local message = "[celevator] [controller] Async process for controller at %s is falling behind, %d events in queue" + minetest.log("warning",string.format(message,minetest.pos_to_string(pos),#celevator.controller.equeue[hash])) end return end |