Finishing touches:

* Removed 1 time use local
* Fixed double permission check
* Locale fixes
This commit is contained in:
bbassie
2021-01-29 01:08:58 +01:00
parent 849957279c
commit 2fe9d5650e
2 changed files with 3 additions and 5 deletions

View File

@@ -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

View File

@@ -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)