diff options
author | orwell <orwell@bleipb.de> | 2024-11-09 21:55:52 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-11-09 21:55:52 +0100 |
commit | 96f4ac7f6c2ff7fae56102640e9e63305ca64b16 (patch) | |
tree | b281c20dc8c2b55875a5c561d8c4dcadb836d53b /advtrains/protection.lua | |
parent | 35167fe928e61ecf35c633014972e36c921a1b78 (diff) | |
parent | 943505a797e628ef8e447a8fdb362f777b325dec (diff) | |
download | advtrains-96f4ac7f6c2ff7fae56102640e9e63305ca64b16.tar.gz advtrains-96f4ac7f6c2ff7fae56102640e9e63305ca64b16.tar.bz2 advtrains-96f4ac7f6c2ff7fae56102640e9e63305ca64b16.zip |
Merge remote-tracking branch 'origin/l10n'
Diffstat (limited to 'advtrains/protection.lua')
-rw-r--r-- | advtrains/protection.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/advtrains/protection.lua b/advtrains/protection.lua index 7474977..ac1cd66 100644 --- a/advtrains/protection.lua +++ b/advtrains/protection.lua @@ -4,24 +4,24 @@ -- Privileges to control TRAIN DRIVING/COUPLING minetest.register_privilege("train_operator", { - description = "Without this privilege, a player can't do anything about trains, neither place or remove them nor drive or couple them (but he can build tracks if he has track_builder)", + description = attrans("Can place, remove and operate trains"), give_to_singleplayer= true, }); minetest.register_privilege("train_admin", { - description = "Player may drive, place or remove any trains from/to anywhere, regardless of owner, whitelist or protection", + description = attrans("Can place, remove and operate any train, regardless of owner, whitelist, or protection"), give_to_singleplayer= true, }); -- Privileges to control TRACK BUILDING minetest.register_privilege("track_builder", { - description = "Player can place and/or dig rails not protected from him. If he also has protection_bypass, he can place/dig any rails", + description = attrans("Can place and dig tracks in unprotected areas"), give_to_singleplayer= true, }); -- Privileges to control OPERATING TURNOUTS/SIGNALS minetest.register_privilege("railway_operator", { - description = "Player can operate turnouts and signals not protected from him. If he also has protection_bypass, he can operate any turnouts/signals", + description = attrans("Can operate turnouts and signals in unprotected areas"), give_to_singleplayer= true, }); @@ -145,12 +145,12 @@ function advtrains.check_track_protection(pos, pname, near, prot_p) --atdebug("CTP: ",pos,pname,near,prot_p,"priv=",priv,"prot=",prot,"dprot=",dprot) if not priv and (not boo or prot or not dprot) then - minetest.chat_send_player(pname, "You are not allowed to build "..nears.."tracks without track_builder privilege") + minetest.chat_send_player(pname, near and attrans("You are not allowed to build near tracks without the track_builder privilege.") or attrans("You are not allowed to build tracks without the track_builder privilege.")) minetest.log("action", pname.." tried to modify terrain "..nears.."track at "..minetest.pos_to_string(apos).." but is not permitted to (no privilege)") return false end if prot then - minetest.chat_send_player(pname, "You are not allowed to build "..nears.."tracks at protected position!") + minetest.chat_send_player(pname, near and attrans("You are not allowed to build near tracks at this protected position.") or attrans("You are not allowed to build tracks at this protected position.")) minetest.record_protection_violation(pos, pname) minetest.log("action", pname.." tried to modify "..nears.."track at "..minetest.pos_to_string(apos).." but position is protected!") return false @@ -181,7 +181,7 @@ function advtrains.check_turnout_signal_protection(pos, pname) nocheck=false return true else - minetest.chat_send_player(pname, "You are not allowed to operate turnouts and signals (missing railway_operator privilege)") + minetest.chat_send_player(pname, attrans("You are not allowed to operate turnouts and signals without the railway_operator privilege.")) minetest.log("action", pname.." tried to operate turnout/signal at "..minetest.pos_to_string(pos).." but does not have railway_operator") nocheck=false return false |