diff options
author | Singularis <singularis@volny.cz> | 2025-01-15 13:01:00 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2025-05-27 20:22:01 +0200 |
commit | 191b2031883fe80d921e033b87d3c0e727abf86d (patch) | |
tree | 3f6baa4f3b6acba9c850a1f3432298d95d47db19 /advtrains_line_automation/line_editor.lua | |
parent | 5ea11062a80b73e3a24ca43affd5167a1f597ebe (diff) | |
download | advtrains-191b2031883fe80d921e033b87d3c0e727abf86d.tar.gz advtrains-191b2031883fe80d921e033b87d3c0e727abf86d.tar.bz2 advtrains-191b2031883fe80d921e033b87d3c0e727abf86d.zip |
[ch_extras/colorable_walls] přidána lakovaná zeď a lakovaná nízká zeď (spojující se/přímé)
- [advtrains_line_automation] přehled posledních jízd je nyní přístupný všem postavám s právem railway_operator, rovněž příkaz /linky toto právo nově vyžaduje
- [ch_core/shapes_db] přidány okenní rámy z páleného jílu
- [ch_extras/periskop] s periskopem v ruce již nově nejde zaměřovat většinu bloků
- [comboblock] pokus o opravu nekorespondujících textur betonu mezi kombinovanými a normálními bloky
- [orienteering] drobná oprava
Diffstat (limited to 'advtrains_line_automation/line_editor.lua')
-rw-r--r-- | advtrains_line_automation/line_editor.lua | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/advtrains_line_automation/line_editor.lua b/advtrains_line_automation/line_editor.lua index 9c89946..240ac54 100644 --- a/advtrains_line_automation/line_editor.lua +++ b/advtrains_line_automation/line_editor.lua @@ -166,7 +166,7 @@ local function get_formspec(custom_state) pinfo.role == "admin" or selection_index == 1 or pinfo.player_name == custom_state.linevars[selection_index - 1].owner - if has_rights_to_open_variant and selection_index ~= 1 then + if selection_index > 1 and has_rights_to_open_variant then table.insert(formspec, "button[10.5,0.3;3.5,0.75;delete;smazat variantu]") end table.insert(formspec, "button_exit[18.75,0.3;0.75,0.75;close;X]".. @@ -184,18 +184,15 @@ local function get_formspec(custom_state) if custom_state.message ~= "" then table.insert(formspec, "label[0.5,8.25;"..F(custom_state.message).."]") end - if pinfo.role ~= "new" then - if has_rights_to_open_variant then - if selection_index > 1 then - table.insert(formspec, "button[5,15;4.5,0.75;last_passages;poslední jízdy...]".. - "tooltip[last_passages;Zobrazí přehled časů několika posledních jízd na dané variantě linky.]") - end - table.insert(formspec, "button[10,15;4.5,0.75;save;".. - ifthenelse(custom_state.compiled_linevar == nil, "ověřit změny\npřed uložením]", "uložit změny]")) - end - table.insert(formspec, "button[15,15.25;4,0.5;reset;vrátit změny]") + if selection_index > 1 then + table.insert(formspec, "button[5,15;4.5,0.75;last_passages;poslední jízdy...]".. + "tooltip[last_passages;Zobrazí přehled časů několika posledních jízd na dané variantě linky.]") end - + if has_rights_to_open_variant then + table.insert(formspec, "button[10,15;4.5,0.75;save;".. + ifthenelse(custom_state.compiled_linevar == nil, "ověřit změny\npřed uložením]", "uložit změny]")) + end + table.insert(formspec, "button[15,15.25;4,0.5;reset;vrátit změny]") table.insert(formspec, "tooltip[line;".. "Označení linky. Musí být neprázdné. Varianta linky bude použita pouze na vlaky s tímto označením linky.]".. "tooltip[rc;Směrový kód. Může být prázdný. Varianta linky bude použita pouze na vlaky\\,\n".. @@ -809,7 +806,7 @@ end def = { -- params = "", description = "Otevře editor variant linek", - privs = {ch_registered_player = true}, + privs = {ch_registered_player = true, railway_operator = true}, func = function(player_name, param) show_editor_formspec(minetest.get_player_by_name(player_name)) end, } core.register_chatcommand("linky", def) |