Fractures and severed limbs cause cuffs to fall off. Deranged spessmen can chew their own wrists to break free.

Conflicts:
	code/game/objects/items/weapons/handcuffs.dm
This commit is contained in:
Jeremy Liberman
2014-03-05 22:20:44 -05:00
committed by ZomgPonies
parent 72f985f3ea
commit 55ba32d02d
2 changed files with 52 additions and 1 deletions
+29 -1
View File
@@ -600,11 +600,32 @@ This function completely restores a damaged organ to perfect condition.
step(organ,lol)
owner.regenerate_icons()
// 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
@@ -633,7 +654,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")
@@ -642,6 +666,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