Add chatcommand and luaatc function to get global_slowdown
This commit is contained in:
parent
9fac1db45f
commit
2ea4a8cff1
|
@ -758,6 +758,16 @@ minetest.register_chatcommand("at_disable_step",
|
||||||
end,
|
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()
|
advtrains.is_no_action = function()
|
||||||
return no_action
|
return no_action
|
||||||
end
|
end
|
||||||
|
|
|
@ -164,6 +164,9 @@ local static_env = {
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
get_slowdown = function()
|
||||||
|
return advtrains.global_slowdown
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- If interlocking is present, enable route setting functions
|
-- If interlocking is present, enable route setting functions
|
||||||
|
|
Loading…
Reference in New Issue