mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 05:31:53 +00:00
Makes Straight Jackets and Ling Revive resist compatible.
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
if(world.time < changeling.next_escape)
|
if(world.time < changeling.next_escape)
|
||||||
to_chat(src, "<span class='warning'>We are still recovering from our last escape...</span>")
|
to_chat(src, "<span class='warning'>We are still recovering from our last escape...</span>")
|
||||||
return 0
|
return 0
|
||||||
if(!(C.handcuffed || C.legcuffed)) // No need to waste chems if there's nothing to break out of
|
if(!(C.handcuffed || C.legcuffed || istype(C.wear_suit,/obj/item/clothing/suit/straight_jacket))) // No need to waste chems if there's nothing to break out of
|
||||||
to_chat(C, "<span class='warning'>We are are not restrained in a way we can escape...</span>")
|
to_chat(C, "<span class='warning'>We are are not restrained in a way we can escape...</span>")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -53,6 +53,12 @@
|
|||||||
W.dropped(C)
|
W.dropped(C)
|
||||||
if(W)
|
if(W)
|
||||||
W.layer = initial(W.layer)
|
W.layer = initial(W.layer)
|
||||||
|
if(C.wear_suit && istype(C.wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||||
|
var/obj/item/clothing/suit/straight_jacket/SJ = C.wear_suit
|
||||||
|
SJ.loc = C.loc
|
||||||
|
SJ.dropped(C)
|
||||||
|
C.wear_suit = null
|
||||||
|
escape_cooldown *= 1.5 // Straight jackets are tedious compared to cuffs.
|
||||||
|
|
||||||
if(src.mind.changeling.recursive_enhancement)
|
if(src.mind.changeling.recursive_enhancement)
|
||||||
escape_cooldown *= 0.5
|
escape_cooldown *= 0.5
|
||||||
|
|||||||
@@ -45,6 +45,36 @@
|
|||||||
BITSET(H.hud_updateflag, STATUS_HUD)
|
BITSET(H.hud_updateflag, STATUS_HUD)
|
||||||
BITSET(H.hud_updateflag, LIFE_HUD)
|
BITSET(H.hud_updateflag, LIFE_HUD)
|
||||||
|
|
||||||
|
if(H.handcuffed)
|
||||||
|
var/obj/item/weapon/W = H.handcuffed
|
||||||
|
H.handcuffed = null
|
||||||
|
if(H.buckled && H.buckled.buckle_require_restraints)
|
||||||
|
H.buckled.unbuckle_mob()
|
||||||
|
H.update_inv_handcuffed()
|
||||||
|
if (H.client)
|
||||||
|
H.client.screen -= W
|
||||||
|
if(W)
|
||||||
|
W.loc = H.loc
|
||||||
|
W.dropped(H)
|
||||||
|
if(W)
|
||||||
|
W.layer = initial(W.layer)
|
||||||
|
if(H.legcuffed)
|
||||||
|
var/obj/item/weapon/W = H.legcuffed
|
||||||
|
H.legcuffed = null
|
||||||
|
H.update_inv_legcuffed()
|
||||||
|
if(H.client)
|
||||||
|
H.client.screen -= W
|
||||||
|
if(W)
|
||||||
|
W.loc = H.loc
|
||||||
|
W.dropped(H)
|
||||||
|
if(W)
|
||||||
|
W.layer = initial(W.layer)
|
||||||
|
if(H.wear_suit && istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||||
|
var/obj/item/clothing/suit/straight_jacket/SJ = H.wear_suit
|
||||||
|
SJ.loc = H.loc
|
||||||
|
SJ.dropped(H)
|
||||||
|
H.wear_suit = null
|
||||||
|
|
||||||
C.halloss = 0
|
C.halloss = 0
|
||||||
C.shock_stage = 0 //Pain
|
C.shock_stage = 0 //Pain
|
||||||
C << "<span class='notice'>We have regenerated.</span>"
|
C << "<span class='notice'>We have regenerated.</span>"
|
||||||
|
|||||||
@@ -224,6 +224,8 @@
|
|||||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
|
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
|
||||||
|
|
||||||
|
var/resist_time = 4800 // Eight minutes.
|
||||||
|
|
||||||
/obj/item/clothing/suit/straight_jacket/attack_hand(mob/living/user as mob)
|
/obj/item/clothing/suit/straight_jacket/attack_hand(mob/living/user as mob)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
|
|||||||
112
code/modules/mob/living/carbon/human/human_resist.dm
Normal file
112
code/modules/mob/living/carbon/human/human_resist.dm
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
/mob/living/carbon/human/process_resist()
|
||||||
|
//drop && roll
|
||||||
|
if(on_fire && !buckled)
|
||||||
|
adjust_fire_stacks(-1.2)
|
||||||
|
Weaken(3)
|
||||||
|
spin(32,2)
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>[src] rolls on the floor, trying to put themselves out!</span>",
|
||||||
|
"<span class='notice'>You stop, drop, and roll!</span>"
|
||||||
|
)
|
||||||
|
sleep(30)
|
||||||
|
if(fire_stacks <= 0)
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>[src] has successfully extinguished themselves!</span>",
|
||||||
|
"<span class='notice'>You extinguish yourself.</span>"
|
||||||
|
)
|
||||||
|
ExtinguishMob()
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
if(handcuffed)
|
||||||
|
spawn() escape_handcuffs()
|
||||||
|
else if(legcuffed)
|
||||||
|
spawn() escape_legcuffs()
|
||||||
|
else if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||||
|
spawn() escape_straight_jacket()
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/escape_straight_jacket()
|
||||||
|
setClickCooldown(100)
|
||||||
|
|
||||||
|
if(can_break_straight_jacket())
|
||||||
|
break_straight_jacket()
|
||||||
|
return
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/H = src
|
||||||
|
var/obj/item/clothing/suit/straight_jacket/SJ = H.wear_suit
|
||||||
|
|
||||||
|
var/breakouttime = SJ.resist_time // Configurable per-jacket!
|
||||||
|
|
||||||
|
var/attack_type = 0
|
||||||
|
|
||||||
|
if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves/gauntlets/rig))
|
||||||
|
breakouttime /= 2 // Pneumatic force goes a long way.
|
||||||
|
else if(H.species.unarmed_types)
|
||||||
|
for(var/datum/unarmed_attack/U in H.species.unarmed_types)
|
||||||
|
if(istype(U, /datum/unarmed_attack/claws))
|
||||||
|
breakouttime /= 1.5
|
||||||
|
attack_type = 1
|
||||||
|
break
|
||||||
|
else if(istype(U, /datum/unarmed_attack/bite/sharp))
|
||||||
|
breakouttime /= 1.25
|
||||||
|
attack_type = 2
|
||||||
|
break
|
||||||
|
|
||||||
|
switch(attack_type)
|
||||||
|
if(0)
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>\The [src] struggles to remove \the [SJ]!</span>",
|
||||||
|
"<span class='warning'>You struggle to remove \the [SJ]. (This will take around [round(breakouttime / 600)] minutes and you need to stand still.)</span>"
|
||||||
|
)
|
||||||
|
if(1)
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>\The [src] starts clawing at \the [SJ]!</span>",
|
||||||
|
"<span class='warning'>You claw at \the [SJ]. (This will take around [round(breakouttime / 600)] minutes and you need to stand still.)</span>"
|
||||||
|
)
|
||||||
|
if(2)
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>\The [src] starts gnawing on \the [SJ]!</span>",
|
||||||
|
"<span class='warning'>You gnaw on \the [SJ]. (This will take around [round(breakouttime / 600)] minutes and you need to stand still.)</span>"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(do_after(src, breakouttime, incapacitation_flags = INCAPACITATION_DISABLED & INCAPACITATION_KNOCKDOWN))
|
||||||
|
if(!wear_suit)
|
||||||
|
return
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>\The [src] manages to remove \the [wear_suit]!</span>",
|
||||||
|
"<span class='notice'>You successfully remove \the [wear_suit].</span>"
|
||||||
|
)
|
||||||
|
drop_from_inventory(wear_suit)
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/can_break_straight_jacket()
|
||||||
|
if((HULK in mutations) || species.can_shred(src,1))
|
||||||
|
return 1
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/break_straight_jacket()
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>[src] is trying to rip \the [wear_suit]!</span>",
|
||||||
|
"<span class='warning'>You attempt to rip your [wear_suit.name] apart. (This will take around 5 seconds and you need to stand still)</span>"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(do_after(src, 20 SECONDS, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED)) // Same scaling as breaking cuffs, 5 seconds to 120 seconds, 20 seconds to 480 seconds.
|
||||||
|
if(!wear_suit || buckled)
|
||||||
|
return
|
||||||
|
|
||||||
|
visible_message(
|
||||||
|
"<span class='danger'>[src] manages to rip \the [wear_suit]!</span>",
|
||||||
|
"<span class='warning'>You successfully rip your [wear_suit.name].</span>"
|
||||||
|
)
|
||||||
|
|
||||||
|
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!", "RAAAAAAAARGH!", "HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "AAAAAAARRRGH!" ))
|
||||||
|
|
||||||
|
qdel(wear_suit)
|
||||||
|
wear_suit = null
|
||||||
|
if(buckled && buckled.buckle_require_restraints)
|
||||||
|
buckled.unbuckle_mob()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/can_break_cuffs()
|
||||||
|
if(species.can_shred(src,1))
|
||||||
|
return 1
|
||||||
|
return ..()
|
||||||
@@ -153,11 +153,6 @@
|
|||||||
legcuffed = null
|
legcuffed = null
|
||||||
update_inv_legcuffed()
|
update_inv_legcuffed()
|
||||||
|
|
||||||
/mob/living/carbon/human/can_break_cuffs()
|
|
||||||
if(species.can_shred(src,1))
|
|
||||||
return 1
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/mob/living/carbon/escape_buckle()
|
/mob/living/carbon/escape_buckle()
|
||||||
if(!buckled) return
|
if(!buckled) return
|
||||||
|
|
||||||
|
|||||||
@@ -1906,6 +1906,7 @@
|
|||||||
#include "code\modules\mob\living\carbon\human\human_movement.dm"
|
#include "code\modules\mob\living\carbon\human\human_movement.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_organs.dm"
|
#include "code\modules\mob\living\carbon\human\human_organs.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_powers.dm"
|
#include "code\modules\mob\living\carbon\human\human_powers.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\human_resist.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_species.dm"
|
#include "code\modules\mob\living\carbon\human\human_species.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\inventory.dm"
|
#include "code\modules\mob\living\carbon\human\inventory.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\life.dm"
|
#include "code\modules\mob\living\carbon\human\life.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user