Added some tests

This commit is contained in:
ZioPao
2024-05-07 17:13:27 +02:00
parent 26e0324f4a
commit 46a8ddc207
2 changed files with 9 additions and 2 deletions

View File

@@ -131,8 +131,7 @@ function LocalPlayerController.TryRandomBleed(character, limbName)
-- we need to check if the wound is already bleeding before doing anything else to prevent issues with bandages -- we need to check if the wound is already bleeding before doing anything else to prevent issues with bandages
local bp = character:getBodyDamage():getBodyPart(adjacentBodyPartType) local bp = character:getBodyDamage():getBodyPart(adjacentBodyPartType)
bp:setBleedingTime(20) -- TODO Should depend on cicatrization instead of a fixed time bp:setBleedingTime(20) -- TODO Should depend on cicatrization instead of a fixed time
-- ADD Could break bandages if bleeding is too much?
--character:getBodyDamage():getBodyPart(adjacentBodyPartType):setBleeding(true) --character:getBodyDamage():getBodyPart(adjacentBodyPartType):setBleeding(true)

View File

@@ -145,6 +145,14 @@ end)
TestFramework.registerTestModule("Various", "Player", function() TestFramework.registerTestModule("Various", "Player", function()
local Tests = {} local Tests = {}
function Tests.BleedTest()
local pl = getPlayer()
--pl:getBodyDamage():getBodyPart(BodyPartType.ForeArm_R):setBleeding(true)
pl:getBodyDamage():getBodyPart(BodyPartType.ForeArm_R):setBleedingTime(20)
end
function Tests.Kill() function Tests.Kill()
getPlayer():Kill(getPlayer()) getPlayer():Kill(getPlayer())
end end