mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +01:00
Fractures and severed limbs cause cuffs to fall off. Deranged spessmen can chew their own wrists to break free.
This commit is contained in:
@@ -570,11 +570,32 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
owner.update_body(1)
|
||||
|
||||
// OK so maybe your limb just flew off, but if it was attached to a pair of cuffs then hooray! Freedom!
|
||||
release_restraints()
|
||||
|
||||
/****************************************************
|
||||
HELPERS
|
||||
****************************************************/
|
||||
|
||||
/datum/organ/external/proc/release_restraints()
|
||||
if (owner.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
|
||||
owner.visible_message(\
|
||||
"\The [owner.handcuffed.name] falls off of [owner.name].",\
|
||||
"\The [owner.handcuffed.name] falls off you.")
|
||||
|
||||
owner.handcuffed.loc = owner.loc
|
||||
owner.handcuffed = null
|
||||
owner.update_inv_handcuffed()
|
||||
|
||||
if (owner.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
|
||||
owner.visible_message(\
|
||||
"\The [owner.legcuffed.name] falls off of [owner.name].",\
|
||||
"\The [owner.legcuffed.name] falls off you.")
|
||||
|
||||
owner.legcuffed.loc = owner.loc
|
||||
owner.legcuffed = null
|
||||
owner.update_inv_legcuffed()
|
||||
|
||||
/datum/organ/external/proc/bandage()
|
||||
var/rval = 0
|
||||
src.status &= ~ORGAN_BLEEDING
|
||||
@@ -603,7 +624,10 @@ This function completely restores a damaged organ to perfect condition.
|
||||
/datum/organ/external/proc/fracture()
|
||||
if(status & ORGAN_BROKEN)
|
||||
return
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.visible_message(\
|
||||
"\red You hear a loud cracking sound coming from \the [owner].",\
|
||||
"\red <b>Something feels like it shattered in your [display_name]!</b>",\
|
||||
"You hear a sickening crack.")
|
||||
|
||||
if(owner.species && !(owner.species.flags & NO_PAIN))
|
||||
owner.emote("scream")
|
||||
@@ -612,6 +636,10 @@ This function completely restores a damaged organ to perfect condition.
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
perma_injury = brute_dam
|
||||
|
||||
// Fractures have a chance of getting you out of restraints
|
||||
if (prob(25))
|
||||
release_restraints()
|
||||
|
||||
/datum/organ/external/proc/robotize()
|
||||
src.status &= ~ORGAN_BROKEN
|
||||
src.status &= ~ORGAN_BLEEDING
|
||||
|
||||
Reference in New Issue
Block a user