aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-01-28 17:06:38 +0100
committerorwell96 <mono96.mml@gmail.com>2017-01-28 17:58:19 +0100
commit724b03abb983eb93c124cef6039bcf2ea4125335 (patch)
treed29d19070f948d4ade4537a2962c3c5adc5fe321
parent83c859b13a3910cf28c03da00fddbc336b33b383 (diff)
downloadadvtrains-724b03abb983eb93c124cef6039bcf2ea4125335.tar.gz
advtrains-724b03abb983eb93c124cef6039bcf2ea4125335.tar.bz2
advtrains-724b03abb983eb93c124cef6039bcf2ea4125335.zip
Fix a crash, update translations and zip file
-rw-r--r--advtrains.zipbin4920446 -> 4922848 bytes
-rw-r--r--advtrains/advtrains/locale/de.txt11
-rw-r--r--advtrains/advtrains/trainlogic.lua4
-rw-r--r--advtrains/advtrains/wagons.lua25
4 files changed, 25 insertions, 15 deletions
diff --git a/advtrains.zip b/advtrains.zip
index e5357c9..58f0f63 100644
--- a/advtrains.zip
+++ b/advtrains.zip
Binary files differ
diff --git a/advtrains/advtrains/locale/de.txt b/advtrains/advtrains/locale/de.txt
index 5d67cd2..c8aaab7 100644
--- a/advtrains/advtrains/locale/de.txt
+++ b/advtrains/advtrains/locale/de.txt
@@ -37,5 +37,14 @@ Detector Rail = Detektorschiene
Speed: = Geschw.:
Target: = Zielges.:
@1 Slope = @1 Steigung
-
+Can't get on: wagon full or doors closed! = Kann nicht einsteigen: Waggon voll oder Türen geschlossen.
+Use shift+click to open doors forcefully! = Nutze Sneak+Rechtsklick, um die Türnotöffnung zu aktivieren und trotzdem einzusteigen.
+Lock couples = Kupplungen sperren
+Save wagon properties = Waggon-Einstellungen speichern
+Doors are closed! Use shift-rightclick to open doors with force and get off! = Türen sind geschlossen! Sneak+Rechtsklick, um die Türnotöffnung zu aktivieren und trotzdem auszusteigen.
+Wagon properties = Waggon-Einstellungen
+Get off = Aussteigen
+Get off (forced) = Aussteigen (erzwingen)
+(Doors closed) = (Türen geschlossen)
+Access to @1 = Zugang zu @1
diff --git a/advtrains/advtrains/trainlogic.lua b/advtrains/advtrains/trainlogic.lua
index b1ee31a..7238d92 100644
--- a/advtrains/advtrains/trainlogic.lua
+++ b/advtrains/advtrains/trainlogic.lua
@@ -731,7 +731,7 @@ end
function advtrains.invert_train(train_id)
local train=advtrains.trains[train_id]
- local old_path=advtrains.get_or_create_path(train_id, train)
+ local old_path=train.path
train.path={}
train.index= - advtrains.get_train_end_index(train)
train.velocity=-train.velocity
@@ -756,7 +756,7 @@ function advtrains.is_train_at_pos(pos)
if le and le.is_wagon and le.initialized and le.train_id and not checked_trains[le.train_id] then
--atprint("istrainat: checking "..le.train_id)
checked_trains[le.train_id]=true
- local path=advtrains.get_or_create_path(le.train_id, le:train())
+ local path=le:train().path
if path then
--atprint("has path")
for i=math.floor(advtrains.get_train_end_index(le:train())+0.5),math.floor(le:train().index+0.5) do
diff --git a/advtrains/advtrains/wagons.lua b/advtrains/advtrains/wagons.lua
index 728a5eb..9d63ab5 100644
--- a/advtrains/advtrains/wagons.lua
+++ b/advtrains/advtrains/wagons.lua
@@ -90,7 +90,7 @@ function wagon:init_from_wagon_save(uid)
end
self:init_shared()
self.initialized=true
- minetest.after(1, function() self:reattach_all() end)
+ minetest.after(0.2, function() self:reattach_all() end)
atprint("init_from_wagon_save "..self.unique_id.." ("..self.train_id..")")
end
function wagon:init_shared()
@@ -453,18 +453,18 @@ function wagon:on_rightclick(clicker)
end
end
if self.has_inventory and self.get_inventory_formspec then
- poss[#poss+1]={name="Show inventory", key="inv"}
+ poss[#poss+1]={name=attrans("Show Inventory"), key="inv"}
end
if self.owner==pname then
- poss[#poss+1]={name="Wagon properties", key="prop"}
+ poss[#poss+1]={name=attrans("Wagon properties"), key="prop"}
end
if not self.seat_groups[sgr].require_doors_open or self:train().door_open~=0 then
- poss[#poss+1]={name="Get off", key="off"}
+ poss[#poss+1]={name=attrans("Get off"), key="off"}
else
if clicker:get_player_control().sneak then
- poss[#poss+1]={name="Get off (forced)", key="off"}
+ poss[#poss+1]={name=attrans("Get off (forced)"), key="off"}
else
- poss[#poss+1]={name="(Doors closed)", key="dcwarn"}
+ poss[#poss+1]={name=attrans("(Doors closed)"), key="dcwarn"}
end
end
if #poss==0 then
@@ -501,8 +501,8 @@ function wagon:on_rightclick(clicker)
end
end
end
- minetest.chat_send_player(pname, "Can't get on: wagon full or doors closed!")
- minetest.chat_send_player(pname, "Use shift+click to open doors forcefully!")
+ minetest.chat_send_player(pname, attrans("Can't get on: wagon full or doors closed!"))
+ minetest.chat_send_player(pname, attrans("Use shift+click to open doors forcefully!"))
else
self:show_get_on_form(pname)
end
@@ -607,11 +607,12 @@ function wagon:show_wagon_properties(pname)
local form="size[5,"..(#self.seat_groups*1.5+5).."]"
local at=0
for sgr,sgrdef in pairs(self.seat_groups) do
- form=form.."field[0.5,"..(0.5+at*1.5)..";4,1;sgr_"..sgr..";"..sgrdef.name..";"..(self.seat_access[sgr] or "").."]"
+ local text = attrans("Access to @1",sgrdef.name)
+ form=form.."field[0.5,"..(0.5+at*1.5)..";4,1;sgr_"..sgr..";"..text..";"..(self.seat_access[sgr] or "").."]"
at=at+1
end
- form=form.."checkbox[0,"..(at*1.5)..";lock_couples;Lock couples;"..(self.lock_couples and "true" or "false").."]"
- form=form.."button_exit[0.5,"..(1+at*1.5)..";4,1;save;Save wagon properties]"
+ form=form.."checkbox[0,"..(at*1.5)..";lock_couples;"..attrans("Lock couples")..";"..(self.lock_couples and "true" or "false").."]"
+ form=form.."button_exit[0.5,"..(1+at*1.5)..";4,1;save;"..attrans("Save wagon properties").."]"
minetest.show_formspec(pname, "advtrains_prop_"..self.unique_id, form)
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
@@ -690,7 +691,7 @@ function wagon:seating_from_key_helper(pname, fields, no)
self:show_wagon_properties(pname)
end
if fields.dcwarn then
- minetest.chat_send_player(pname, "Doors are closed! Use shift-rightclick to open doors with force and get off!")
+ minetest.chat_send_player(pname, attrans("Doors are closed! Use shift-rightclick to open doors with force and get off!"))
end
if fields.off then
self:get_off(no)