diff options
author | orwell <orwell@bleipb.de> | 2024-11-11 20:50:28 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-11-11 20:50:28 +0100 |
commit | 380c26f7a851f4b4edb3879b544a542e7bfbb490 (patch) | |
tree | 158ac366c93a8581f5792f95eba6932bafe4c325 /advtrains_interlocking/tsr_rail.lua | |
parent | 29180f0f60871f92889f686fe666c029ac07861a (diff) | |
parent | 3d2d19f6f7eba90f0d19b002824b2ff466567608 (diff) | |
download | advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.tar.gz advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.tar.bz2 advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.zip |
Merge branch 'master' into route_prog_rework
Diffstat (limited to 'advtrains_interlocking/tsr_rail.lua')
-rw-r--r-- | advtrains_interlocking/tsr_rail.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/advtrains_interlocking/tsr_rail.lua b/advtrains_interlocking/tsr_rail.lua index f302540..c1e3c1c 100644 --- a/advtrains_interlocking/tsr_rail.lua +++ b/advtrains_interlocking/tsr_rail.lua @@ -3,13 +3,15 @@ -- Simple rail whose only purpose is to place a TSR on the position, as a temporary solution until the timetable system covers everything. -- This code resembles the code in lines/stoprail.lua +local S = attrans + local function updateform(pos) local meta = minetest.get_meta(pos) local pe = advtrains.encode_pos(pos) local npr = advtrains.interlocking.npr_rails[pe] or 2 - meta:set_string("infotext", "Point speed restriction: "..npr) - meta:set_string("formspec", "field[npr;Set point speed restriction:;"..npr.."]") + meta:set_string("infotext", S("Point speed restriction: @1",npr)) + meta:set_string("formspec", "field[npr;"..S("Set point speed restriction:")..";"..npr.."]") end @@ -25,11 +27,11 @@ local adefunc = function(def, preset, suffix, rotation) on_receive_fields = function(pos, formname, fields, player) local pname = player:get_player_name() if not minetest.check_player_privs(pname, {interlocking=true}) then - minetest.chat_send_player(pname, "Interlocking privilege required!") + minetest.chat_send_player(pname, S("You are not allowed to configure this track without the @1 privilege.", "interlocking")) return end if minetest.is_protected(pos, pname) then - minetest.chat_send_player(pname, "This rail is protected!") + minetest.chat_send_player(pname, S("You are not allowed to configure this track.")) minetest.record_protection_violation(pos, pname) return end @@ -59,7 +61,7 @@ if minetest.get_modpath("advtrains_train_track") ~= nil then models_prefix="advtrains_dtrack", models_suffix=".b3d", shared_texture="advtrains_dtrack_shared_npr.png", - description="Point Speed Restriction Rail", + description=S("Point Speed Restriction Track"), formats={}, get_additional_definiton = adefunc, }, advtrains.trackpresets.t_30deg_straightonly) |