/// <summary> /// Checks if the cut is big enough for the contained organs to escape. /// If the cut isn't big enough or has failed a chance check, apply internal damage + bleeding. /// </summary> private void Disembowel() { BodyPart randomBodyPart = ContainBodyParts.GetRandom(); BodyPart randomCustomBodyPart = OptionalOrgans.GetRandom(); if (currentCutSize >= BodyPartStorageContentsSpillOutOnCutSize) { float chance = UnityEngine.Random.Range(0.0f, 1.0f); if (chance >= spillChanceWhenCutPresent) { randomBodyPart.RemoveFromBodyThis(); if (randomCustomBodyPart != null) { randomCustomBodyPart.RemoveFromBodyThis(); } } else { randomBodyPart.ApplyInternalDamage(); if (randomCustomBodyPart != null) { randomCustomBodyPart.ApplyInternalDamage(); } } } else { randomBodyPart.ApplyInternalDamage(); if (randomCustomBodyPart != null) { randomCustomBodyPart.ApplyInternalDamage(); } } }
public override void FinnishSurgeryProcedure(BodyPart OnBodyPart, PositionalHandApply interaction, Dissectible.PresentProcedure PresentProcedure) { base.FinnishSurgeryProcedure(OnBodyPart, interaction, PresentProcedure); if (PresentProcedure.RelatedBodyPart.ContainedIn != null) { PresentProcedure.ISon.SetBodyPartIsOpen(false, true); PresentProcedure.ISon.currentlyOn = PresentProcedure.RelatedBodyPart.ContainedIn.gameObject; } else { PresentProcedure.ISon.SetBodyPartIsOpen(false, false); PresentProcedure.ISon.currentlyOn = null; } OnBodyPart.RemoveFromBodyThis(); }