from retail

This commit is contained in:
NoM0Re
2025-01-11 17:15:56 +01:00
parent 96c5618c6b
commit 1b50569bcc
10 changed files with 147 additions and 122 deletions
+5 -4
View File
@@ -878,6 +878,7 @@ local function modify(parent, region, data)
end
end
region.TimerTick = nil
function region:Update()
local state = region.state
@@ -890,7 +891,7 @@ local function modify(parent, region, data)
end
if region.TimerTick then
region.TimerTick = nil
region:UpdateRegionHasTimerTick()
region.subRegionEvents:RemoveSubscriber("TimerTick", region)
end
expirationTime = GetTime() + (state.remaining or 0)
else
@@ -899,7 +900,7 @@ local function modify(parent, region, data)
end
if not region.TimerTick then
region.TimerTick = TimerTick
region:UpdateRegionHasTimerTick()
region.subRegionEvents:AddSubscriber("TimerTick", region, true)
end
expirationTime = state.expirationTime and state.expirationTime > 0 and state.expirationTime or math.huge;
end
@@ -945,7 +946,7 @@ local function modify(parent, region, data)
region:SetValue(value - adjustMin, max - adjustMin);
if region.TimerTick then
region.TimerTick = nil
region:UpdateRegionHasTimerTick()
region.subRegionEvents:RemoveSubscriber("TimerTick", region)
end
else
if region.paused then
@@ -954,7 +955,7 @@ local function modify(parent, region, data)
region:SetTime(0, math.huge)
if region.TimerTick then
region.TimerTick = nil
region:UpdateRegionHasTimerTick()
region.subRegionEvents:RemoveSubscriber("TimerTick", region)
end
end