From 2fe9d5650e5e7d81e73e989a1fa3e0e6550ec0e8 Mon Sep 17 00:00:00 2001 From: bbassie Date: Fri, 29 Jan 2021 01:08:58 +0100 Subject: [PATCH] Finishing touches: * Removed 1 time use local * Fixed double permission check * Locale fixes --- locale/en/gui.cfg | 3 +-- modules/gui/warp-list.lua | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 7c625577..567e7220 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -99,13 +99,12 @@ sub-tooltip=Warps can only be used every __1__ seconds and when within __2__ til sub-tooltip-current= - __1__ This is the warp you are currently standing on; sub-tooltip-connected= - __1__ This warp is in the same electricity network; sub-tooltip-different= - __1__ This warp is not connected to the one u are standing on; -sub-tooltip-bypass= - __1__ Because your role you are allowed to go to this warp; +sub-tooltip-bypass= - __1__ This warp is possible to go to because of your role; sub-tooltip-not_available= - __1__ This warp is out of range; sub-tooltip-cooldown= - __1__ You are currently on cooldown; too-close=Can't make warp; too close to warp: __1__ too-close-to-water=Cannot create warp this close to water, please move __1__ tiles away from the water body too-close-to-entities=Cannot create warp this close to entities, please move __1__ tiles away from the entities or destroy them -too-close-to-neutral-entities=Cannot create warp this close to neutral entities, please move __1__ tiles away from the neutral entities or destroy them last-edit=Last edited by __1__ at __2__\nClick to view on map add-tooltip=Add new warp confirm-tooltip=Save changes diff --git a/modules/gui/warp-list.lua b/modules/gui/warp-list.lua index 80884a26..de0ab193 100644 --- a/modules/gui/warp-list.lua +++ b/modules/gui/warp-list.lua @@ -120,8 +120,7 @@ Gui.element{ -- Remove 1 because that is the current player if #entities > 1 then player_return({'expcore-commands.command-fail', {'warp-list.too-close-to-entities', config.standard_proximity_radius + 4.5}}, 'orange_red', player) - local play_sound = 'utility/wire_pickup' - if game.player then game.player.play_sound{path=play_sound} end + if game.player then game.player.play_sound{path='utility/wire_pickup'} end local character = player.character for _, entity in pairs(entities) do if entity ~= character then @@ -862,7 +861,7 @@ local function role_update_event(event) -- Update the new warp button incase the user can now add them local add_new_warp_element = container.header.alignment[add_new_warp.name] - add_new_warp_element.visible = check_player_permissions(player, 'allow_add_warp') + add_new_warp_element.visible = allow_add_warp end Event.add(Roles.events.on_role_assigned, role_update_event)