Cauterized status in health panel
This commit is contained in:
@@ -15,7 +15,6 @@ end
|
||||
|
||||
--* Amputated Limbs caching *--
|
||||
CachedDataHandler.amputatedLimbs = {}
|
||||
-- TODO Add an indexable table too!
|
||||
|
||||
---Calculate the currently amputated limbs for a certain player
|
||||
---@param username string
|
||||
@@ -37,10 +36,7 @@ function CachedDataHandler.AddAmputatedLimb(username, limbName)
|
||||
TOC_DEBUG.print("added " .. limbName .. " to known amputated limbs for " .. username)
|
||||
|
||||
-- Add it to the generic list
|
||||
-- TODO this is wrong
|
||||
|
||||
CachedDataHandler.amputatedLimbs[username][limbName] = limbName
|
||||
--table.insert(CachedDataHandler.amputatedLimbs[username], limbName)
|
||||
end
|
||||
|
||||
---Returns a table containing the cached amputated limbs
|
||||
|
||||
@@ -178,7 +178,11 @@ end
|
||||
---@param limbName string
|
||||
---@return boolean
|
||||
function ModDataHandler:getIsCut(limbName)
|
||||
return self.tocData.limbs[limbName].isCut
|
||||
if self.tocData.limbs[limbName] then
|
||||
return self.tocData.limbs[limbName].isCut
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
---Get isVisible
|
||||
@@ -246,14 +250,14 @@ function ModDataHandler:setCutLimb(limbName, isOperated, isCicatrized, isCauteri
|
||||
|
||||
-- We don't care about isOperated, isCicatrized, isCauterized since this is depending on another limb
|
||||
-- Same story for cicatrizationTime, which will be 0
|
||||
-- isCicatized is to true to prevent it from doing the cicatrization process
|
||||
-- isCicatrized is to true to prevent it from doing the cicatrization process
|
||||
self:setLimbParams(dependedLimbName, {isCut = true, isInfected = false, isVisible = false, isCicatrized = true}, 0)
|
||||
end
|
||||
|
||||
-- Set that a limb has been cut, to activate some functions without having to loop through the parts
|
||||
self:setIsAnyLimbCut(true)
|
||||
|
||||
-- TODO IN theory we should cache data from here, not AMputationHandler
|
||||
-- TODO In theory we should cache data from here, not AmputationHandler
|
||||
end
|
||||
|
||||
---Set a limb data
|
||||
|
||||
Reference in New Issue
Block a user