somes tuff to fix before relase
This commit is contained in:
@@ -44,3 +44,20 @@ local function AddAdminTocOptions(playerNum, context, worldobjects)
|
||||
end
|
||||
end
|
||||
Events.OnFillWorldObjectContextMenu.Add(AddAdminTocOptions)
|
||||
|
||||
|
||||
--* Override to cheats to fix stuff
|
||||
|
||||
local og_ISHealthPanel_onCheatCurrentPlayer = ISHealthPanel.onCheatCurrentPlayer
|
||||
|
||||
function ISHealthPanel.onCheatCurrentPlayer(bodyPart, action, player)
|
||||
og_ISHealthPanel_onCheatCurrentPlayer(bodyPart, action, player)
|
||||
|
||||
if action == "healthFullBody" then
|
||||
-- todo loop all limbs and reset them if infected
|
||||
end
|
||||
|
||||
if action == "healthFull" then
|
||||
-- todo get limbname from bodypart
|
||||
end
|
||||
end
|
||||
@@ -252,6 +252,13 @@ function DataController:getIsCauterized(limbName)
|
||||
return self.tocData.limbs[limbName].isCauterized
|
||||
end
|
||||
|
||||
---Get isInfected
|
||||
---@param limbName string
|
||||
---@return boolean
|
||||
function DataController:getIsInfected(limbName)
|
||||
return self.tocData.limbs[limbName].isInfected
|
||||
end
|
||||
|
||||
---Get woundDirtyness
|
||||
---@param limbName string
|
||||
---@return number
|
||||
|
||||
@@ -158,7 +158,7 @@ function LocalPlayerController.HandleDamage(character)
|
||||
LocalPlayerController.HealZombieInfection(bd, bodyPart, limbName, dcInst)
|
||||
end
|
||||
else
|
||||
if bodyPart:bitten() or bodyPart:IsInfected() then
|
||||
if (bodyPart:bitten() or bodyPart:IsInfected()) and not dcInst:getIsInfected(limbName) then
|
||||
dcInst:setIsInfected(limbName, true)
|
||||
modDataNeedsUpdate = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user