add new hooks: human.CPRSuccess and human.CPRFailed

This commit is contained in:
Evil Factory
2022-02-07 17:12:26 -03:00
parent 1f751152db
commit 0adcb7c3e2
2 changed files with 8 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ RegisterBarotrauma("AfflictionPrefab")
RegisterBarotrauma("Affliction")
RegisterBarotrauma("CharacterHealth")
RegisterBarotrauma("AnimController")
RegisterBarotrauma("HumanoidAnimController")
RegisterBarotrauma("FishAnimController")
RegisterBarotrauma("Limb")
RegisterBarotrauma("Ragdoll")
RegisterBarotrauma("Networking.ChatMessage")

View File

@@ -1447,6 +1447,12 @@ namespace Barotrauma
//increase oxygen and clamp it above zero
// -> the character should be revived if there are no major afflictions in addition to lack of oxygen
target.Oxygen = Math.Max(target.Oxygen + 10.0f, 10.0f);
GameMain.Lua.hook.Call("human.CPRSuccess", this);
}
else
{
GameMain.Lua.hook.Call("human.CPRFailed", this);
}
}
}