diff options
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r-- | advtrains_luaautomation/atc_rail.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua index dd26f51..594de5c 100644 --- a/advtrains_luaautomation/atc_rail.lua +++ b/advtrains_luaautomation/atc_rail.lua @@ -2,6 +2,9 @@ -- registers and handles the ATC rail. Active component. -- This is the only component that can interface with trains, so train interface goes here too. +-- Get current translator +local S = atlatc.translate + --Using subtable local r={} @@ -62,7 +65,7 @@ function r.fire_event(pos, evtdata, appr_internal) local new_id = advtrains.split_train_at_index(train, index) if new_id then minetest.after(1,advtrains.atc.train_set_command,advtrains.trains[new_id], cmd, atc_arrow) - return true + return new_id end return false end, @@ -73,7 +76,7 @@ function r.fire_event(pos, evtdata, appr_internal) if new_id then minetest.after(1,advtrains.atc.train_set_command,advtrains.trains[new_id], cmd, atc_arrow) end - return fc or "" + return (fc or ""), new_id end, split_off_locomotive = function(cmd, len) assertt(cmd, "string") @@ -81,7 +84,8 @@ function r.fire_event(pos, evtdata, appr_internal) local new_id, fc = advtrains.split_train_at_fc(train, true, len) if new_id then minetest.after(1,advtrains.atc.train_set_command,advtrains.trains[new_id], cmd, atc_arrow) - end + end + return (fc or ""), new_id end, train_length = function () if not train_id then return false end @@ -228,7 +232,7 @@ advtrains.register_tracks("default", { models_prefix="advtrains_dtrack", models_suffix=".b3d", shared_texture="advtrains_dtrack_shared_atc.png", - description=atltrans("LuaATC Track"), + description=S("LuaATC Track"), formats={}, get_additional_definiton = function(def, preset, suffix, rotation) return { |