aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/route_prog.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-08-16 19:18:03 +0200
committerorwell96 <orwell@bleipb.de>2018-08-16 19:18:03 +0200
commit05cb6090ac9537650a900b64768bf3ed959cebed (patch)
tree11b7e3ab4bb846ab069fc10832b07cb36d6eb6dd /advtrains_interlocking/route_prog.lua
parent5fad61e9c981115a183527ffe58a7bbe26fea4e7 (diff)
downloadadvtrains-05cb6090ac9537650a900b64768bf3ed959cebed.tar.gz
advtrains-05cb6090ac9537650a900b64768bf3ed959cebed.tar.bz2
advtrains-05cb6090ac9537650a900b64768bf3ed959cebed.zip
Move passive API to the advtrains core
to remove dependency of interlocking on luaautomation
Diffstat (limited to 'advtrains_interlocking/route_prog.lua')
-rw-r--r--advtrains_interlocking/route_prog.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/advtrains_interlocking/route_prog.lua b/advtrains_interlocking/route_prog.lua
index 498df5f..f14ad60 100644
--- a/advtrains_interlocking/route_prog.lua
+++ b/advtrains_interlocking/route_prog.lua
@@ -282,7 +282,7 @@ minetest.register_chatcommand("at_rp_set",
{
params = "<name>", -- Short parameter description
description = "Completes route programming procedure", -- Full description
- privs = {interlocking = true}, -- TODO
+ privs = {interlocking = true},
func = function(pname, param)
return advtrains.pcall(function()
if param=="" then
@@ -315,7 +315,7 @@ minetest.register_chatcommand("at_rp_back",
{
params = "", -- Short parameter description
description = "Remove last route segment", -- Full description
- privs = {interlocking = true}, -- Require the "privs" privilege to run
+ privs = {interlocking = true},
func = function(pname, param)
return advtrains.pcall(function()
local rp = player_rte_prog[pname]
@@ -336,7 +336,7 @@ minetest.register_chatcommand("at_rp_mark",
{
params = "", -- Short parameter description
description = "Re-set route programming markers", -- Full description
- privs = {interlocking = true}, -- TODO
+ privs = {interlocking = true},
func = function(pname, param)
return advtrains.pcall(function()
local rp = player_rte_prog[pname]
@@ -352,7 +352,7 @@ minetest.register_chatcommand("at_rp_discard",
{
params = "", -- Short parameter description
description = "Discards the currently programmed route", -- Full description
- privs = {interlocking = true}, -- Require the "privs" privilege to run
+ privs = {interlocking = true},
func = function(pname, param)
return advtrains.pcall(function()
player_rte_prog[pname] = nil
@@ -365,5 +365,4 @@ minetest.register_chatcommand("at_rp_discard",
--TODO on route setting
-- unify luaautomation get/setstate interface to the core
--- privileges for route programming
-- routes should end at signals. complete route setting by punching a signal, and command as exceptional route completion