Added some tests
This commit is contained in:
@@ -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
|
||||
local bp = character:getBodyDamage():getBodyPart(adjacentBodyPartType)
|
||||
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)
|
||||
|
||||
@@ -145,6 +145,14 @@ end)
|
||||
TestFramework.registerTestModule("Various", "Player", function()
|
||||
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()
|
||||
getPlayer():Kill(getPlayer())
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user