aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2024-02-06 23:06:38 +0100
committerorwell <orwell@bleipb.de>2024-02-06 23:06:38 +0100
commit2ea4a8cff1d8e335fda472e4c7988424ca522610 (patch)
treeebb14ce0f330e0f569b0740c707617cabae817d6 /advtrains
parent9fac1db45f79e2312415500b6ec9d22a8edb0cdd (diff)
downloadadvtrains-2ea4a8cff1d8e335fda472e4c7988424ca522610.tar.gz
advtrains-2ea4a8cff1d8e335fda472e4c7988424ca522610.tar.bz2
advtrains-2ea4a8cff1d8e335fda472e4c7988424ca522610.zip
Add chatcommand and luaatc function to get global_slowdown
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/init.lua10
1 files changed, 10 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