aboutsummaryrefslogtreecommitdiff
path: root/advtrains/nodedb.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2020-04-27 16:02:28 +0200
committerorwell96 <orwell@bleipb.de>2021-02-10 16:36:24 +0100
commit5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4 (patch)
tree5c72e9e541401126d5416b6d122893c300b88bea /advtrains/nodedb.lua
parentb59b0d587d72f78c5923aa501038b93269bba271 (diff)
downloadadvtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.tar.gz
advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.tar.bz2
advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.zip
Remove pcall wrappers completely, add command to disable advtrains mainloop
Diffstat (limited to 'advtrains/nodedb.lua')
-rw-r--r--advtrains/nodedb.lua6
1 files changed, 0 insertions, 6 deletions
diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua
index 878ed88..048d5b4 100644
--- a/advtrains/nodedb.lua
+++ b/advtrains/nodedb.lua
@@ -282,7 +282,6 @@ function advtrains.get_rail_info_at(pos, drives_on)
end
ndb.run_lbm = function(pos, node)
- return advtrains.pcall(function()
local cid=ndbget(pos.x, pos.y, pos.z)
if cid then
--if in database, detect changes and apply.
@@ -310,7 +309,6 @@ ndb.run_lbm = function(pos, node)
ndb.update(pos, node)
end
return false
- end)
end
@@ -358,9 +356,7 @@ ndb.restore_all = function()
end
minetest.register_on_dignode(function(pos, oldnode, digger)
- return advtrains.pcall(function()
ndb.clear(pos)
- end)
end)
function ndb.get_nodes()
@@ -381,14 +377,12 @@ minetest.register_chatcommand("at_sync_ndb",
description = "Write node db back to map and find ghost nodes", -- Full description
privs = {train_operator=true},
func = function(name, param)
- return advtrains.pcall(function()
if os.time() < ptime+30 then
return false, "Please wait at least 30s from the previous execution of /at_restore_ndb!"
end
local text = ndb.restore_all()
ptime=os.time()
return true, text
- end)
end,
})