mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +09:00
Fixed warp cooldown not using seconds
This commit is contained in:
@@ -112,7 +112,7 @@ cancel-tooltip=Discard changes
|
|||||||
edit-tooltip=Currently being edited by: __1__
|
edit-tooltip=Currently being edited by: __1__
|
||||||
edit-tooltip-none=Currently being edited by: Nobody
|
edit-tooltip-none=Currently being edited by: Nobody
|
||||||
remove-tooltip=Remove warp
|
remove-tooltip=Remove warp
|
||||||
timer-tooltip=Please wait __1__ seconds before you warp again
|
timer-tooltip=Please wait __1__ seconds before you can warp
|
||||||
timer-tooltip-zero=After each warp you will need to wait __1__ seconds before you can warp again
|
timer-tooltip-zero=After each warp you will need to wait __1__ seconds before you can warp again
|
||||||
goto-tooltip=Go to x __1__ y __2__
|
goto-tooltip=Go to x __1__ y __2__
|
||||||
goto-bypass=Go to x __1__ y __2__, bypass mode
|
goto-bypass=Go to x __1__ y __2__, bypass mode
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ end)
|
|||||||
|
|
||||||
-- Reset the warp cooldown if the player does not have unlimited warps
|
-- Reset the warp cooldown if the player does not have unlimited warps
|
||||||
if not check_player_permissions(player, 'bypass_warp_cooldown') then
|
if not check_player_permissions(player, 'bypass_warp_cooldown') then
|
||||||
PlayerCooldown:set(player, config.cooldown_duration)
|
PlayerCooldown:set(player, config.update_smoothing*config.cooldown_duration)
|
||||||
end
|
end
|
||||||
|
|
||||||
PlayerInRange:set(player, warp_id)
|
PlayerInRange:set(player, warp_id)
|
||||||
@@ -671,8 +671,8 @@ Gui.element(function(event_trigger, parent)
|
|||||||
-- Change the progress of the warp timer
|
-- Change the progress of the warp timer
|
||||||
local timer = PlayerCooldown:get(player)
|
local timer = PlayerCooldown:get(player)
|
||||||
if timer > 0 then
|
if timer > 0 then
|
||||||
warp_timer_element.tooltip = {'warp-list.timer-tooltip', timer}
|
warp_timer_element.tooltip = {'warp-list.timer-tooltip', math.floor(timer/config.update_smoothing)}
|
||||||
warp_timer_element.value = 1 - (timer/config.cooldown_duration)
|
warp_timer_element.value = 1 - (timer/config.update_smoothing/config.cooldown_duration)
|
||||||
else
|
else
|
||||||
warp_timer_element.tooltip = {'warp-list.timer-tooltip-zero', config.cooldown_duration}
|
warp_timer_element.tooltip = {'warp-list.timer-tooltip-zero', config.cooldown_duration}
|
||||||
warp_timer_element.value = 1
|
warp_timer_element.value = 1
|
||||||
@@ -727,8 +727,8 @@ PlayerCooldown:on_update(function(player_name, player_cooldown)
|
|||||||
|
|
||||||
-- Set the progress
|
-- Set the progress
|
||||||
if player_cooldown and player_cooldown > 0 then
|
if player_cooldown and player_cooldown > 0 then
|
||||||
warp_timer_element.tooltip = {'warp-list.timer-tooltip', player_cooldown}
|
warp_timer_element.tooltip = {'warp-list.timer-tooltip', math.floor(player_cooldown/config.update_smoothing)}
|
||||||
warp_timer_element.value = 1 - (player_cooldown/config.cooldown_duration)
|
warp_timer_element.value = 1 - (player_cooldown/config.update_smoothing/config.cooldown_duration)
|
||||||
else
|
else
|
||||||
warp_timer_element.tooltip = {'warp-list.timer-tooltip-zero', config.cooldown_duration}
|
warp_timer_element.tooltip = {'warp-list.timer-tooltip-zero', config.cooldown_duration}
|
||||||
warp_timer_element.value = 1
|
warp_timer_element.value = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user