aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/pcnaming.lua
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2024-11-09 21:55:52 +0100
committerorwell <orwell@bleipb.de>2024-11-09 21:55:52 +0100
commit96f4ac7f6c2ff7fae56102640e9e63305ca64b16 (patch)
treeb281c20dc8c2b55875a5c561d8c4dcadb836d53b /advtrains_luaautomation/pcnaming.lua
parent35167fe928e61ecf35c633014972e36c921a1b78 (diff)
parent943505a797e628ef8e447a8fdb362f777b325dec (diff)
downloadadvtrains-96f4ac7f6c2ff7fae56102640e9e63305ca64b16.tar.gz
advtrains-96f4ac7f6c2ff7fae56102640e9e63305ca64b16.tar.bz2
advtrains-96f4ac7f6c2ff7fae56102640e9e63305ca64b16.zip
Merge remote-tracking branch 'origin/l10n'
Diffstat (limited to 'advtrains_luaautomation/pcnaming.lua')
-rw-r--r--advtrains_luaautomation/pcnaming.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/advtrains_luaautomation/pcnaming.lua b/advtrains_luaautomation/pcnaming.lua
index 5624b74..0089ae7 100644
--- a/advtrains_luaautomation/pcnaming.lua
+++ b/advtrains_luaautomation/pcnaming.lua
@@ -2,6 +2,8 @@
--a.k.a Passive component naming
--Allows to assign names to passive components, so they can be called like:
--setstate("iamasignal", "green")
+local S = atltrans
+
atlatc.pcnaming={name_map={}}
function atlatc.pcnaming.load(stuff)
if type(stuff)=="table" then
@@ -26,7 +28,7 @@ end
local pcrename = {}
minetest.register_craftitem("advtrains_luaautomation:pcnaming",{
- description = attrans("Passive Component Naming Tool\n\nRight-click to name a passive component."),
+ description = S("Passive Component Naming Tool\n\nRight-click to name a passive component."),
groups = {cracky=1}, -- key=name, value=rating; rating=1..3.
inventory_image = "atlatc_pcnaming.png",
wield_image = "atlatc_pcnaming.png",
@@ -37,7 +39,7 @@ minetest.register_craftitem("advtrains_luaautomation:pcnaming",{
return
end
if not minetest.check_player_privs(pname, {atlatc=true}) then
- minetest.chat_send_player(pname, "Missing privilege: atlatc")
+ minetest.chat_send_player(pname, S("You are not allowed to name LuaATC passive components without the @1 privilege.", "atlatc"))
return
end
if pointed_thing.type=="node" then
@@ -62,7 +64,7 @@ minetest.register_craftitem("advtrains_luaautomation:pcnaming",{
end
end
pcrename[pname] = pos
- minetest.show_formspec(pname, "atlatc_naming", "field[pn;Set name of component (empty to clear);"..minetest.formspec_escape(pn).."]")
+ minetest.show_formspec(pname, "atlatc_naming", "field[pn;"..S("Set name of component (empty to clear)")..";"..minetest.formspec_escape(pn).."]")
end
end
end,