aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/locale/advtrains.cs.tr5
-rw-r--r--advtrains/track_reg_helper.lua36
-rw-r--r--advtrains_interlocking/smartroute.lua12
3 files changed, 41 insertions, 12 deletions
diff --git a/advtrains/locale/advtrains.cs.tr b/advtrains/locale/advtrains.cs.tr
index 1e90c3a..ec72895 100644
--- a/advtrains/locale/advtrains.cs.tr
+++ b/advtrains/locale/advtrains.cs.tr
@@ -28,6 +28,7 @@ Allow these players to access your wagon:=Dovolit těmto hráčským postavám
Andrew's Cross=výstražný kříž
Assign a signal=Přiřadit signál
Assigned distant signal to the main signal at @1=Předzvěst přiřazena hlavnímu signálu na pozici @1
+Assigned signal to the TCB at @1=Návěstidlo připojeno k TCB na pozici @1
Automatic routesetting=ARS
Automatic Working is active.=Automatika je aktivní.
BBÖ 1080=zelená elektrická lokomotiva (výkonná)
@@ -44,7 +45,7 @@ Can not couple: The couplers of the trains do not match (@1 and @2).=Vagony nelz
Can't get on: @1=Nelze nastoupit: @1
Can't get on: wagon full or doors closed!=Nelze nastoupit, protože všechny dveře jsou zavřené!
Can't place: Not enough slope items left (@1 required)=Kolej nelze umístit: V inventáři nemáte dostatek dílů na celý svah (jsou požadovány @1)
-Can't place: There's no slope of length @1=Kolej nelze umístit: Není tu svah o délce @1
+Can't place: There's no slope of length @1=Kolej nelze umístit: Svah o délce @1 neexistuje
Can't place: no supporting node at upper end.=Kolej nelze umístit: chybí podpora na horním konci svahu.
Can't place: not pointing at node=Kolej nelze umístit: chybí podloží
Can't place: protected position!=Kolej nelze umístit: prostor je chráněn!
@@ -181,6 +182,7 @@ Next Stop:=Příští zastávka/stanice:
No info=Bez informace
No Link=Žádné spojení
No route locks set=Žádné vlakové cesty
+No routes are yet defined.=Zatím žádné vlakové cesty
No trains on this section.=Žádné vlaky
Not allowed to do this.=Toto vám není dovoleno.
Not allowed to edit station name, owned by @1=Nemůžete měnit název stanice, protože ta patří: @1
@@ -294,6 +296,7 @@ Trains on this section:=Vlaky v tomto úseku:
Trains stopping here (ARS rules)=Vlaky zastavující zde (ARS)
Tram=tramvaj
Unassign Signal=Odpojit signál
+Unconfigured ATC controller=nenastavený řídicí obvod ATC
Unconfigured Track Circuit Break, right-click to assign.=Nenastavená hranice traťových oddílů (TCB), pravý klik pro přiřazení.
Unknown Station=Neznámá zastávka
Unlink selected TCB=Odpojit zvolenou TCB
diff --git a/advtrains/track_reg_helper.lua b/advtrains/track_reg_helper.lua
index 97ab069..f2ada81 100644
--- a/advtrains/track_reg_helper.lua
+++ b/advtrains/track_reg_helper.lua
@@ -531,7 +531,7 @@ function advtrains.register_tracks(tracktype, def, preset)
inventory_image = def.texture_prefix.."_placer.png",
wield_image = def.texture_prefix.."_placer.png",
groups={advtrains_trackplacer=1, digtron_on_place=1},
- liquids_pointable = false,
+ liquids_pointable = true,
on_place = function(itemstack, placer, pointed_thing)
local name = placer:get_player_name()
if not name then
@@ -543,8 +543,19 @@ function advtrains.register_tracks(tracktype, def, preset)
if not advtrains.check_track_protection(pos, name) then
return itemstack, false
end
- if minetest.registered_nodes[minetest.get_node(pos).name] and minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
- local s = minetest.registered_nodes[minetest.get_node(upos).name] and minetest.registered_nodes[minetest.get_node(upos).name].walkable
+ local node = core.get_node(pos)
+ local nname = node.name
+ local ndef = core.registered_nodes[nname]
+ if ndef ~= nil and ndef.buildable_to then
+ local s
+ if def.suitable_substrate ~= nil then
+ s = def.suitable_substrate(upos)
+ else
+ local unode = core.get_node(upos)
+ local uname = unode.name
+ local udef = core.registered_nodes[uname]
+ s = udef ~= nil and udef.walkable
+ end
if s then
-- minetest.chat_send_all(nnprefix)
local yaw = placer:get_look_horizontal()
@@ -694,6 +705,21 @@ function sl.register_placer(def, preset)
on_place = sl.create_slopeplacer_on_place(def, preset)
})
end
+
+local function check_slope_exists(nodename_prefix, lookup, step)
+ if not lookup[step] then
+ return false
+ end
+ local placenodes = lookup[step]
+ while step > 0 do
+ if core.registered_nodes[nodename_prefix.."_"..placenodes[step]] == nil then
+ return false
+ end
+ step=step-1
+ end
+ return true
+end
+
--(itemstack, placer, pointed_thing)
function sl.create_slopeplacer_on_place(def, preset)
return function(istack, player, pt)
@@ -748,7 +774,7 @@ function sl.create_slopeplacer_on_place(def, preset)
--next node solid?
if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].buildable_to or advtrains.is_protected(pos, player:get_player_name()) then
--do slopes of this distance exist?
- if lookup[step] then
+ if check_slope_exists(def.nodename_prefix, lookup, step) then
if minetest.settings:get_bool("creative_mode") or istack:get_count()>=step then
--start placing
local placenodes=lookup[step]
@@ -772,7 +798,7 @@ function sl.create_slopeplacer_on_place(def, preset)
pos=vector.add(pos, dirvec)
end
minetest.chat_send_player(player:get_player_name(), attrans("Can't place: no supporting node at upper end."))
- return itemstack
+ return istack
end
end
diff --git a/advtrains_interlocking/smartroute.lua b/advtrains_interlocking/smartroute.lua
index f03ece0..d57a0c8 100644
--- a/advtrains_interlocking/smartroute.lua
+++ b/advtrains_interlocking/smartroute.lua
@@ -140,10 +140,10 @@ local players_smartroute_actions = {}
function sr.propose_next(pname, sigd, find_more_than, searching_shunt)
local tcbs = ildb.get_tcbs(sigd)
if not tcbs or not tcbs.routes then
- minetest.chat_send_player(pname, "Smartroute: TCBS or routes don't exist here!")
+ minetest.chat_send_player(pname, "Hledání cesty: Zde neexistují hranice úseků ani cesty!")
return
elseif not tcbs.ts_id then
- minetest.chat_send_player(pname, "Smartroute: No track section directly ahead!")
+ minetest.chat_send_player(pname, "Hledání cesty: Kupředu není žádný úsek!")
return
end
-- Step 1: search for routes using the current settings
@@ -155,14 +155,14 @@ function sr.propose_next(pname, sigd, find_more_than, searching_shunt)
found_routes = found_routes
}
-- step 3: build form
- local form = "size[5,5]label[0,0;Route search: "..#found_routes.." found]"
+ local form = "size[5,5]label[0,0;Hledání cesty: "..#found_routes.." cest nalezeno]"
local tab = {}
for idx, froute in ipairs(found_routes) do
- tab[idx] = minetest.formspec_escape(froute.name.." (Len="..#froute.tcbseq..")")
+ tab[idx] = minetest.formspec_escape(froute.name.." (Délka="..#froute.tcbseq..")")
end
form=form.."textlist[0.5,1;4,3;rtelist;"..table.concat(tab, ",").."]"
- form=form.."button[0.5,4;2,1;continue;Search further]"
- form=form.."button[2.5,4;2,1;apply;Apply]"
+ form=form.."button[0.5,4;2,1;continue;Hledat dál]"
+ form=form.."button[2.5,4;2,1;apply;Použít]"
minetest.show_formspec(pname, "at_il_smartroute_propose", form)
end