Skip to content

Commit

Permalink
Merge pull request #16 from Xanthin/trafficlight
Browse files Browse the repository at this point in the history
translation for trafficlight
  • Loading branch information
Christian authored and Christian committed Apr 16, 2014
2 parents cb5dfab + a106606 commit 01d5189
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
9 changes: 9 additions & 0 deletions streetsmod/locale/de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ Street lamp=Strassenlampe
Concrete wall=Betonwand
Concrete=Beton
Trafficlight=Ampel
Cheater=Schummler
Cheater!=Schummler!
Off=Aus
Channel=Kanal
green=Gruen
red=Rot
warn=Warnung
off=Aus
U cheater U=Du Schummler Du
9 changes: 9 additions & 0 deletions streetsmod/locale/template.txt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ Street lamp=
Concrete wall=
Concrete=
Trafficlight=
Cheater=
Cheater!=
Off=
Channel=
green=
red=
warn=
off=
U cheater U=
8 changes: 4 additions & 4 deletions trafficlight/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ minetest.register_node(":streets:trafficlight_controller",{
minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:trafficlight_top_off",param2 = minetest.dir_to_facedir(placer:get_look_dir())})
local meta = minetest.get_meta({x = pos.x, y = pos.y - 2, z = pos.z})
meta:set_string("channel","")
meta:set_string("infotext","Off")
meta:set_string("formspec","field[channel;Channel;${channel}]")
meta:set_string("infotext",S("Off"))
meta:set_string("formspec","field[channel;"..S("Channel")..";${channel}]")
end,
after_dig_node = function(pos)
minetest.remove_node({x = pos.x, y = pos.y + 2, z = pos.z})
Expand All @@ -85,7 +85,7 @@ minetest.register_node(":streets:trafficlight_controller",{
local meta = minetest.get_meta(pos)
local state = meta:get_string("infotext")
if msg == "green" or msg == "red" or msg == "warn" or msg == "off" then
meta:set_string("infotext",msg)
meta:set_string("infotext",S(msg))
local facedir = minetest.get_node({x = pos.x, y = pos.y + 4, z = pos.z}).param2
-- Modify <pos> to the top node of the trafficlight
pos.y = pos.y + 4
Expand Down Expand Up @@ -241,4 +241,4 @@ minetest.register_craft({
{"dye:yellow","",""},
{"dye:green","",""}
}
})
})

0 comments on commit 01d5189

Please sign in to comment.