diff options
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r-- | advtrains/init.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index 0882237..cc8f8d1 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -48,6 +48,9 @@ advtrains.IGNORE_WORLD = false local NO_SAVE = false -- Do not save any data to advtrains save files +advtrains.TRAIN_MAX_WAGONS = 20 +-- Limit on the maximum number of wagons that may be in a train + -- ========================================================================== -- Use a global slowdown factor to slow down train movements. Now a setting @@ -198,6 +201,8 @@ advtrains.meseconrules = advtrains.fpath=minetest.get_worldpath().."/advtrains" +advtrains.speed = dofile(advtrains.modpath.."/speed.lua") + dofile(advtrains.modpath.."/path.lua") dofile(advtrains.modpath.."/trainlogic.lua") dofile(advtrains.modpath.."/trainhud.lua") @@ -467,7 +472,7 @@ advtrains.avt_save = function(remove_players_from_wagons) "trainparts", "recently_collided_with_env", "atc_brake_target", "atc_wait_finish", "atc_command", "atc_delay", "door_open", "text_outside", "text_inside", "line", "routingcode", - "il_sections", "speed_restriction", "is_shunt", + "il_sections", "speed_restriction", "speed_restrictions_t", "is_shunt", "points_split", "autocouple", "atc_wait_autocouple", "ars_disable", }) --then save it @@ -753,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 |