From 191b2031883fe80d921e033b87d3c0e727abf86d Mon Sep 17 00:00:00 2001 From: Singularis Date: Wed, 15 Jan 2025 13:01:00 +0100 Subject: [ch_extras/colorable_walls] přidána lakovaná zeď a lakovaná nízká zeď (spojující se/přímé) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - [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 --- advtrains_line_automation/line_editor.lua | 23 ++++++++++------------- 1 file 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) -- cgit v1.2.3