Added exceptions for the adjusted time

This commit is contained in:
ZioPao
2023-11-16 02:41:27 +01:00
parent cda3a61d2a
commit 16e83955f3
3 changed files with 65 additions and 1 deletions

View File

@@ -169,6 +169,11 @@ local og_ISBaseTimedAction_adjustMaxTime = ISBaseTimedAction.adjustMaxTime
---@diagnostic disable-next-line: duplicate-set-field
function ISBaseTimedAction:adjustMaxTime(maxTime)
local time = og_ISBaseTimedAction_adjustMaxTime(self, maxTime)
-- Exceptions handling, if we find that parameter then we just use the original time
local queue = ISTimedActionQueue.getTimedActionQueue(getPlayer())
if queue.current.skipTOC then return time end
local modDataHandler = ModDataHandler.GetInstance()
if time ~= -1 and modDataHandler and modDataHandler:getIsAnyLimbCut() then
local pl = getPlayer()
@@ -193,6 +198,7 @@ local og_ISBaseTimedAction_perform = ISBaseTimedAction.perform
function ISBaseTimedAction:perform()
og_ISBaseTimedAction_perform(self)
if ModDataHandler.GetInstance():getIsAnyLimbCut() then
for side, _ in pairs(StaticData.SIDES_IND_STR) do
local limbName = "Hand_" .. side