aboutsummaryrefslogtreecommitdiff
path: root/advtrains/advtrains_train_japan/init.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-01-23 21:29:59 +0100
committerorwell96 <mono96.mml@gmail.com>2017-01-23 21:29:59 +0100
commitfac8b518c940176f4d644638b1c801c2c113f872 (patch)
tree6eca418e83f45e9650086a3ec88d7b957e676f07 /advtrains/advtrains_train_japan/init.lua
parent795065979874a976f27f4711968ea17c79a97f2b (diff)
downloadadvtrains-fac8b518c940176f4d644638b1c801c2c113f872.tar.gz
advtrains-fac8b518c940176f4d644638b1c801c2c113f872.tar.bz2
advtrains-fac8b518c940176f4d644638b1c801c2c113f872.zip
Add intllib support and German translation
Diffstat (limited to 'advtrains/advtrains_train_japan/init.lua')
-rw-r--r--advtrains/advtrains_train_japan/init.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/advtrains/advtrains_train_japan/init.lua b/advtrains/advtrains_train_japan/init.lua
index 47f50cf..a0c82cd 100644
--- a/advtrains/advtrains_train_japan/init.lua
+++ b/advtrains/advtrains_train_japan/init.lua
@@ -1,3 +1,10 @@
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
+else
+ S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
+end
+
advtrains.register_wagon("engine_japan", {
mesh="advtrains_engine_japan.b3d",
textures = {"advtrains_engine_japan.png"},
@@ -5,7 +12,7 @@ advtrains.register_wagon("engine_japan", {
max_speed=20,
seats = {
{
- name="Default Seat (driver stand)",
+ name=S("Driver stand"),
attach_offset={x=0, y=10, z=0},
view_offset={x=0, y=6, z=0},
driving_ctrl_access=true,
@@ -16,7 +23,7 @@ advtrains.register_wagon("engine_japan", {
is_locomotive=true,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 4"},
-}, "Japanese Train Engine", "advtrains_engine_japan_inv.png")
+}, S("Japanese Train Engine"), "advtrains_engine_japan_inv.png")
advtrains.register_wagon("wagon_japan", {
mesh="advtrains_wagon_japan.b3d",
@@ -25,7 +32,7 @@ advtrains.register_wagon("wagon_japan", {
max_speed=20,
seats = {
{
- name="Default Seat",
+ name=S("Default Seat"),
attach_offset={x=0, y=10, z=0},
view_offset={x=0, y=6, z=0},
},
@@ -34,5 +41,5 @@ advtrains.register_wagon("wagon_japan", {
wagon_span=2.3,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 4"},
-}, "Japanese Train Wagon", "advtrains_wagon_japan_inv.png")
+}, S("Japanese Train Wagon"), "advtrains_wagon_japan_inv.png")