aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAge
* Translated using Weblate (Arabic)abidin toumi2020-01-10
* Translated using Weblate (Ukrainian)Fixer2020-01-10
* Translated using Weblate (Russian)Andrei Stepanov2020-01-10
* Translated using Weblate (Arabic)abidin toumi2020-01-10
* Translated using Weblate (Arabic)abidin toumi2020-01-10
* Translated using Weblate (Russian)Andrei Stepanov2020-01-10
* Added translation using Weblate (Arabic)abidin toumi2020-01-10
* Translated using Weblate (Belarusian)Viktar Vauchkevich2020-01-10
* Translated using Weblate (French)Julien Maulny2020-01-10
* Translated using Weblate (Italian)Jacques Lagrange2020-01-10
* Translated using Weblate (Japanese (Kansai))Krock2020-01-10
* Translated using Weblate (Dhivehi)Krock2020-01-10
* Translated using Weblate (Chinese (Simplified))Krock2020-01-10
* Translated using Weblate (Burmese)Krock2020-01-10
* Translated using Weblate (Kyrgyz)Krock2020-01-10
* Translated using Weblate (Slovenian)Krock2020-01-10
* Translated using Weblate (Kannada)Krock2020-01-10
* Translated using Weblate (Kazakh)Krock2020-01-10
* Translated using Weblate (Norwegian Nynorsk)Krock2020-01-10
* Translated using Weblate (Italian)Krock2020-01-10
* Translated using Weblate (Hebrew)Krock2020-01-10
* Translated using Weblate (Hungarian)Krock2020-01-10
* Translated using Weblate (Estonian)Krock2020-01-10
* Translated using Weblate (Esperanto)Krock2020-01-10
* Translated using Weblate (Greek)Krock2020-01-10
* Translated using Weblate (Danish)Krock2020-01-10
* Translated using Weblate (Portuguese (Brazil))Krock2020-01-10
* Translated using Weblate (Filipino)Krock2020-01-10
* Translated using Weblate (Thai)Krock2020-01-10
* Translated using Weblate (Lithuanian)Krock2020-01-10
* Translated using Weblate (Lao)Krock2020-01-10
* Translated using Weblate (Italian)Allan Nordhøy2020-01-10
* Translated using Weblate (Polish)Mateusz Mendel2020-01-10
* Translated using Weblate (Spanish)Vicente Carrasco Alvarez2020-01-10
* Translated using Weblate (Polish)Mateusz Mendel2020-01-10
* Translated using Weblate (Malay)Muhammad Nur Hidayat Yasuyoshi2020-01-10
* Translated using Weblate (Swedish)Mattias Münster2020-01-10
* Translated using Weblate (Italian)Jacques Lagrange2020-01-10
* Translated using Weblate (Hungarian)Ács Zoltán2020-01-10
* Translated using Weblate (Portuguese)ssantos2020-01-10
* Translated using Weblate (Japanese)BreadW2020-01-10
* Translated using Weblate (German)Wuzzy2020-01-10
* Translated using Weblate (German)nautilusx2020-01-10
* Translated using Weblate (Turkish)monolifed2020-01-10
* Translated using Weblate (Turkish)Oguz Ersen2020-01-10
* Fix find_path for newer jsoncpp installationsWilliam Breathitt Gray2019-12-31
* Fix LocalPlayer-bound sound playback broken by 81c2370SmallJoker2019-12-31
* Fix item eat sound not played if last item (#9239)Wuzzy2019-12-31
* Fix spaces breaking formspec_version[] tagrubenwardy2019-12-31
* Use a safer implementation of gsub in core.chat_format_message (#9133)ANAND2019-12-31
pan class="hl opt">.ts_id if not c_ts_id then itab("-!- No track section adjacent to "..sigd_to_string(c_sigd)..". Please reconfigure route!") break end c_ts = ildb.get_ts(c_ts_id) c_rseg = route[i] c_lckp = {} itab(""..i.." "..sigd_to_string(c_sigd)) itab("= "..(c_ts and c_ts.name or "-").." =") if c_rseg.locks then for pts, state in pairs(c_rseg.locks) do local pos = minetest.string_to_pos(pts) itab("L "..pts.." -> "..state) if not advtrains.is_passive(pos) then itab("-!- No passive component at "..pts..". Please reconfigure route!") break end end end -- advance c_sigd = c_rseg.next i = i + 1 end if c_sigd then local e_tcbs = ildb.get_tcbs(c_sigd) local signame = "-" if e_tcbs and e_tcbs.signal then signame = e_tcbs.signal_name or "+" end itab("E "..sigd_to_string(c_sigd).." ("..signame..")") else itab("E (none)") end form = form.."textlist[0.5,2;3.5,3.9;rtelog;"..table.concat(tab, ",").."]" -- to the right of rtelog a signal aspect selection for the start signal form = form..F.label(4.5, 2, "Signal Aspect:") -- main aspect list local signalpos = tcbs.signal local ndef = signalpos and advtrains.ndb.get_ndef(signalpos) if ndef and ndef.advtrains and ndef.advtrains.main_aspects then local entries = { "<Default Aspect>" } local sel = 1 for i, mae in ipairs(ndef.advtrains.main_aspects) do entries[i+1] = mae.description if mae.name == route.main_aspect then sel = i+1 end end form = form..F.dropdown(4.5, 3.0, 4, "sa_main_aspect", entries, sel, true) -- checkbox for assign distant signal form = form..string.format("checkbox[4.5,4.0;sa_distant;Announce distant signal;%s]", route.assign_dst) end form = form.."button[0.5,6;1,1;prev;<<<]" form = form.."button[1.5,6;1,1;back;Back]" form = form.."button[2.5,6;1,1;next;>>>]" if route.smartroute_generated then form = form.."button[3.5,6;2,1;noautogen;Clr Autogen]" end form = form.."button[5.5,6;3,1;delete;Delete Route]" --atdebug(route.ars) form = form.."style[ars;font=mono]" form = form.."textarea[0.8,7.3;5,3;ars;ARS Rule List;"..atil.ars_to_text(route.ars).."]" form = form.."button[5.5,7.23;3,1;savears;Save ARS List]" minetest.show_formspec(pname, "at_il_routeedit_"..minetest.pos_to_string(sigd.p).."_"..sigd.s.."_"..routeid, form) end minetest.register_on_player_receive_fields(function(player, formname, fields) local pname = player:get_player_name() if not minetest.check_player_privs(pname, {train_operator=true, interlocking=true}) then return end local pts, connids, routeids = string.match(formname, "^at_il_routeedit_([^_]+)_(%d)_(%d+)$") local pos, connid, routeid if pts then pos = minetest.string_to_pos(pts) connid = tonumber(connids) routeid = tonumber(routeids) if not connid or connid<1 or connid>2 then return end if not routeid then return end end if pos and connid and routeid and not fields.quit then local sigd = {p=pos, s=connid} local tcbs = ildb.get_tcbs(sigd) if not tcbs then return end local route = tcbs.routes[routeid] if not route then return end if fields.prev then atil.show_route_edit_form(pname, sigd, routeid - 1) return end if fields.next then atil.show_route_edit_form(pname, sigd, routeid + 1) return end if fields.setname and fields.name then route.name = fields.name end if fields.sa_main_aspect then local idx = tonumber(fields.sa_main_aspect) route.main_aspect = nil if idx > 1 then local signalpos = tcbs.signal local ndef = signalpos and advtrains.ndb.get_ndef(signalpos) if ndef and ndef.advtrains and ndef.advtrains.main_aspects then route.main_aspect = ndef.advtrains.main_aspects[idx - 1].name end end end if fields.sa_distant then route.assign_dst = minetest.is_yes(fields.sa_distant) end if fields.noautogen then route.smartroute_generated = nil end if fields.delete then -- if something set the route in the meantime, make sure this doesn't break. atil.route.update_route(sigd, tcbs, nil, true) table.remove(tcbs.routes, routeid) advtrains.interlocking.show_signalling_form(sigd, pname) end if fields.ars and fields.savears then route.ars = atil.text_to_ars(fields.ars) --atdebug(route.ars) end if fields.back then advtrains.interlocking.show_signalling_form(sigd, pname) end end end)