mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Merge pull request #11578 from PsiOmegaDelta/151203-RestrainedIncapacitation
Makes it possible to ignore some incapacitation checks.
This commit is contained in:
@@ -127,4 +127,12 @@
|
||||
#define FLASH_PROTECTION_MAJOR 2
|
||||
|
||||
#define ANIMAL_SPAWN_DELAY round(config.respawn_delay / 6)
|
||||
#define DRONE_SPAWN_DELAY round(config.respawn_delay / 3)
|
||||
#define DRONE_SPAWN_DELAY round(config.respawn_delay / 3)
|
||||
|
||||
// Incapacitation flags, used by the mob/proc/incapacitated() proc
|
||||
#define INCAPACITATION_RESTRAINED 1
|
||||
#define INCAPACITATION_BUCKLED_PARTIALLY 2
|
||||
#define INCAPACITATION_BUCKLED_FULLY 4
|
||||
|
||||
#define INCAPACITATION_DEFAULT (INCAPACITATION_RESTRAINED|INCAPACITATION_BUCKLED_FULLY)
|
||||
#define INCAPACITATION_ALL (INCAPACITATION_RESTRAINED|INCAPACITATION_BUCKLED_PARTIALLY|INCAPACITATION_BUCKLED_FULLY)
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
/mob/living/carbon/proc/escape_handcuffs()
|
||||
//if(!(last_special <= world.time)) return
|
||||
|
||||
//These two lines represent a significant buff to grabs...
|
||||
if(!canClick()) return
|
||||
//This line represent a significant buff to grabs...
|
||||
// We don't have to check the click cooldown because /mob/living/verb/resist() has done it for us, we can simply set the delay
|
||||
setClickCooldown(100)
|
||||
|
||||
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
|
||||
@@ -53,7 +53,7 @@
|
||||
displaytime /= 2
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[src] attempts to remove \the [HC]!</span>",
|
||||
"<span class='danger'>\The [src] attempts to remove \the [HC]!</span>",
|
||||
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
if(!handcuffed || buckled)
|
||||
return
|
||||
visible_message(
|
||||
"<span class='danger'>[src] manages to remove \the [handcuffed]!</span>",
|
||||
"<span class='danger'>\The [src] manages to remove \the [handcuffed]!</span>",
|
||||
"<span class='notice'>You successfully remove \the [handcuffed].</span>"
|
||||
)
|
||||
drop_from_inventory(handcuffed)
|
||||
|
||||
+29
-5
@@ -85,8 +85,7 @@
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
|
||||
/mob/visible_message(var/message, var/self_message, var/blind_message)
|
||||
|
||||
var/list/see = get_mobs_or_objects_in_view(world.view,src) | viewers(get_turf(src), null)
|
||||
var/list/see = get_mobs_or_objects_in_view(world.view,src) | viewers(world.view,src)
|
||||
|
||||
for(var/I in see)
|
||||
if(isobj(I))
|
||||
@@ -152,8 +151,33 @@
|
||||
//handle_typing_indicator() //You said the typing indicator would be fine. The test determined that was a lie.
|
||||
return
|
||||
|
||||
/mob/proc/incapacitated()
|
||||
return (stat || paralysis || stunned || weakened || restrained())
|
||||
#define UNBUCKLED 0
|
||||
#define PARTIALLY_BUCKLED 1
|
||||
#define FULLY_BUCKLED 2
|
||||
/mob/proc/buckled()
|
||||
// Preliminary work for a future buckle rewrite,
|
||||
// where one might be fully restrained (like an elecrical chair), or merely secured (shuttle chair, keeping you safe but not otherwise restrained from acting)
|
||||
return buckled ? FULLY_BUCKLED : UNBUCKLED
|
||||
|
||||
/mob/proc/incapacitated(var/incapacitation_flags = INCAPACITATION_DEFAULT)
|
||||
if (stat || paralysis || stunned || weakened || resting || sleeping || (status_flags & FAKEDEATH))
|
||||
return 1
|
||||
|
||||
if((incapacitation_flags & INCAPACITATION_RESTRAINED) && restrained())
|
||||
return 1
|
||||
|
||||
if((incapacitation_flags & (INCAPACITATION_BUCKLED_PARTIALLY|INCAPACITATION_BUCKLED_FULLY)))
|
||||
var/buckling = buckled()
|
||||
if(buckling >= PARTIALLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_PARTIALLY))
|
||||
return 1
|
||||
if(buckling == FULLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_FULLY))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
#undef UNBUCKLED
|
||||
#undef PARTIALLY_BUCKLED
|
||||
#undef FULLY_BUCKLED
|
||||
|
||||
/mob/proc/restrained()
|
||||
return
|
||||
@@ -675,7 +699,7 @@
|
||||
return 0
|
||||
|
||||
/mob/proc/cannot_stand()
|
||||
return incapacitated() || restrained() || resting || sleeping || (status_flags & FAKEDEATH)
|
||||
return incapacitated(INCAPACITATION_DEFAULT & (~INCAPACITATION_RESTRAINED))
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
/mob/proc/update_canmove()
|
||||
|
||||
Reference in New Issue
Block a user