aboutsummaryrefslogtreecommitdiff
path: root/advtrains/protection.lua
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2023-10-04 15:45:02 +0200
committerY. Wang <yw05@forksworld.de>2023-10-04 15:45:02 +0200
commita13c2800977af76824afd8d80aecca10e55a6c44 (patch)
tree3a465d3a9c810450c99dbae233e8b8ad75268202 /advtrains/protection.lua
parentabf1a9f99a2f33c2442fd8f01b70b54683d7ded2 (diff)
downloadadvtrains-a13c2800977af76824afd8d80aecca10e55a6c44.tar.gz
advtrains-a13c2800977af76824afd8d80aecca10e55a6c44.tar.bz2
advtrains-a13c2800977af76824afd8d80aecca10e55a6c44.zip
Begin transition to .po files
Diffstat (limited to 'advtrains/protection.lua')
-rw-r--r--advtrains/protection.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/advtrains/protection.lua b/advtrains/protection.lua
index 83ead86..89e15eb 100644
--- a/advtrains/protection.lua
+++ b/advtrains/protection.lua
@@ -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, attrans.nopriv("track_builder", "build "..nears.."tracks"))
+ 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, attrans("You are not allowed to build "..nears.."tracks at this 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, attrans.nopriv("railway_operator", "operate turnouts and signals"))
+ 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