summaryrefslogtreecommitdiff
path: root/controller.lua
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2023-08-12 14:58:41 -0500
committercheapie <no-email-for-you@example.com>2023-08-12 14:58:41 -0500
commita72dc1ff70cda30dcaa8ea23193795bee508bc9b (patch)
treefa9053292af1367b6f1bad07ac9c39a5d500a25a /controller.lua
parent407a3fa6834c8fe06fa01b71aeeee72ae0c2f5ea (diff)
downloadcelevator-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.lua4
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