refactor: cleaning code

This commit is contained in:
ZioPao
2025-04-13 03:21:06 +02:00
parent 253c5717a9
commit d5fd735de8
3 changed files with 4 additions and 6 deletions

View File

@@ -129,7 +129,7 @@ function ISBaseTimedAction:perform()
-- First check level of perks. if already at max, skip
-- LocalPlayerController.playerObj:getPerkLevel(perkAmp) -- todo
local amputatedLimbs = CachedDataHandler.GetAmputatedLimbs(LocalPlayerController.username)
local xp = self.maxTime / 100
@@ -143,7 +143,6 @@ function ISBaseTimedAction:perform()
if dcInst:getIsCut(limbName) and dcInst:getIsVisible(limbName) then
local side = CommonMethods.GetSide(limbName)
-- TODO Test it
local xpObj = LocalPlayerController.playerObj:getXp()
if xpObj:getLevel() < 10 then
xpObj:AddXP(Perks["Side_" .. side], xp)

View File

@@ -118,7 +118,7 @@ function BaseHandler:toPlayerInventory(item, previousAction)
if item:getContainer() ~= self:getDoctor():getInventory() then
local action = ISInventoryTransferAction:new(self:getDoctor(), item, item:getContainer(), self:getDoctor():getInventory())
ISTimedActionQueue.addAfter(previousAction, action)
-- FIXME: ISHealthPanel.actions never gets cleared
-- FIX: ISHealthPanel.actions never gets cleared
self.panel.actions = self.panel.actions or {}
self.panel.actions[action] = self.bodyPart
return action