Reworked some stuff for MP

This commit is contained in:
ZioPao
2023-11-12 22:20:46 +01:00
parent f973b774a2
commit 4887699892
13 changed files with 209 additions and 91 deletions

View File

@@ -76,7 +76,10 @@ function AmputationHandler:execute(damagePlayer)
-- Set the data in modData
ModDataHandler.GetInstance():setCutLimb(self.limbName, false, false, false, surgeonFactor)
-- TODO This could be run on another player!
local modDataHandler = ModDataHandler.GetInstance()
modDataHandler:setCutLimb(self.limbName, false, false, false, surgeonFactor)
modDataHandler:apply()
-- Give the player the correct amputation item
ItemsHandler.DeleteOldAmputationItem(self.patient, self.limbName)
@@ -86,7 +89,7 @@ function AmputationHandler:execute(damagePlayer)
PlayerHandler.AddLocalAmputatedLimb(self.limbName)
-- Set the highest amputation and caches them.
ISHealthPanel.GetHighestAmputation()
--ISHealthPanel.GetHighestAmputation()
end
---Deletes the instance
@@ -98,7 +101,7 @@ end
function AmputationHandler.UpdateCicatrization()
if ModDataHandler.GetInstance():getIsAnyLimbCut() == false then return end
-- TODO Update cicatrization
end
return AmputationHandler