aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/init.lua10
-rw-r--r--advtrains_luaautomation/environment.lua3
2 files changed, 13 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua
index 9c977eb..cc8f8d1 100644
--- a/advtrains/init.lua
+++ b/advtrains/init.lua
@@ -758,6 +758,16 @@ minetest.register_chatcommand("at_disable_step",
end,
})
+minetest.register_chatcommand("at_status",
+ {
+ params = "",
+ description = "Print advtrains status info",
+ privs = {train_operator = true},
+ func = function(name, param)
+ return true, advtrains.print_concat_table({"Advtrains Status: no_action",no_action,"slowdown",advtrains.global_slowdown,"(log",math.log(advtrains.global_slowdown),")"})
+ end,
+})
+
advtrains.is_no_action = function()
return no_action
end
diff --git a/advtrains_luaautomation/environment.lua b/advtrains_luaautomation/environment.lua
index d85bedc..9fcba1d 100644
--- a/advtrains_luaautomation/environment.lua
+++ b/advtrains_luaautomation/environment.lua
@@ -164,6 +164,9 @@ local static_env = {
return false
end
end,
+ get_slowdown = function()
+ return advtrains.global_slowdown
+ end
}
-- If interlocking is present, enable route setting functions