diff --git a/code/__DEFINES/ai/ai.dm b/code/__DEFINES/ai/ai.dm
index 37ee5c077e2..73a8f2d1900 100644
--- a/code/__DEFINES/ai/ai.dm
+++ b/code/__DEFINES/ai/ai.dm
@@ -68,7 +68,7 @@
///macro for whether it's appropriate to resist right now, used by resist subtree
#define SHOULD_RESIST(source) (source.on_fire || source.buckled || HAS_TRAIT(source, TRAIT_RESTRAINED) || (source.pulledby && source.pulledby.grab_state > GRAB_PASSIVE))
///macro for whether the pawn can act, used generally to prevent some horrifying ai disasters
-#define IS_DEAD_OR_INCAP(source) (source.incapacitated() || source.stat)
+#define IS_DEAD_OR_INCAP(source) (source.incapacitated || source.stat)
GLOBAL_LIST_INIT(all_radial_directions, list(
"NORTH" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH),
diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_ai.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_ai.dm
index 026247acf57..16f7e00e78a 100644
--- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_ai.dm
+++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_ai.dm
@@ -9,3 +9,5 @@
///Signal sent when a bot is reset
#define COMSIG_BOT_RESET "bot_reset"
+///Sent off /mob/living/basic/bot/proc/set_mode_flags() : (new_flags)
+#define COMSIG_BOT_MODE_FLAGS_SET "bot_mode_flags_set"
diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
index c6d19809cd1..85e6a62d46c 100644
--- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
+++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
@@ -247,3 +247,6 @@
/// from /mob/proc/key_down(): (key, client/client, full_key)
#define COMSIG_MOB_KEYDOWN "mob_key_down"
+
+/// from /mob/update_incapacitated(): (old_incap, new_incap)
+#define COMSIG_MOB_INCAPACITATE_CHANGED "mob_incapacitated"
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index 8ada83a2109..ead7764d605 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -24,12 +24,18 @@
#define CURSE_GRASPING (1<<3)
//Incapacitated status effect flags
-/// If the incapacitated status effect will ignore a mob in restraints (handcuffs)
-#define IGNORE_RESTRAINTS (1<<0)
-/// If the incapacitated status effect will ignore a mob in stasis (stasis beds)
-#define IGNORE_STASIS (1<<1)
-/// If the incapacitated status effect will ignore a mob being agressively grabbed
-#define IGNORE_GRAB (1<<2)
+/// If the mob is normal incapacitated. Should never need this, just avoids issues if we ever overexpand this
+#define TRADITIONAL_INCAPACITATED (1<<0)
+/// If the incapacitated status effect is being caused by restraints (handcuffs)
+#define INCAPABLE_RESTRAINTS (1<<1)
+/// If the incapacitated status effect is being caused by stasis (stasis beds)
+#define INCAPABLE_STASIS (1<<2)
+/// If the incapacitated status effect is being caused by being agressively grabbed
+#define INCAPABLE_GRAB (1<<3)
+
+/// Checks to see if a mob would be incapacitated even while ignoring some types
+/// Does this by inverting the passed in flags and seeing if we're still incapacitated
+#define INCAPACITATED_IGNORING(mob, flags) (mob.incapacitated & ~(flags))
/// Maxamounts of fire stacks a mob can get
#define MAX_FIRE_STACKS 20
diff --git a/code/__HELPERS/paths/path.dm b/code/__HELPERS/paths/path.dm
index 8e90c3664c3..9530a545235 100644
--- a/code/__HELPERS/paths/path.dm
+++ b/code/__HELPERS/paths/path.dm
@@ -335,7 +335,7 @@
src.has_gravity = construct_from.has_gravity()
if(ismob(construct_from))
var/mob/living/mob_construct = construct_from
- src.incapacitated = mob_construct.incapacitated()
+ src.incapacitated = mob_construct.incapacitated
if(mob_construct.buckled)
src.buckled_info = new(mob_construct.buckled, access, no_id, call_depth + 1)
if(isobserver(construct_from))
diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index ec76dee9c8e..200f56bed97 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -7,7 +7,7 @@
Note that AI have no need for the adjacency proc, and so this proc is a lot cleaner.
*/
/mob/living/silicon/ai/DblClickOn(atom/A, params)
- if(control_disabled || incapacitated())
+ if(control_disabled || incapacitated)
return
if(ismob(A))
@@ -39,7 +39,7 @@
if(check_click_intercept(params,A))
return
- if(control_disabled || incapacitated())
+ if(control_disabled || incapacitated)
return
var/turf/pixel_turf = get_turf_pixel(A)
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 1d7e07f7b99..0c441ba928e 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -101,7 +101,7 @@
CtrlClickOn(A)
return
- if(incapacitated(IGNORE_RESTRAINTS|IGNORE_STASIS))
+ if(INCAPACITATED_IGNORING(src, INCAPABLE_RESTRAINTS|INCAPABLE_STASIS))
return
face_atom(A)
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index a2dda93f401..60640d01d5a 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -58,7 +58,7 @@
return
if(W)
- if(incapacitated())
+ if(incapacitated)
return
//while buckled, you can still connect to and control things like doors, but you can't use your modules
diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm
index 84efaf77c5d..aaad7457f6d 100644
--- a/code/_onclick/hud/ai.dm
+++ b/code/_onclick/hud/ai.dm
@@ -2,7 +2,7 @@
icon = 'icons/hud/screen_ai.dmi'
/atom/movable/screen/ai/Click()
- if(isobserver(usr) || usr.incapacitated())
+ if(isobserver(usr) || usr.incapacitated)
return TRUE
/atom/movable/screen/ai/aicore
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index df3a205466b..cb06e00d116 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -110,7 +110,7 @@
if(world.time <= usr.next_move)
return 1
- if(usr.incapacitated())
+ if(usr.incapacitated)
return 1
if(ismob(usr))
@@ -143,7 +143,7 @@
screen_loc = ui_building
/atom/movable/screen/area_creator/Click()
- if(usr.incapacitated() || (isobserver(usr) && !isAdminGhostAI(usr)))
+ if(usr.incapacitated || (isobserver(usr) && !isAdminGhostAI(usr)))
return TRUE
var/area/A = get_area(usr)
if(!A.outdoors)
@@ -204,7 +204,7 @@
if(world.time <= usr.next_move)
return TRUE
- if(usr.incapacitated(IGNORE_STASIS))
+ if(INCAPACITATED_IGNORING(usr, INCAPABLE_STASIS))
return TRUE
if(ismecha(usr.loc)) // stops inventory actions in a mech
return TRUE
@@ -294,7 +294,7 @@
return TRUE
if(world.time <= user.next_move)
return TRUE
- if(user.incapacitated())
+ if(user.incapacitated)
return TRUE
if (ismecha(user.loc)) // stops inventory actions in a mech
return TRUE
@@ -471,7 +471,7 @@
if(world.time <= usr.next_move)
return TRUE
- if(usr.incapacitated())
+ if(usr.incapacitated)
return TRUE
if(ismecha(usr.loc)) // stops inventory actions in a mech
return TRUE
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index 2f1465ac4ff..eab5f0a7cd9 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -109,11 +109,11 @@
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED))
var/ignore_flags = NONE
if(interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED)
- ignore_flags |= IGNORE_RESTRAINTS
+ ignore_flags |= INCAPABLE_RESTRAINTS
if(!(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB))
- ignore_flags |= IGNORE_GRAB
+ ignore_flags |= INCAPABLE_GRAB
- if(user.incapacitated(ignore_flags))
+ if(INCAPACITATED_IGNORING(user, ignore_flags))
return FALSE
return TRUE
diff --git a/code/datums/ai/_ai_controller.dm b/code/datums/ai/_ai_controller.dm
index 797deb134f2..a2fc1cdc62e 100644
--- a/code/datums/ai/_ai_controller.dm
+++ b/code/datums/ai/_ai_controller.dm
@@ -63,6 +63,12 @@ multiple modular subtrees with behaviors
///What distance should we be checking for interesting things when considering idling/deidling? Defaults to AI_DEFAULT_INTERESTING_DIST
var/interesting_dist = AI_DEFAULT_INTERESTING_DIST
+ /// TRUE if we're able to run, FALSE if we aren't
+ /// Should not be set manually, override get_able_to_run() instead
+ /// Make sure you hook update_able_to_run() in setup_able_to_run() to whatever parameters changing that you added
+ /// Otherwise we will not pay attention to them changing
+ var/able_to_run = FALSE
+
/datum/ai_controller/New(atom/new_pawn)
change_ai_movement_type(ai_movement)
init_subtrees()
@@ -109,6 +115,7 @@ multiple modular subtrees with behaviors
///Proc to move from one pawn to another, this will destroy the target's existing controller.
/datum/ai_controller/proc/PossessPawn(atom/new_pawn)
+ SHOULD_CALL_PARENT(TRUE)
if(pawn) //Reset any old signals
UnpossessPawn(FALSE)
@@ -133,6 +140,8 @@ multiple modular subtrees with behaviors
RegisterSignal(pawn, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_changed))
RegisterSignal(pawn, COMSIG_MOB_LOGIN, PROC_REF(on_sentience_gained))
RegisterSignal(pawn, COMSIG_QDELETING, PROC_REF(on_pawn_qdeleted))
+ update_able_to_run()
+ setup_able_to_run()
our_cells = new(interesting_dist, interesting_dist, 1)
set_new_cells()
@@ -260,11 +269,13 @@ multiple modular subtrees with behaviors
///Proc for deinitializing the pawn to the old controller
/datum/ai_controller/proc/UnpossessPawn(destroy)
+ SHOULD_CALL_PARENT(TRUE)
if(isnull(pawn))
return // instantiated without an applicable pawn, fine
set_ai_status(AI_STATUS_OFF)
UnregisterSignal(pawn, list(COMSIG_MOVABLE_Z_CHANGED, COMSIG_MOB_LOGIN, COMSIG_MOB_LOGOUT, COMSIG_MOB_STATCHANGE, COMSIG_QDELETING))
+ clear_able_to_run()
if(ai_movement.moving_controllers[src])
ai_movement.stop_moving_towards(src)
var/turf/pawn_turf = get_turf(pawn)
@@ -277,8 +288,19 @@ multiple modular subtrees with behaviors
if(destroy)
qdel(src)
-///Returns TRUE if the ai controller can actually run at the moment.
-/datum/ai_controller/proc/able_to_run()
+/datum/ai_controller/proc/setup_able_to_run()
+ // paused_until is handled by PauseAi() manually
+ RegisterSignals(pawn, list(SIGNAL_ADDTRAIT(TRAIT_AI_PAUSED), SIGNAL_REMOVETRAIT(TRAIT_AI_PAUSED)), PROC_REF(update_able_to_run))
+
+/datum/ai_controller/proc/clear_able_to_run()
+ UnregisterSignal(pawn, list(SIGNAL_ADDTRAIT(TRAIT_AI_PAUSED), SIGNAL_REMOVETRAIT(TRAIT_AI_PAUSED)))
+
+/datum/ai_controller/proc/update_able_to_run()
+ SIGNAL_HANDLER
+ able_to_run = get_able_to_run()
+
+///Returns TRUE if the ai controller can actually run at the moment, FALSE otherwise
+/datum/ai_controller/proc/get_able_to_run()
if(HAS_TRAIT(pawn, TRAIT_AI_PAUSED))
return FALSE
if(world.time < paused_until)
@@ -288,7 +310,7 @@ multiple modular subtrees with behaviors
///Runs any actions that are currently running
/datum/ai_controller/process(seconds_per_tick)
- if(!able_to_run())
+ if(!able_to_run)
GLOB.move_manager.stop_looping(pawn) //stop moving
return //this should remove them from processing in the future through event-based stuff.
@@ -405,6 +427,8 @@ multiple modular subtrees with behaviors
/datum/ai_controller/proc/PauseAi(time)
paused_until = world.time + time
+ update_able_to_run()
+ addtimer(CALLBACK(src, PROC_REF(update_able_to_run)), time)
/datum/ai_controller/proc/modify_cooldown(datum/ai_behavior/behavior, new_cooldown)
behavior_cooldowns[behavior] = new_cooldown
diff --git a/code/datums/ai/bane/bane_controller.dm b/code/datums/ai/bane/bane_controller.dm
index 8d6820a800b..64e1dcf31af 100644
--- a/code/datums/ai/bane/bane_controller.dm
+++ b/code/datums/ai/bane/bane_controller.dm
@@ -12,7 +12,19 @@ And the only victory you achieved was a lie. Now you understand Gotham is beyond
return AI_CONTROLLER_INCOMPATIBLE
return ..() //Run parent at end
-/datum/ai_controller/bane/able_to_run()
+/datum/ai_controller/bane/on_stat_changed(mob/living/source, new_stat)
+ . = ..()
+ update_able_to_run()
+
+/datum/ai_controller/bane/setup_able_to_run()
+ . = ..()
+ RegisterSignal(pawn, COMSIG_MOB_INCAPACITATE_CHANGED, PROC_REF(update_able_to_run))
+
+/datum/ai_controller/bane/clear_able_to_run()
+ UnregisterSignal(pawn, list(COMSIG_MOB_INCAPACITATE_CHANGED, COMSIG_MOB_STATCHANGE))
+ return ..()
+
+/datum/ai_controller/bane/get_able_to_run()
var/mob/living/living_pawn = pawn
if(IS_DEAD_OR_INCAP(living_pawn))
return FALSE
diff --git a/code/datums/ai/basic_mobs/base_basic_controller.dm b/code/datums/ai/basic_mobs/base_basic_controller.dm
index cd025b28bcb..a14630fa0e8 100644
--- a/code/datums/ai/basic_mobs/base_basic_controller.dm
+++ b/code/datums/ai/basic_mobs/base_basic_controller.dm
@@ -12,17 +12,29 @@
return ..() //Run parent at end
-
-/datum/ai_controller/basic_controller/able_to_run()
+/datum/ai_controller/basic_controller/on_stat_changed(mob/living/source, new_stat)
. = ..()
- if(!isliving(pawn))
- return
- var/mob/living/living_pawn = pawn
- var/incap_flags = NONE
- if (ai_traits & CAN_ACT_IN_STASIS)
- incap_flags |= IGNORE_STASIS
- if(!(ai_traits & CAN_ACT_WHILE_DEAD) && (living_pawn.incapacitated(incap_flags) || living_pawn.stat))
+ update_able_to_run()
+
+/datum/ai_controller/basic_controller/setup_able_to_run()
+ . = ..()
+ RegisterSignal(pawn, COMSIG_MOB_INCAPACITATE_CHANGED, PROC_REF(update_able_to_run))
+
+/datum/ai_controller/basic_controller/clear_able_to_run()
+ UnregisterSignal(pawn, list(COMSIG_MOB_INCAPACITATE_CHANGED, COMSIG_MOB_STATCHANGE))
+ return ..()
+
+/datum/ai_controller/basic_controller/get_able_to_run()
+ . = ..()
+ if(!.)
return FALSE
+ var/mob/living/living_pawn = pawn
+ if(!(ai_traits & CAN_ACT_WHILE_DEAD))
+ // Unroll for flags here
+ if (ai_traits & CAN_ACT_IN_STASIS && (living_pawn.stat || INCAPACITATED_IGNORING(living_pawn, INCAPABLE_STASIS)))
+ return FALSE
+ else if(IS_DEAD_OR_INCAP(living_pawn))
+ return FALSE
if(ai_traits & PAUSE_DURING_DO_AFTER && LAZYLEN(living_pawn.do_afters))
return FALSE
diff --git a/code/datums/ai/monkey/monkey_controller.dm b/code/datums/ai/monkey/monkey_controller.dm
index 737a160b608..e92ec519b20 100644
--- a/code/datums/ai/monkey/monkey_controller.dm
+++ b/code/datums/ai/monkey/monkey_controller.dm
@@ -104,10 +104,22 @@ have ways of interacting with a specific mob and control it.
. = ..()
set_trip_mode(mode = TRUE)
-/datum/ai_controller/monkey/able_to_run()
+/datum/ai_controller/monkey/on_stat_changed(mob/living/source, new_stat)
+ . = ..()
+ update_able_to_run()
+
+/datum/ai_controller/monkey/setup_able_to_run()
+ . = ..()
+ RegisterSignal(pawn, COMSIG_MOB_INCAPACITATE_CHANGED, PROC_REF(update_able_to_run))
+
+/datum/ai_controller/monkey/clear_able_to_run()
+ UnregisterSignal(pawn, list(COMSIG_MOB_INCAPACITATE_CHANGED, COMSIG_MOB_STATCHANGE))
+ return ..()
+
+/datum/ai_controller/monkey/get_able_to_run()
var/mob/living/living_pawn = pawn
- if(living_pawn.incapacitated(IGNORE_RESTRAINTS | IGNORE_GRAB | IGNORE_STASIS) || living_pawn.stat > CONSCIOUS)
+ if(INCAPACITATED_IGNORING(living_pawn, INCAPABLE_RESTRAINTS|INCAPABLE_STASIS|INCAPABLE_GRAB) || living_pawn.stat > CONSCIOUS)
return FALSE
return ..()
diff --git a/code/datums/ai/movement/_ai_movement.dm b/code/datums/ai/movement/_ai_movement.dm
index 35492c82699..c1b3aae5bd6 100644
--- a/code/datums/ai/movement/_ai_movement.dm
+++ b/code/datums/ai/movement/_ai_movement.dm
@@ -59,7 +59,7 @@
var/datum/ai_controller/controller = source.extra_info
// Check if this controller can actually run, so we don't chase people with corpses
- if(!controller.able_to_run())
+ if(!controller.able_to_run)
controller.CancelActions()
qdel(source) //stop moving
return MOVELOOP_SKIP_STEP
diff --git a/code/datums/ai/oldhostile/hostile_tameable.dm b/code/datums/ai/oldhostile/hostile_tameable.dm
index 0d68fe0abbe..907ab955a8d 100644
--- a/code/datums/ai/oldhostile/hostile_tameable.dm
+++ b/code/datums/ai/oldhostile/hostile_tameable.dm
@@ -50,7 +50,19 @@
if(buckler != blackboard[BB_HOSTILE_FRIEND])
return COMPONENT_BLOCK_BUCKLE
-/datum/ai_controller/hostile_friend/able_to_run()
+/datum/ai_controller/hostile_friend/on_stat_changed(mob/living/source, new_stat)
+ . = ..()
+ update_able_to_run()
+
+/datum/ai_controller/hostile_friend/setup_able_to_run()
+ . = ..()
+ RegisterSignal(pawn, COMSIG_MOB_INCAPACITATE_CHANGED, PROC_REF(update_able_to_run))
+
+/datum/ai_controller/hostile_friend/clear_able_to_run()
+ UnregisterSignal(pawn, list(COMSIG_MOB_INCAPACITATE_CHANGED, COMSIG_MOB_STATCHANGE))
+ return ..()
+
+/datum/ai_controller/hostile_friend/get_able_to_run()
var/mob/living/living_pawn = pawn
if(IS_DEAD_OR_INCAP(living_pawn))
@@ -129,7 +141,7 @@
/datum/ai_controller/hostile_friend/proc/check_menu(mob/user)
if(!istype(user))
CRASH("A non-mob is trying to issue an order to [pawn].")
- if(user.incapacitated() || !can_see(user, pawn))
+ if(user.incapacitated || !can_see(user, pawn))
return FALSE
return TRUE
diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm
index d5f0a0e9124..cd45ae1abf4 100644
--- a/code/datums/brain_damage/severe.dm
+++ b/code/datums/brain_damage/severe.dm
@@ -407,7 +407,7 @@
var/obj/item/bodypart/bodypart = owner.get_bodypart(owner.get_random_valid_zone(even_weights = TRUE))
if(!(bodypart && IS_ORGANIC_LIMB(bodypart)) && bodypart.bodypart_flags & BODYPART_PSEUDOPART)
return
- if(owner.incapacitated())
+ if(owner.incapacitated)
return
bodypart.receive_damage(scratch_damage)
if(SPT_PROB(33, seconds_per_tick))
diff --git a/code/datums/components/cult_ritual_item.dm b/code/datums/components/cult_ritual_item.dm
index dedd30bda0e..71e07e6380e 100644
--- a/code/datums/components/cult_ritual_item.dm
+++ b/code/datums/components/cult_ritual_item.dm
@@ -404,7 +404,7 @@
if(!rune.Adjacent(cultist))
return FALSE
- if(cultist.incapacitated())
+ if(cultist.incapacitated)
return FALSE
if(cultist.stat == DEAD)
@@ -427,7 +427,7 @@
if(QDELETED(tool) || !cultist.is_holding(tool))
return FALSE
- if(cultist.incapacitated() || cultist.stat == DEAD)
+ if(cultist.incapacitated || cultist.stat == DEAD)
to_chat(cultist, span_warning("You can't draw a rune right now."))
return FALSE
diff --git a/code/datums/components/fullauto.dm b/code/datums/components/fullauto.dm
index 1faa04ceacc..a3f2009b3b5 100644
--- a/code/datums/components/fullauto.dm
+++ b/code/datums/components/fullauto.dm
@@ -275,7 +275,7 @@
// Gun procs.
/obj/item/gun/proc/on_autofire_start(mob/living/shooter)
- if(semicd || shooter.incapacitated() || !can_trigger_gun(shooter))
+ if(semicd || shooter.incapacitated || !can_trigger_gun(shooter))
return FALSE
if(!can_shoot())
shoot_with_empty_chamber(shooter)
@@ -295,7 +295,7 @@
/obj/item/gun/proc/do_autofire(datum/source, atom/target, mob/living/shooter, allow_akimbo, params)
SIGNAL_HANDLER
- if(semicd || shooter.incapacitated())
+ if(semicd || shooter.incapacitated)
return NONE
if(!can_shoot())
shoot_with_empty_chamber(shooter)
diff --git a/code/datums/components/riding/riding_mob.dm b/code/datums/components/riding/riding_mob.dm
index 96d54ad92f1..1e3c94d84c6 100644
--- a/code/datums/components/riding/riding_mob.dm
+++ b/code/datums/components/riding/riding_mob.dm
@@ -58,10 +58,10 @@
if(living_parent.body_position != STANDING_UP) // if we move while on the ground, the rider falls off
. = FALSE
// for piggybacks and (redundant?) borg riding, check if the rider is stunned/restrained
- else if((ride_check_flags & RIDER_NEEDS_ARMS) && (HAS_TRAIT(rider, TRAIT_RESTRAINED) || rider.incapacitated(IGNORE_RESTRAINTS|IGNORE_GRAB)))
+ else if((ride_check_flags & RIDER_NEEDS_ARMS) && (HAS_TRAIT(rider, TRAIT_RESTRAINED) || INCAPACITATED_IGNORING(rider, INCAPABLE_RESTRAINTS|INCAPABLE_GRAB)))
. = FALSE
// for fireman carries, check if the ridden is stunned/restrained
- else if((ride_check_flags & CARRIER_NEEDS_ARM) && (HAS_TRAIT(living_parent, TRAIT_RESTRAINED) || living_parent.incapacitated(IGNORE_RESTRAINTS|IGNORE_GRAB)))
+ else if((ride_check_flags & CARRIER_NEEDS_ARM) && (HAS_TRAIT(living_parent, TRAIT_RESTRAINED) || INCAPACITATED_IGNORING(living_parent, INCAPABLE_RESTRAINTS|INCAPABLE_GRAB)))
. = FALSE
else if((ride_check_flags & JUST_FRIEND_RIDERS) && !(living_parent.faction.Find(REF(rider))))
. = FALSE
diff --git a/code/datums/components/space_kidnap.dm b/code/datums/components/space_kidnap.dm
index 8a1de2123d9..7d59a6d7f9f 100644
--- a/code/datums/components/space_kidnap.dm
+++ b/code/datums/components/space_kidnap.dm
@@ -23,7 +23,7 @@
target.balloon_alert(parent, "is dead!")
return COMPONENT_CANCEL_ATTACK_CHAIN
- if(!victim.incapacitated())
+ if(!victim.incapacitated)
return
if(!isspaceturf(get_turf(target)))
@@ -39,7 +39,7 @@
var/obj/particles = new /obj/effect/abstract/particle_holder (victim, /particles/void_kidnap)
kidnapping = TRUE
- if(do_after(parent, kidnap_time, victim, extra_checks = CALLBACK(victim, TYPE_PROC_REF(/mob, incapacitated))))
+ if(do_after(parent, kidnap_time, victim, extra_checks = victim.incapacitated))
take_them(victim)
qdel(particles)
diff --git a/code/datums/components/subtype_picker.dm b/code/datums/components/subtype_picker.dm
index 78401c9e022..2cc76e42ecf 100644
--- a/code/datums/components/subtype_picker.dm
+++ b/code/datums/components/subtype_picker.dm
@@ -87,6 +87,6 @@
return FALSE
if(QDELETED(target))
return FALSE
- if(user.incapacitated() || !user.is_holding(target))
+ if(user.incapacitated || !user.is_holding(target))
return FALSE
return TRUE
diff --git a/code/datums/components/tackle.dm b/code/datums/components/tackle.dm
index 8e902ced2fd..0c23733ea16 100644
--- a/code/datums/components/tackle.dm
+++ b/code/datums/components/tackle.dm
@@ -74,10 +74,7 @@
if(modifiers[ALT_CLICK] || modifiers[SHIFT_CLICK] || modifiers[CTRL_CLICK] || modifiers[MIDDLE_CLICK])
return
- if(!modifiers[RIGHT_CLICK])
- return
-
- if(!user.throw_mode || user.get_active_held_item() || user.pulling || user.buckled || user.incapacitated())
+ if(!user.throw_mode || user.get_active_held_item() || user.pulling || user.buckled || user.incapacitated)
return
if(!clicked_atom || !(isturf(clicked_atom) || isturf(clicked_atom.loc)))
diff --git a/code/datums/elements/waddling.dm b/code/datums/elements/waddling.dm
index e63d0329bb6..45c7fe5e937 100644
--- a/code/datums/elements/waddling.dm
+++ b/code/datums/elements/waddling.dm
@@ -18,7 +18,7 @@
return
if(isliving(moved))
var/mob/living/living_moved = moved
- if (living_moved.incapacitated() || living_moved.body_position == LYING_DOWN)
+ if (living_moved.incapacitated || living_moved.body_position == LYING_DOWN)
return
waddling_animation(moved)
diff --git a/code/datums/elements/wheel.dm b/code/datums/elements/wheel.dm
index 2bb8977ca5c..a50addb15a3 100644
--- a/code/datums/elements/wheel.dm
+++ b/code/datums/elements/wheel.dm
@@ -17,7 +17,7 @@
return
if(isliving(moved))
var/mob/living/living_moved = moved
- if (living_moved.incapacitated() || living_moved.body_position == LYING_DOWN)
+ if (living_moved.incapacitated || living_moved.body_position == LYING_DOWN)
return
var/rotation_degree = (360 / 3)
if(direction & SOUTHWEST)
diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm
index c69a279938d..fead0417db9 100644
--- a/code/datums/holocall.dm
+++ b/code/datums/holocall.dm
@@ -179,7 +179,7 @@
if(QDELETED(src))
return FALSE
- . = !QDELETED(user) && !user.incapacitated() && !QDELETED(calling_holopad) && calling_holopad.is_operational && user.loc == calling_holopad.loc
+ . = !QDELETED(user) && !user.incapacitated && !QDELETED(calling_holopad) && calling_holopad.is_operational && user.loc == calling_holopad.loc
if(.)
if(!connected_holopad)
diff --git a/code/datums/martial/boxing.dm b/code/datums/martial/boxing.dm
index 3465fe300a5..9d6252855d3 100644
--- a/code/datums/martial/boxing.dm
+++ b/code/datums/martial/boxing.dm
@@ -232,7 +232,7 @@
/datum/martial_art/boxing/proc/check_block(mob/living/boxer, atom/movable/hitby, damage, attack_text, attack_type, ...)
SIGNAL_HANDLER
- if(!can_use(boxer) || !boxer.throw_mode || boxer.incapacitated(IGNORE_GRAB))
+ if(!can_use(boxer) || !boxer.throw_mode || INCAPACITATED_IGNORING(boxer, INCAPABLE_GRAB))
return NONE
if(attack_type != UNARMED_ATTACK)
diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm
index 8e33ac5a851..28b820278e2 100644
--- a/code/datums/martial/cqc.dm
+++ b/code/datums/martial/cqc.dm
@@ -46,7 +46,7 @@
/datum/martial_art/cqc/proc/check_block(mob/living/cqc_user, atom/movable/hitby, damage, attack_text, attack_type, ...)
SIGNAL_HANDLER
- if(!can_use(cqc_user) || !cqc_user.throw_mode || cqc_user.incapacitated(IGNORE_GRAB))
+ if(!can_use(cqc_user) || !cqc_user.throw_mode || INCAPACITATED_IGNORING(cqc_user, INCAPABLE_GRAB))
return NONE
if(attack_type == PROJECTILE_ATTACK)
return NONE
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index 83c73dda0f6..02d0452fad2 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -184,7 +184,7 @@
/datum/martial_art/the_sleeping_carp/proc/can_deflect(mob/living/carp_user)
if(!can_use(carp_user) || !carp_user.combat_mode)
return FALSE
- if(carp_user.incapacitated(IGNORE_GRAB)) //NO STUN
+ if(INCAPACITATED_IGNORING(carp_user, INCAPABLE_GRAB)) //NO STUN
return FALSE
if(!(carp_user.mobility_flags & MOBILITY_USE)) //NO UNABLE TO USE
return FALSE
diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm
index 4bc6c77a9fe..38ecb0fa073 100644
--- a/code/datums/mutations/hulk.dm
+++ b/code/datums/mutations/hulk.dm
@@ -113,7 +113,7 @@
return
if(!user.throw_mode || user.get_active_held_item() || user.zone_selected != BODY_ZONE_PRECISE_GROIN)
return
- if(user.grab_state < GRAB_NECK || !iscarbon(user.pulling) || user.buckled || user.incapacitated())
+ if(user.grab_state < GRAB_NECK || !iscarbon(user.pulling) || user.buckled || user.incapacitated)
return
var/mob/living/carbon/possible_throwable = user.pulling
@@ -166,7 +166,7 @@
* For each step of the swinging, with the delay getting shorter along the way. Checks to see we still have them in our grasp at each step.
*/
/datum/mutation/human/hulk/proc/swing_loop(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person, step, original_dir)
- if(!yeeted_person || !the_hulk || the_hulk.incapacitated())
+ if(!yeeted_person || !the_hulk || the_hulk.incapacitated)
return
if(get_dist(the_hulk, yeeted_person) > 1 || !isturf(the_hulk.loc) || !isturf(yeeted_person.loc))
to_chat(the_hulk, span_warning("You lose your grasp on [yeeted_person]!"))
@@ -237,7 +237,7 @@
/// Time to toss the victim at high speed
/datum/mutation/human/hulk/proc/finish_swing(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person, original_dir)
- if(!yeeted_person || !the_hulk || the_hulk.incapacitated())
+ if(!yeeted_person || !the_hulk || the_hulk.incapacitated)
return
if(get_dist(the_hulk, yeeted_person) > 1 || !isturf(the_hulk.loc) || !isturf(yeeted_person.loc))
to_chat(the_hulk, span_warning("You lose your grasp on [yeeted_person]!"))
diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm
index 6f87a9f336d..08f5ae101bf 100644
--- a/code/datums/status_effects/debuffs/debuffs.dm
+++ b/code/datums/status_effects/debuffs/debuffs.dm
@@ -606,7 +606,7 @@
alert_type = null
/datum/status_effect/spasms/tick(seconds_between_ticks)
- if(owner.stat >= UNCONSCIOUS || owner.incapacitated() || HAS_TRAIT(owner, TRAIT_HANDS_BLOCKED) || HAS_TRAIT(owner, TRAIT_IMMOBILIZED))
+ if(owner.stat >= UNCONSCIOUS || owner.incapacitated || HAS_TRAIT(owner, TRAIT_HANDS_BLOCKED) || HAS_TRAIT(owner, TRAIT_IMMOBILIZED))
return
if(!prob(15))
return
diff --git a/code/datums/status_effects/debuffs/strandling.dm b/code/datums/status_effects/debuffs/strandling.dm
index 6050a3df304..0ce0ad41882 100644
--- a/code/datums/status_effects/debuffs/strandling.dm
+++ b/code/datums/status_effects/debuffs/strandling.dm
@@ -57,7 +57,7 @@
* tool - the tool the user's using to remove the strange. Can be null.
*/
/datum/status_effect/strandling/proc/try_remove_effect(mob/user, obj/item/tool)
- if(user.incapacitated() || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
+ if(user.incapacitated || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
user.visible_message(
diff --git a/code/datums/storage/storage.dm b/code/datums/storage/storage.dm
index 7d586c1e747..8bdfa3f3de2 100644
--- a/code/datums/storage/storage.dm
+++ b/code/datums/storage/storage.dm
@@ -738,7 +738,7 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)
/datum/storage/proc/on_mousedrop_onto(datum/source, atom/over_object, mob/user)
SIGNAL_HANDLER
- if(ismecha(user.loc) || !user.canUseStorage())
+ if(ismecha(user.loc) || user.incapacitated || !user.canUseStorage())
return
if(istype(over_object, /atom/movable/screen/inventory/hand))
@@ -827,6 +827,9 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)
return
if(!iscarbon(user) && !isdrone(user))
return
+ var/mob/living/user_living = user
+ if(user_living.incapacitated)
+ return
attempt_insert(dropping, user)
return COMPONENT_CANCEL_MOUSEDROPPED_ONTO
diff --git a/code/game/machinery/computer/orders/order_computer/mining_order.dm b/code/game/machinery/computer/orders/order_computer/mining_order.dm
index 7413dd5a38a..94fda727d5f 100644
--- a/code/game/machinery/computer/orders/order_computer/mining_order.dm
+++ b/code/game/machinery/computer/orders/order_computer/mining_order.dm
@@ -121,7 +121,7 @@
/obj/machinery/computer/order_console/mining/proc/check_menu(obj/item/mining_voucher/voucher, mob/living/redeemer)
if(!istype(redeemer))
return FALSE
- if(redeemer.incapacitated())
+ if(redeemer.incapacitated)
return FALSE
if(QDELETED(voucher))
return FALSE
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index f19c5153b8a..bf3d97426fd 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -168,7 +168,7 @@ Possible to do for anyone motivated enough:
/obj/machinery/holopad/tutorial/attack_hand(mob/user, list/modifiers)
if(!istype(user))
return
- if(user.incapacitated() || !is_operational)
+ if(user.incapacitated || !is_operational)
return
if(replay_mode)
replay_stop()
@@ -675,7 +675,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if(!isliving(owner))
return TRUE
var/mob/living/user = owner
- if(user.incapacitated() || !user.client)
+ if(user.incapacitated || !user.client)
return FALSE
return TRUE
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 52e294bc570..e1b10dae6e4 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -322,7 +322,7 @@
return
if(!usr.can_perform_action(src))
return
- if(usr.incapacitated())
+ if(usr.incapacitated)
return
if(reagent_container)
if(attached)
@@ -340,7 +340,7 @@
if(!isliving(usr))
to_chat(usr, span_warning("You can't do that!"))
return
- if(!usr.can_perform_action(src) || usr.incapacitated())
+ if(!usr.can_perform_action(src) || usr.incapacitated)
return
if(inject_only)
mode = IV_INJECTING
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index ef18dc6b068..39d6fe7d2ea 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -175,7 +175,7 @@ Buildable meters
set name = "Invert Pipe"
set src in view(1)
- if ( usr.incapacitated() )
+ if ( usr.incapacitated )
return
do_a_flip()
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index de7c6351e38..1e90b270c8c 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -187,6 +187,9 @@
//Allow you to drag-drop disposal pipes and transit tubes into it
/obj/machinery/pipedispenser/disposal/mouse_drop_receive(obj/structure/pipe, mob/user, params)
+ if(user.incapacitated)
+ return
+
if (!istype(pipe, /obj/structure/disposalconstruct) && !istype(pipe, /obj/structure/c_transit_tube) && !istype(pipe, /obj/structure/c_transit_tube_pod))
return
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index 3a7cc849acd..0ac1f7ee44d 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -621,7 +621,7 @@
balloon_alert(user, "set to [chosen_theme?.name || DIMENSION_CHOICE_RANDOM]")
/obj/item/bombcore/dimensional/proc/check_menu(mob/user)
- if(!user.is_holding(src) || user.incapacitated())
+ if(!user.is_holding(src) || user.incapacitated)
return FALSE
return TRUE
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index c0435d2a0e6..f06ac5d9209 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -266,7 +266,7 @@
*/
/atom/movable/proc/is_user_buckle_possible(mob/living/target, mob/user, check_loc = TRUE)
// Standard adjacency and other checks.
- if(!Adjacent(user) || !Adjacent(target) || !isturf(user.loc) || user.incapacitated() || target.anchored)
+ if(!Adjacent(user) || !Adjacent(target) || !isturf(user.loc) || user.incapacitated || target.anchored)
return FALSE
if(iscarbon(user))
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 78faffba9af..d8288801b90 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -794,7 +794,7 @@
set category = "Object"
set name = "Pick up"
- if(usr.incapacitated() || !Adjacent(usr))
+ if(usr.incapacitated || !Adjacent(usr))
return
if(isliving(usr))
@@ -1081,7 +1081,7 @@
var/timedelay = usr.client.prefs.read_preference(/datum/preference/numeric/tooltip_delay) / 100
tip_timer = addtimer(CALLBACK(src, PROC_REF(openTip), location, control, params, usr), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
if(usr.client.prefs.read_preference(/datum/preference/toggle/item_outlines))
- if(istype(L) && L.incapacitated())
+ if(istype(L) && L.incapacitated)
apply_outline(COLOR_RED_GRAY) //if they're dead or handcuffed, let's show the outline as red to indicate that they can't interact with that right now
else
apply_outline() //if the player's alive and well we send the command with no color set, so it uses the theme's color
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index c949f977508..4adb8d28b8c 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -86,7 +86,7 @@
return item_bag
/obj/item/bodybag/bluespace/container_resist_act(mob/living/user)
- if(user.incapacitated())
+ if(user.incapacitated)
to_chat(user, span_warning("You can't get out while you're restrained like this!"))
return
user.changeNext_move(CLICK_CD_BREAKOUT)
@@ -97,7 +97,7 @@
return
// you are still in the bag? time to go unless you KO'd, honey!
// if they escape during this time and you rebag them the timer is still clocking down and does NOT reset so they can very easily get out.
- if(user.incapacitated())
+ if(user.incapacitated)
to_chat(loc, span_warning("The pressure subsides. It seems that they've stopped resisting..."))
return
loc.visible_message(span_warning("[user] suddenly appears in front of [loc]!"), span_userdanger("[user] breaks free of [src]!"))
diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm
index d4508710a85..b49991b132a 100644
--- a/code/game/objects/items/cardboard_cutouts.dm
+++ b/code/game/objects/items/cardboard_cutouts.dm
@@ -149,7 +149,7 @@
/obj/item/cardboard_cutout/proc/check_menu(mob/living/user, obj/item/toy/crayon/crayon)
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
if(pushed_over)
to_chat(user, span_warning("Right [src] first!"))
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index 0f716c84f68..8490f30f1bb 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -1887,7 +1887,7 @@
/obj/item/card/cardboard/proc/after_input_check(mob/living/user, obj/item/item, input, value)
if(!input || (value && input == value))
return FALSE
- if(QDELETED(user) || QDELETED(item) || QDELETED(src) || user.incapacitated() || !user.is_holding(item) || !user.CanReach(src) || !user.can_write(item))
+ if(QDELETED(user) || QDELETED(item) || QDELETED(src) || user.incapacitated || !user.is_holding(item) || !user.CanReach(src) || !user.can_write(item))
return FALSE
return TRUE
diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm
index 05b222d83bb..35f14640278 100644
--- a/code/game/objects/items/cigs_lighters.dm
+++ b/code/game/objects/items/cigs_lighters.dm
@@ -244,7 +244,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!QDELETED(src) && !QDELETED(dropee) && how_long_have_we_been_smokin >= 4 SECONDS && iscarbon(dropee) && iscarbon(loc))
var/mob/living/carbon/smoker = dropee
// This relies on the fact that dropped is called before slot is nulled
- if(src == smoker.wear_mask && !smoker.incapacitated())
+ if(src == smoker.wear_mask && !smoker.incapacitated)
long_exhale(smoker)
UnregisterSignal(dropee, list(COMSIG_HUMAN_FORCESAY, COMSIG_ATOM_DIR_CHANGE))
diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm
index b22b113538b..2aa0c927bed 100644
--- a/code/game/objects/items/cosmetics.dm
+++ b/code/game/objects/items/cosmetics.dm
@@ -75,7 +75,7 @@
/obj/item/lipstick/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.is_holding(src))
+ if(user.incapacitated || !user.is_holding(src))
return FALSE
return TRUE
diff --git a/code/game/objects/items/debug_items.dm b/code/game/objects/items/debug_items.dm
index 071561d57a0..24f350f3790 100644
--- a/code/game/objects/items/debug_items.dm
+++ b/code/game/objects/items/debug_items.dm
@@ -46,7 +46,7 @@
/obj/item/debug/omnitool/proc/check_menu(mob/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index 02934d1a03e..b1e01e5a6ce 100644
--- a/code/game/objects/items/defib.dm
+++ b/code/game/objects/items/defib.dm
@@ -137,11 +137,12 @@
return ..()
/obj/item/defibrillator/mouse_drop_dragged(atom/over_object, mob/user, src_location, over_location, params)
- if(ismob(loc))
- var/mob/M = loc
- if(istype(over_object, /atom/movable/screen/inventory/hand))
- var/atom/movable/screen/inventory/hand/H = over_object
- M.putItemFromInventoryInHandIfPossible(src, H.held_index)
+ if(!ismob(loc))
+ return
+ var/mob/living_mob = loc
+ if(!living_mob.incapacitated && istype(over_object, /atom/movable/screen/inventory/hand))
+ var/atom/movable/screen/inventory/hand/hand = over_object
+ living_mob.putItemFromInventoryInHandIfPossible(src, hand.held_index)
/obj/item/defibrillator/screwdriver_act(mob/living/user, obj/item/tool)
if(!cell || !cell_removable)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 4211e2f5079..3fe16fdb3fd 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -271,7 +271,7 @@
//catpeople: make any felinid near the target to face the target, chance for felinids to pounce at the light, stepping to the target
for(var/mob/living/carbon/human/target_felinid in view(1, targloc))
- if(!isfelinid(target_felinid) || target_felinid.stat == DEAD || target_felinid.is_blind() || target_felinid.incapacitated())
+ if(!isfelinid(target_felinid) || target_felinid.stat == DEAD || target_felinid.is_blind() || target_felinid.incapacitated)
continue
if(target_felinid.body_position == STANDING_UP)
target_felinid.setDir(get_dir(target_felinid, targloc)) // kitty always looks at the light
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index a9b5af891ad..5673afc678a 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -462,6 +462,8 @@ GLOBAL_LIST_INIT(channel_tokens, list(
grant_headset_languages(mob_loc)
/obj/item/radio/headset/click_alt(mob/living/user)
+ if(!istype(user) || !Adjacent(user) || user.incapacitated)
+ return CLICK_ACTION_BLOCKING
if (!command)
return CLICK_ACTION_BLOCKING
use_command = !use_command
diff --git a/code/game/objects/items/devices/scanners/health_analyzer.dm b/code/game/objects/items/devices/scanners/health_analyzer.dm
index bebafbdab83..26df57683aa 100644
--- a/code/game/objects/items/devices/scanners/health_analyzer.dm
+++ b/code/game/objects/items/devices/scanners/health_analyzer.dm
@@ -132,7 +132,7 @@
* tochat - Whether to immediately post the result into the chat of the user, otherwise it will return the results.
*/
/proc/healthscan(mob/user, mob/living/target, mode = SCANNER_VERBOSE, advanced = FALSE, tochat = TRUE)
- if(user.incapacitated())
+ if(user.incapacitated)
return
// the final list of strings to render
@@ -409,7 +409,7 @@
return(jointext(render_list, ""))
/proc/chemscan(mob/living/user, mob/living/target)
- if(user.incapacitated())
+ if(user.incapacitated)
return
if(istype(target) && target.reagents)
@@ -495,7 +495,7 @@
/// Displays wounds with extended information on their status vs medscanners
/proc/woundscan(mob/user, mob/living/carbon/patient, obj/item/healthanalyzer/scanner, simple_scan = FALSE)
- if(!istype(patient) || user.incapacitated())
+ if(!istype(patient) || user.incapacitated)
return
var/render_list = ""
@@ -664,7 +664,7 @@
/// Checks the individual for any diseases that are visible to the scanner, and displays the diseases in the attacked to the attacker.
/proc/diseasescan(mob/user, mob/living/carbon/patient, obj/item/healthanalyzer/simple/scanner)
- if(!istype(patient) || user.incapacitated())
+ if(!istype(patient) || user.incapacitated)
return
var/list/render = list()
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index d30f379197e..b86489fae9e 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -122,7 +122,7 @@
/obj/item/taperecorder/proc/can_use(mob/user)
if(user && ismob(user))
- if(!user.incapacitated())
+ if(!user.incapacitated)
return TRUE
return FALSE
diff --git a/code/game/objects/items/paint.dm b/code/game/objects/items/paint.dm
index 41c1809b558..66e0b15e99f 100644
--- a/code/game/objects/items/paint.dm
+++ b/code/game/objects/items/paint.dm
@@ -108,7 +108,7 @@
return FALSE
if(!user.is_holding(src))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
return TRUE
diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm
index 5d7fc1957f4..526b5ca2e98 100644
--- a/code/game/objects/items/pinpointer.dm
+++ b/code/game/objects/items/pinpointer.dm
@@ -152,7 +152,7 @@
return
if(isnull(names[pinpoint_target]))
return
- if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
+ if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated)
return
target = names[pinpoint_target]
toggle_on()
diff --git a/code/game/objects/items/rcd/RHD.dm b/code/game/objects/items/rcd/RHD.dm
index 64179a81b5f..a212274ce46 100644
--- a/code/game/objects/items/rcd/RHD.dm
+++ b/code/game/objects/items/rcd/RHD.dm
@@ -292,7 +292,7 @@
/obj/item/construction/proc/check_menu(mob/living/user, remote_anchor)
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
if(remote_anchor && user.remote_control != remote_anchor)
return FALSE
diff --git a/code/game/objects/items/rcd/RPD.dm b/code/game/objects/items/rcd/RPD.dm
index c4dfec13d47..ba01f38280c 100644
--- a/code/game/objects/items/rcd/RPD.dm
+++ b/code/game/objects/items/rcd/RPD.dm
@@ -688,7 +688,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
if(multi_layer)
balloon_alert(source_mob, "turn off multi layer!")
return
- if(source_mob.incapacitated(IGNORE_RESTRAINTS|IGNORE_STASIS))
+ if(INCAPACITATED_IGNORING(source_mob, INCAPABLE_RESTRAINTS|INCAPABLE_STASIS))
return
if(source_mob.get_active_held_item() != src)
return
diff --git a/code/game/objects/items/rcd/RPLD.dm b/code/game/objects/items/rcd/RPLD.dm
index e9a5fcc66db..9a046bd8461 100644
--- a/code/game/objects/items/rcd/RPLD.dm
+++ b/code/game/objects/items/rcd/RPLD.dm
@@ -287,7 +287,7 @@
/obj/item/construction/plumbing/proc/mouse_wheeled(mob/source, atom/A, delta_x, delta_y, params)
SIGNAL_HANDLER
- if(source.incapacitated(IGNORE_RESTRAINTS|IGNORE_STASIS))
+ if(INCAPACITATED_IGNORING(source, INCAPABLE_RESTRAINTS|INCAPABLE_STASIS))
return
if(delta_y == 0)
return
diff --git a/code/game/objects/items/rcd/RSF.dm b/code/game/objects/items/rcd/RSF.dm
index ee85994143a..e3d27620ce9 100644
--- a/code/game/objects/items/rcd/RSF.dm
+++ b/code/game/objects/items/rcd/RSF.dm
@@ -121,7 +121,7 @@ RSF
return radial_list
/obj/item/rsf/proc/check_menu(mob/user)
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/game/objects/items/rcd/RWD.dm b/code/game/objects/items/rcd/RWD.dm
index 0ee29e87a35..bafbfdc5d8d 100644
--- a/code/game/objects/items/rcd/RWD.dm
+++ b/code/game/objects/items/rcd/RWD.dm
@@ -152,7 +152,7 @@
if(!ISADVANCEDTOOLUSER(user))
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/game/objects/items/scrolls.dm b/code/game/objects/items/scrolls.dm
index 65d9000728d..3fea8376eb3 100644
--- a/code/game/objects/items/scrolls.dm
+++ b/code/game/objects/items/scrolls.dm
@@ -55,7 +55,7 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/human_user = user
- if(human_user.incapacitated() || !human_user.is_holding(src))
+ if(human_user.incapacitated || !human_user.is_holding(src))
return
var/datum/action/cooldown/spell/teleport/area_teleport/wizard/scroll/teleport = locate() in actions
if(!teleport)
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 6246136d268..5eb651b2905 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -369,7 +369,7 @@
/obj/item/stack/proc/radial_check(mob/builder)
if(QDELETED(builder) || QDELETED(src))
return FALSE
- if(builder.incapacitated())
+ if(builder.incapacitated)
return FALSE
if(!builder.is_holding(src))
return FALSE
diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm
index 05e1dff79cc..15db8bd6bf2 100644
--- a/code/game/objects/items/storage/bags.dm
+++ b/code/game/objects/items/storage/bags.dm
@@ -274,6 +274,8 @@
. += span_notice("Ctrl-click to activate seed extraction.")
/obj/item/storage/bag/plants/portaseeder/item_ctrl_click(mob/user)
+ if(user.incapacitated)
+ return
for(var/obj/item/plant in contents)
seedify(plant, 1)
return CLICK_ACTION_SUCCESS
diff --git a/code/game/objects/items/storage/boxes/food_boxes.dm b/code/game/objects/items/storage/boxes/food_boxes.dm
index bccb04f14d0..86d59123c72 100644
--- a/code/game/objects/items/storage/boxes/food_boxes.dm
+++ b/code/game/objects/items/storage/boxes/food_boxes.dm
@@ -126,7 +126,7 @@
/obj/item/storage/box/papersack/proc/check_menu(mob/user, obj/item/pen/P)
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
if(contents.len)
balloon_alert(user, "items inside!")
diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm
index cd5a9a1841e..a7a577c77cf 100644
--- a/code/game/objects/items/tanks/jetpack.dm
+++ b/code/game/objects/items/tanks/jetpack.dm
@@ -79,7 +79,7 @@
toggle_internals(user)
/obj/item/tank/jetpack/proc/cycle(mob/user)
- if(user.incapacitated())
+ if(user.incapacitated)
return
if(!on)
diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm
index 8094a9a21c8..15db2a5d3ed 100644
--- a/code/game/objects/items/tanks/watertank.dm
+++ b/code/game/objects/items/tanks/watertank.dm
@@ -47,7 +47,7 @@
if(user.get_item_by_slot(user.getBackSlot()) != src)
to_chat(user, span_warning("The watertank must be worn properly to use!"))
return
- if(user.incapacitated())
+ if(user.incapacitated)
return
if(QDELETED(noz))
diff --git a/code/game/objects/items/tcg/tcg.dm b/code/game/objects/items/tcg/tcg.dm
index fc2eeba82ff..23204b4809f 100644
--- a/code/game/objects/items/tcg/tcg.dm
+++ b/code/game/objects/items/tcg/tcg.dm
@@ -151,7 +151,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/tcgcard/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
@@ -249,7 +249,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/tcgcard_deck/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/game/objects/items/tcg/tcg_machines.dm b/code/game/objects/items/tcg/tcg_machines.dm
index 78854afdd5b..77b6891e4c1 100644
--- a/code/game/objects/items/tcg/tcg_machines.dm
+++ b/code/game/objects/items/tcg/tcg_machines.dm
@@ -105,7 +105,7 @@ GLOBAL_LIST_EMPTY(tcgcard_machine_radial_choices)
/obj/machinery/trading_card_holder/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
@@ -356,7 +356,7 @@ GLOBAL_LIST_EMPTY(tcgcard_mana_bar_radial_choices)
/obj/machinery/trading_card_button/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm
index 04f5a0688db..6fa7e8d23b3 100644
--- a/code/game/objects/items/teleportation.dm
+++ b/code/game/objects/items/teleportation.dm
@@ -190,7 +190,7 @@
var/teleport_location_key = tgui_input_list(user, "Teleporter to lock on", "Hand Teleporter", sort_list(locations))
if (isnull(teleport_location_key))
return
- if(user.get_active_held_item() != src || user.incapacitated())
+ if(user.get_active_held_item() != src || user.incapacitated)
return
// Not always a datum, but needed for IS_WEAKREF_OF to cast properly.
diff --git a/code/game/objects/items/toy_mechs.dm b/code/game/objects/items/toy_mechs.dm
index 1b3367032c1..d08deec62e3 100644
--- a/code/game/objects/items/toy_mechs.dm
+++ b/code/game/objects/items/toy_mechs.dm
@@ -96,7 +96,7 @@
return FALSE
//dead men tell no tales, incapacitated men fight no fights
- if(attacker_controller.incapacitated())
+ if(attacker_controller.incapacitated)
return FALSE
//if the attacker_controller isn't next to the attacking toy (and doesn't have telekinesis), the battle ends
if(!in_range(attacker, attacker_controller) && !(attacker_controller.dna.check_mutation(/datum/mutation/human/telekinesis)))
@@ -106,7 +106,7 @@
//if it's PVP and the opponent is not next to the defending(src) toy (and doesn't have telekinesis), the battle ends
if(opponent)
- if(opponent.incapacitated())
+ if(opponent.incapacitated)
return FALSE
if(!in_range(src, opponent) && !(opponent.dna.check_mutation(/datum/mutation/human/telekinesis)))
opponent.visible_message(span_notice("[opponent.name] separates from [src], ending the battle."), \
diff --git a/code/game/objects/items_reskin.dm b/code/game/objects/items_reskin.dm
index 9fa3b91d0e1..f8bffa7bf5f 100644
--- a/code/game/objects/items_reskin.dm
+++ b/code/game/objects/items_reskin.dm
@@ -81,6 +81,6 @@
return FALSE
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
return TRUE
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 1b9282be661..ef436e24e8c 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -190,7 +190,6 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag)
if(obj_flags & UNIQUE_RENAME)
. += span_notice("Use a pen on it to rename it or change its description.")
-
/obj/analyzer_act(mob/living/user, obj/item/analyzer/tool)
if(atmos_scan(user=user, target=src, silent=FALSE))
return TRUE
diff --git a/code/game/objects/structures/beds_chairs/alien_nest.dm b/code/game/objects/structures/beds_chairs/alien_nest.dm
index 681724f4d40..365e790ca48 100644
--- a/code/game/objects/structures/beds_chairs/alien_nest.dm
+++ b/code/game/objects/structures/beds_chairs/alien_nest.dm
@@ -56,7 +56,7 @@
add_fingerprint(hero)
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
- if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.incapacitated() || M.buckled )
+ if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.incapacitated || M.buckled )
return
if(M.get_organ_by_type(/obj/item/organ/internal/alien/plasmavessel))
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 27e69dcba56..f407dcd82c0 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -915,6 +915,8 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets)
/obj/structure/closet/mouse_drop_receive(atom/movable/O, mob/living/user, params)
if(!istype(O) || O.anchored || istype(O, /atom/movable/screen))
return
+ if(!istype(user) || user.incapacitated || user.body_position == LYING_DOWN)
+ return
if(user == O) //try to climb onto it
return ..()
if(!opened)
diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
index f0d1eaa0cc8..2f555ed84de 100644
--- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
+++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
@@ -32,7 +32,7 @@
var/move_delay = FALSE
/obj/structure/closet/cardboard/relaymove(mob/living/user, direction)
- if(opened || move_delay || user.incapacitated() || !isturf(loc) || !has_gravity(loc))
+ if(opened || move_delay || user.incapacitated || !isturf(loc) || !has_gravity(loc))
return
move_delay = TRUE
var/oldloc = loc
@@ -72,7 +72,7 @@
for(var/mob/living/alerted_mob as anything in alerted)
if(alerted_mob.stat != CONSCIOUS || alerted_mob.is_blind())
continue
- if(!alerted_mob.incapacitated(IGNORE_RESTRAINTS))
+ if(!INCAPACITATED_IGNORING(alerted_mob, INCAPABLE_RESTRAINTS))
alerted_mob.face_atom(src)
alerted_mob.do_alert_animation()
diff --git a/code/game/objects/structures/deployable_turret.dm b/code/game/objects/structures/deployable_turret.dm
index 2b1a90500cc..908d2348db4 100644
--- a/code/game/objects/structures/deployable_turret.dm
+++ b/code/game/objects/structures/deployable_turret.dm
@@ -85,7 +85,7 @@
STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/deployable_turret/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
- if(user.incapacitated() || !istype(user))
+ if(user.incapacitated || !istype(user))
return
M.forceMove(get_turf(src))
. = ..()
@@ -129,7 +129,7 @@
calculated_projectile_vars = calculate_projectile_angle_and_pixel_offsets(controller, target_turf, modifiers)
/obj/machinery/deployable_turret/proc/direction_track(mob/user, atom/targeted)
- if(user.incapacitated())
+ if(user.incapacitated)
return
setDir(get_dir(src,targeted))
user.setDir(dir)
@@ -169,7 +169,7 @@
/obj/machinery/deployable_turret/proc/checkfire(atom/targeted_atom, mob/user)
target = targeted_atom
- if(target == user || user.incapacitated() || target == get_turf(src))
+ if(target == user || user.incapacitated || target == get_turf(src))
return
if(world.time < cooldown)
if(!warned && world.time > (cooldown - cooldown_duration + rate_of_fire*number_of_shots)) // To capture the window where one is done firing
@@ -187,7 +187,7 @@
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/deployable_turret/, fire_helper), user), i*rate_of_fire)
/obj/machinery/deployable_turret/proc/fire_helper(mob/user)
- if(user.incapacitated() || !(user in buckled_mobs))
+ if(user.incapacitated || !(user in buckled_mobs))
return
update_positioning() //REFRESH MOUSE TRACKING!!
var/turf/targets_from = get_turf(src)
diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm
index 4f4972d4864..b297b670b0e 100644
--- a/code/game/objects/structures/guncase.dm
+++ b/code/game/objects/structures/guncase.dm
@@ -104,7 +104,7 @@
return FALSE
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
return TRUE
diff --git a/code/game/objects/structures/janitor.dm b/code/game/objects/structures/janitor.dm
index 0413bcac539..a8df82e02b2 100644
--- a/code/game/objects/structures/janitor.dm
+++ b/code/game/objects/structures/janitor.dm
@@ -337,7 +337,7 @@
* * user The mob interacting with a menu
*/
/obj/structure/mop_bucket/janitorialcart/proc/check_menu(mob/living/user)
- return istype(user) && !user.incapacitated()
+ return istype(user) && !user.incapacitated
/obj/structure/mop_bucket/janitorialcart/update_overlays()
. = ..()
diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm
index 314539aa2b4..ffe4ea44a00 100644
--- a/code/game/objects/structures/ladders.dm
+++ b/code/game/objects/structures/ladders.dm
@@ -182,7 +182,7 @@
INVOKE_ASYNC(src, PROC_REF(start_travelling), user, going_up)
/obj/structure/ladder/proc/check_menu(mob/user, is_ghost)
- if(user.incapacitated() || (!user.Adjacent(src)))
+ if(user.incapacitated || (!user.Adjacent(src)))
return FALSE
return TRUE
diff --git a/code/game/objects/structures/maintenance.dm b/code/game/objects/structures/maintenance.dm
index 375d5269918..9f88246966f 100644
--- a/code/game/objects/structures/maintenance.dm
+++ b/code/game/objects/structures/maintenance.dm
@@ -226,7 +226,7 @@ at the cost of risking a vicious bite.**/
/obj/structure/destructible/cult/pants_altar/proc/check_menu(mob/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
index f88aadc0463..6522a2125fe 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
@@ -69,7 +69,7 @@
deconstruct(FALSE)
/obj/structure/transit_tube_pod/container_resist_act(mob/living/user)
- if(!user.incapacitated())
+ if(!user.incapacitated)
empty_pod()
return
if(!moving)
diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm
index ed31138bb19..a78579d713e 100644
--- a/code/game/turfs/closed/walls.dm
+++ b/code/game/turfs/closed/walls.dm
@@ -40,7 +40,7 @@
if(!iscarbon(dropping) && !iscyborg(dropping))
return
var/mob/living/leaner = dropping
- if(leaner.incapacitated(IGNORE_RESTRAINTS) || leaner.stat != CONSCIOUS || HAS_TRAIT(leaner, TRAIT_NO_TRANSFORM))
+ if(INCAPACITATED_IGNORING(leaner, INCAPABLE_RESTRAINTS) || leaner.stat != CONSCIOUS || HAS_TRAIT(leaner, TRAIT_NO_TRANSFORM))
return
if(!leaner.density || leaner.pulledby || leaner.buckled || !(leaner.mobility_flags & MOBILITY_STAND))
return
diff --git a/code/game/turfs/open/floor/light_floor.dm b/code/game/turfs/open/floor/light_floor.dm
index dd30a86d8de..793e4ce8e55 100644
--- a/code/game/turfs/open/floor/light_floor.dm
+++ b/code/game/turfs/open/floor/light_floor.dm
@@ -184,7 +184,7 @@
/turf/open/floor/light/proc/check_menu(mob/living/user, obj/item/multitool)
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
if(!multitool || !user.is_holding(multitool))
return FALSE
diff --git a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
index d3f162f5fb5..25bbea66577 100644
--- a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
+++ b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
@@ -384,7 +384,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/item/melee/baton/abductor/proc/SleepAttack(mob/living/target, mob/living/user)
playsound(src, on_stun_sound, 50, TRUE, -1)
- if(target.incapacitated(IGNORE_RESTRAINTS|IGNORE_GRAB))
+ if(INCAPACITATED_IGNORING(target, INCAPABLE_RESTRAINTS|INCAPABLE_GRAB))
if(target.can_block_magic(MAGIC_RESISTANCE_MIND))
to_chat(user, span_warning("The specimen has some kind of mental protection that is interfering with the sleep inducement! It seems you've been foiled."))
target.visible_message(span_danger("[user] tried to induced sleep in [target] with [src], but is unsuccessful!"), \
@@ -689,7 +689,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/item/abductor/alien_omnitool/proc/check_menu(mob/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm
index 2abe51fa02d..cf03718649c 100644
--- a/code/modules/antagonists/cult/blood_magic.dm
+++ b/code/modules/antagonists/cult/blood_magic.dm
@@ -79,7 +79,7 @@
return
qdel(nullify_spell)
BS = possible_spells[entered_spell_name]
- if(QDELETED(src) || owner.incapacitated() || !BS || (rune && !(locate(/obj/effect/rune/empower) in range(1, owner))) || (length(spells) >= limit))
+ if(QDELETED(src) || owner.incapacitated || !BS || (rune && !(locate(/obj/effect/rune/empower) in range(1, owner))) || (length(spells) >= limit))
return
to_chat(owner,span_warning("You begin to carve unnatural symbols into your flesh!"))
SEND_SOUND(owner, sound('sound/weapons/slice.ogg',0,1,10))
@@ -137,7 +137,7 @@
..()
/datum/action/innate/cult/blood_spell/IsAvailable(feedback = FALSE)
- if(!IS_CULTIST(owner) || owner.incapacitated() || (!charges && deletes_on_empty))
+ if(!IS_CULTIST(owner) || owner.incapacitated || (!charges && deletes_on_empty))
return FALSE
return ..()
@@ -515,7 +515,7 @@
to_chat(user, span_warning("You must pick a valid rune!"))
return
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
- if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !actual_selected_rune)
+ if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated || !actual_selected_rune)
return
var/turf/dest = get_turf(actual_selected_rune)
if(dest.is_blocked_turf(TRUE))
@@ -701,7 +701,7 @@
/obj/item/melee/blood_magic/construction/proc/check_menu(mob/user)
if(!istype(user))
CRASH("The cult construct selection radial menu was accessed by something other than a valid user.")
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
@@ -967,7 +967,7 @@
/obj/item/melee/blood_magic/manipulator/proc/check_menu(mob/living/user)
if(!istype(user))
CRASH("The Blood Rites manipulator radial menu was accessed by something other than a valid user.")
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm
index a4f3b291f74..3d567799650 100644
--- a/code/modules/antagonists/cult/cult_comms.dm
+++ b/code/modules/antagonists/cult/cult_comms.dm
@@ -120,7 +120,7 @@
if(!team_member.current)
continue
team_member.current.update_mob_action_buttons()
- if(team_member.current.incapacitated())
+ if(team_member.current.incapacitated)
continue
SEND_SOUND(team_member.current, 'sound/hallucinations/im_here1.ogg')
to_chat(team_member.current, span_cult_large("Acolyte [nominee] has asserted that [nominee.p_theyre()] worthy of leading the cult. A vote will be called shortly."))
@@ -129,19 +129,19 @@
///Polls all Cultists on whether the person putting themselves forward should be made the Cult Leader, if they can actually be such.
/proc/poll_cultists_for_leader(mob/living/nominee, datum/team/cult/team)
- if(QDELETED(nominee) || nominee.incapacitated())
+ if(QDELETED(nominee) || nominee.incapacitated)
team.cult_vote_called = FALSE
for(var/datum/mind/team_member as anything in team.members)
if(!team_member.current)
continue
team_member.current.update_mob_action_buttons()
- if(team_member.current.incapacitated())
+ if(team_member.current.incapacitated)
continue
to_chat(team_member.current,span_cult_large("[nominee] has died in the process of attempting to start a vote!"))
return FALSE
var/list/mob/living/asked_cultists = list()
for(var/datum/mind/team_member as anything in team.members)
- if(!team_member.current || team_member.current == nominee || team_member.current.incapacitated())
+ if(!team_member.current || team_member.current == nominee || team_member.current.incapacitated)
continue
SEND_SOUND(team_member.current, 'sound/magic/exit_blood.ogg')
asked_cultists += team_member.current
@@ -161,13 +161,13 @@
chat_text_border_icon = mutable_appearance('icons/effects/effects.dmi', "cult_master_logo")
)
)
- if(QDELETED(nominee) || nominee.incapacitated())
+ if(QDELETED(nominee) || nominee.incapacitated)
team.cult_vote_called = FALSE
for(var/datum/mind/team_member as anything in team.members)
if(!team_member.current)
continue
team_member.current.update_mob_action_buttons()
- if(team_member.current.incapacitated())
+ if(team_member.current.incapacitated)
continue
to_chat(team_member.current,span_cult_large("[nominee] has died in the process of attempting to win the cult's support!"))
return FALSE
@@ -177,7 +177,7 @@
if(!team_member.current)
continue
team_member.current.update_mob_action_buttons()
- if(team_member.current.incapacitated())
+ if(team_member.current.incapacitated)
continue
to_chat(team_member.current,span_cult_large("[nominee] has gone catatonic in the process of attempting to win the cult's support!"))
return FALSE
@@ -187,7 +187,7 @@
if(!team_member.current)
continue
team_member.current.update_mob_action_buttons()
- if(team_member.current.incapacitated())
+ if(team_member.current.incapacitated)
continue
to_chat(team_member.current, span_cult_large("[nominee] could not win the cult's support and shall continue to serve as an acolyte."))
return FALSE
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index 5226039a86b..9d386b8f11b 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -911,7 +911,7 @@ Striking a noncultist, however, will tear their flesh."}
cultists |= cult_mind.current
var/mob/living/cultist_to_receive = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", (cultists - user))
- if(QDELETED(src) || loc != user || user.incapacitated())
+ if(QDELETED(src) || loc != user || user.incapacitated)
return ITEM_INTERACT_BLOCKING
if(isnull(cultist_to_receive))
to_chat(user, span_cult_italic("You require a destination!"))
diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm
index 2cdb2c2e6f4..773f890d25d 100644
--- a/code/modules/antagonists/cult/cult_structures.dm
+++ b/code/modules/antagonists/cult/cult_structures.dm
@@ -201,7 +201,7 @@
* Returns TRUE if the user is a living mob that is a cultist and is not incapacitated.
*/
/obj/structure/destructible/cult/item_dispenser/proc/check_menu(mob/user)
- return isliving(user) && is_cultist_check(user) && !user.incapacitated()
+ return isliving(user) && is_cultist_check(user) && !user.incapacitated
// Spooky looking door used in gateways. Or something.
/obj/effect/gateway
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index a365060b509..d8aaf89283d 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -512,7 +512,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
return
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
- if(!Adjacent(user) || QDELETED(src) || user.incapacitated() || !actual_selected_rune)
+ if(!Adjacent(user) || QDELETED(src) || user.incapacitated || !actual_selected_rune)
fail_invoke()
return
@@ -781,7 +781,7 @@ GLOBAL_VAR_INIT(narsie_summon_count, 0)
/obj/effect/rune/raise_dead/proc/validness_checks(mob/living/target_mob, mob/living/user)
if(QDELETED(user))
return FALSE
- if(!Adjacent(user) || user.incapacitated())
+ if(!Adjacent(user) || user.incapacitated)
return FALSE
if(QDELETED(target_mob))
return FALSE
@@ -846,7 +846,7 @@ GLOBAL_VAR_INIT(narsie_summon_count, 0)
return
var/mob/living/cultist_to_summon = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists)
var/fail_logmsg = "Summon Cultist rune activated by [user] at [COORD(src)] failed - "
- if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
+ if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated)
return
if(isnull(cultist_to_summon))
to_chat(user, "You require a summoning target!")
diff --git a/code/modules/antagonists/heretic/knowledge/blade_lore.dm b/code/modules/antagonists/heretic/knowledge/blade_lore.dm
index de79151739f..55db187ee73 100644
--- a/code/modules/antagonists/heretic/knowledge/blade_lore.dm
+++ b/code/modules/antagonists/heretic/knowledge/blade_lore.dm
@@ -147,7 +147,7 @@
if(!riposte_ready)
return
- if(source.incapacitated(IGNORE_GRAB))
+ if(INCAPACITATED_IGNORING(source, INCAPABLE_GRAB))
return
var/mob/living/attacker = hitby.loc
diff --git a/code/modules/antagonists/malf_ai/malf_ai_modules.dm b/code/modules/antagonists/malf_ai/malf_ai_modules.dm
index 5d3c2368fe4..90f3b766492 100644
--- a/code/modules/antagonists/malf_ai/malf_ai_modules.dm
+++ b/code/modules/antagonists/malf_ai/malf_ai_modules.dm
@@ -446,7 +446,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
desc = "[desc] It has [uses] use\s remaining."
/datum/action/innate/ai/ranged/override_machine/do_ability(mob/living/caller, atom/clicked_on)
- if(caller.incapacitated())
+ if(caller.incapacitated)
unset_ranged_ability(caller)
return FALSE
if(!ismachinery(clicked_on))
@@ -539,7 +539,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
qdel(to_explode)
/datum/action/innate/ai/ranged/overload_machine/do_ability(mob/living/caller, atom/clicked_on)
- if(caller.incapacitated())
+ if(caller.incapacitated)
unset_ranged_ability(caller)
return FALSE
if(!ismachinery(clicked_on))
@@ -679,7 +679,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
C.images -= I
/mob/living/silicon/ai/proc/can_place_transformer(datum/action/innate/ai/place_transformer/action)
- if(!eyeobj || !isturf(loc) || incapacitated() || !action)
+ if(!eyeobj || !isturf(loc) || incapacitated || !action)
return
var/turf/middle = get_turf(eyeobj)
var/list/turfs = list(middle, locate(middle.x - 1, middle.y, middle.z), locate(middle.x + 1, middle.y, middle.z))
@@ -1096,7 +1096,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
var/mob/living/silicon/ai/ai_caller = caller
- if(ai_caller.incapacitated())
+ if(ai_caller.incapacitated)
unset_ranged_ability(caller)
return FALSE
@@ -1186,7 +1186,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
return FALSE
var/mob/living/silicon/ai/ai_caller = caller
- if (ai_caller.incapacitated() || !isturf(ai_caller.loc))
+ if (ai_caller.incapacitated || !isturf(ai_caller.loc))
return FALSE
var/turf/target = get_turf(clicked_on)
@@ -1214,7 +1214,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
COOLDOWN_START(src, time_til_next_tilt, roll_over_cooldown)
/datum/action/innate/ai/ranged/core_tilt/proc/do_roll_over(mob/living/silicon/ai/ai_caller, picked_dir)
- if (ai_caller.incapacitated() || !isturf(ai_caller.loc)) // prevents bugs where the ai is carded and rolls
+ if (ai_caller.incapacitated || !isturf(ai_caller.loc)) // prevents bugs where the ai is carded and rolls
return
var/turf/target = get_step(ai_caller, picked_dir) // in case we moved we pass the dir not the target turf
@@ -1228,7 +1228,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
/// Used in our radial menu, state-checking proc after the radial menu sleeps
/datum/action/innate/ai/ranged/core_tilt/proc/radial_check(mob/living/silicon/ai/caller)
- if (QDELETED(caller) || caller.incapacitated() || caller.stat == DEAD)
+ if (QDELETED(caller) || caller.incapacitated || caller.stat == DEAD)
return FALSE
if (uses <= 0)
@@ -1275,7 +1275,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
return FALSE
var/mob/living/silicon/ai/ai_caller = caller
- if(ai_caller.incapacitated())
+ if(ai_caller.incapacitated)
unset_ranged_ability(caller)
return FALSE
@@ -1331,7 +1331,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
/// Used in our radial menu, state-checking proc after the radial menu sleeps
/datum/action/innate/ai/ranged/remote_vendor_tilt/proc/radial_check(mob/living/silicon/ai/caller, obj/machinery/vending/clicked_vendor)
- if (QDELETED(caller) || caller.incapacitated() || caller.stat == DEAD)
+ if (QDELETED(caller) || caller.incapacitated || caller.stat == DEAD)
return FALSE
if (QDELETED(clicked_vendor))
diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm
index 0d2e4132d4b..d490944e1e3 100644
--- a/code/modules/antagonists/revolution/revolution.dm
+++ b/code/modules/antagonists/revolution/revolution.dm
@@ -431,7 +431,7 @@
var/list/datum/mind/promotable = list()
var/list/datum/mind/monkey_promotable = list()
for(var/datum/mind/khrushchev in non_heads)
- if(khrushchev.current && !khrushchev.current.incapacitated() && !HAS_TRAIT(khrushchev.current, TRAIT_RESTRAINED) && khrushchev.current.client)
+ if(khrushchev.current && !khrushchev.current.incapacitated && !HAS_TRAIT(khrushchev.current, TRAIT_RESTRAINED) && khrushchev.current.client)
if((ROLE_REV_HEAD in khrushchev.current.client.prefs.be_special) || (ROLE_PROVOCATEUR in khrushchev.current.client.prefs.be_special))
if(!ismonkey(khrushchev.current))
promotable += khrushchev
diff --git a/code/modules/antagonists/spy/spy_bounty.dm b/code/modules/antagonists/spy/spy_bounty.dm
index 01a1a1baf7b..42ab0203e5c 100644
--- a/code/modules/antagonists/spy/spy_bounty.dm
+++ b/code/modules/antagonists/spy/spy_bounty.dm
@@ -529,7 +529,7 @@
return TRUE
if(IS_WEAKREF_OF(stealing, target_ref))
var/mob/living/carbon/human/target = stealing
- if(!target.incapacitated(IGNORE_RESTRAINTS|IGNORE_STASIS))
+ if(!INCAPACITATED_IGNORING(target, INCAPABLE_RESTRAINTS|INCAPABLE_STASIS))
return FALSE
if(find_desired_thing(target))
return TRUE
diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm
index 64b81e1bd70..f8f5cf22350 100644
--- a/code/modules/antagonists/wizard/equipment/soulstone.dm
+++ b/code/modules/antagonists/wizard/equipment/soulstone.dm
@@ -372,7 +372,7 @@
/obj/item/soulstone/proc/check_menu(mob/user, obj/structure/constructshell/shell)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.is_holding(src) || !user.CanReach(shell, src))
+ if(user.incapacitated || !user.is_holding(src) || !user.CanReach(shell, src))
return FALSE
return TRUE
@@ -444,7 +444,7 @@
/// Called when a ghost is chosen to become a shade.
/obj/item/soulstone/proc/on_poll_concluded(mob/living/master, mob/living/victim, mob/dead/observer/ghost)
- if(isnull(victim) || master.incapacitated() || !master.is_holding(src) || !master.CanReach(victim, src))
+ if(isnull(victim) || master.incapacitated || !master.is_holding(src) || !master.CanReach(victim, src))
return FALSE
if(isnull(ghost?.client))
to_chat(master, span_danger("There were no spirits willing to become a shade."))
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index acb454a9836..70cafb11be8 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -660,7 +660,7 @@
if(isliving(target))
var/mob/living/living_mob = target
- if(living_mob.incapacitated())
+ if(living_mob.incapacitated)
close_machine(target)
return
diff --git a/code/modules/cards/cardhand.dm b/code/modules/cards/cardhand.dm
index ac14e17fea6..8fc9b4d0dc7 100644
--- a/code/modules/cards/cardhand.dm
+++ b/code/modules/cards/cardhand.dm
@@ -67,7 +67,7 @@
qdel(src) // cardhand is empty now so delete it
/obj/item/toy/cards/cardhand/proc/check_menu(mob/living/user)
- return isliving(user) && !user.incapacitated()
+ return isliving(user) && !user.incapacitated
/obj/item/toy/cards/cardhand/attackby(obj/item/weapon, mob/living/user, params, flip_card = FALSE)
var/obj/item/toy/singlecard/card
diff --git a/code/modules/cargo/universal_scanner.dm b/code/modules/cargo/universal_scanner.dm
index 484f4a7a032..9ce1771421e 100644
--- a/code/modules/cargo/universal_scanner.dm
+++ b/code/modules/cargo/universal_scanner.dm
@@ -257,7 +257,7 @@
/obj/item/universal_scanner/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
return TRUE
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 1998b7abc4d..d4705aee14c 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -528,7 +528,7 @@ BLIND // can't see anything
update_appearance() //most of the time the sprite changes
/obj/item/clothing/proc/can_use(mob/user)
- return istype(user) && !user.incapacitated()
+ return istype(user) && !user.incapacitated
/obj/item/clothing/proc/spawn_shreds()
new /obj/effect/decal/cleanable/shreds(get_turf(src), name)
diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm
index a5041de7fa0..5d5fc87d409 100644
--- a/code/modules/clothing/head/jobs.dm
+++ b/code/modules/clothing/head/jobs.dm
@@ -54,7 +54,7 @@
/obj/item/clothing/head/utility/chefhat/proc/on_mouse_emote(mob/living/source, key, emote_message, type_override)
SIGNAL_HANDLER
var/mob/living/carbon/wearer = loc
- if(!wearer || wearer.incapacitated(IGNORE_RESTRAINTS))
+ if(!wearer || INCAPACITATED_IGNORING(wearer, INCAPABLE_RESTRAINTS))
return
if (!prob(mouse_control_probability))
return COMPONENT_CANT_EMOTE
@@ -68,7 +68,7 @@
return COMPONENT_MOVABLE_BLOCK_PRE_MOVE // Didn't roll well enough or on cooldown
var/mob/living/carbon/wearer = loc
- if(!wearer || wearer.incapacitated(IGNORE_RESTRAINTS))
+ if(!wearer || INCAPACITATED_IGNORING(wearer, INCAPABLE_RESTRAINTS))
return COMPONENT_MOVABLE_BLOCK_PRE_MOVE // Not worn or can't move
var/move_direction = get_dir(wearer, moved_to)
diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm
index 4744296cdb8..f8e7e80532f 100644
--- a/code/modules/clothing/head/soft_caps.dm
+++ b/code/modules/clothing/head/soft_caps.dm
@@ -33,7 +33,7 @@
/obj/item/clothing/head/soft/proc/flip(mob/user)
- if(!user.incapacitated())
+ if(!user.incapacitated)
flipped = !flipped
if(flipped)
icon_state = "[soft_type][soft_suffix]_flipped"
diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm
index cab7a6557e3..c5871d23c18 100644
--- a/code/modules/clothing/masks/gasmask.dm
+++ b/code/modules/clothing/masks/gasmask.dm
@@ -301,14 +301,14 @@ GLOBAL_LIST_INIT(clown_mask_options, list(
AddElement(/datum/element/swabable, CELL_LINE_TABLE_CLOWN, CELL_VIRUS_TABLE_GENERIC, rand(2,3), 0)
/obj/item/clothing/mask/gas/clown_hat/ui_action_click(mob/user)
- if(!istype(user) || user.incapacitated())
+ if(!istype(user) || user.incapacitated)
return
var/choice = show_radial_menu(user,src, clownmask_designs, custom_check = FALSE, radius = 36, require_near = TRUE)
if(!choice)
return FALSE
- if(src && choice && !user.incapacitated() && in_range(user,src))
+ if(src && choice && !user.incapacitated && in_range(user,src))
var/list/options = GLOB.clown_mask_options
icon_state = options[choice]
user.update_worn_mask()
@@ -355,7 +355,7 @@ GLOBAL_LIST_INIT(clown_mask_options, list(
)
/obj/item/clothing/mask/gas/mime/ui_action_click(mob/user)
- if(!istype(user) || user.incapacitated())
+ if(!istype(user) || user.incapacitated)
return
var/list/options = list()
@@ -368,7 +368,7 @@ GLOBAL_LIST_INIT(clown_mask_options, list(
if(!choice)
return FALSE
- if(src && choice && !user.incapacitated() && in_range(user,src))
+ if(src && choice && !user.incapacitated && in_range(user,src))
icon_state = options[choice]
user.update_worn_mask()
update_item_action_buttons()
diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm
index 686adf1e5d3..9c9d81d01d7 100644
--- a/code/modules/events/ion_storm.dm
+++ b/code/modules/events/ion_storm.dm
@@ -34,7 +34,7 @@
//AI laws
for(var/mob/living/silicon/ai/M in GLOB.alive_mob_list)
M.laws_sanity_check()
- if(M.stat != DEAD && !M.incapacitated())
+ if(M.stat != DEAD && !M.incapacitated)
if(prob(replaceLawsetChance))
var/datum/ai_laws/ion_lawset = pick_weighted_lawset()
// pick_weighted_lawset gives us a typepath,
diff --git a/code/modules/fishing/fishing_minigame.dm b/code/modules/fishing/fishing_minigame.dm
index 5db1ee6458b..f53437e3559 100644
--- a/code/modules/fishing/fishing_minigame.dm
+++ b/code/modules/fishing/fishing_minigame.dm
@@ -418,7 +418,7 @@
///Initialize the minigame hud and register some signals to make it work.
/datum/fishing_challenge/proc/prepare_minigame_hud()
- if(!user.client || user.incapacitated())
+ if(!user.client || user.incapacitated)
return FALSE
. = TRUE
fishing_hud = new
diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm
index 170000eb115..f0176e64530 100644
--- a/code/modules/instruments/items.dm
+++ b/code/modules/instruments/items.dm
@@ -27,7 +27,7 @@
if(!ismob(music_player))
return STOP_PLAYING
var/mob/user = music_player
- if(user.incapacitated() || !((loc == user) || (isturf(loc) && Adjacent(user)))) // sorry, no more TK playing.
+ if(user.incapacitated || !((loc == user) || (isturf(loc) && Adjacent(user)))) // sorry, no more TK playing.
return STOP_PLAYING
/obj/item/instrument/suicide_act(mob/living/user)
diff --git a/code/modules/jobs/job_types/mime.dm b/code/modules/jobs/job_types/mime.dm
index eba86ec2af0..46090cdbe30 100644
--- a/code/modules/jobs/job_types/mime.dm
+++ b/code/modules/jobs/job_types/mime.dm
@@ -131,7 +131,7 @@
return FALSE
if(!user.is_holding(src))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
if(!user.mind)
return FALSE
diff --git a/code/modules/library/bibles.dm b/code/modules/library/bibles.dm
index 5221dc80474..0c6a1aad71d 100644
--- a/code/modules/library/bibles.dm
+++ b/code/modules/library/bibles.dm
@@ -186,7 +186,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
return FALSE
if(!istype(user) || !user.is_holding(src))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
if(user.mind?.holy_role != HOLY_ROLE_HIGHPRIEST)
return FALSE
diff --git a/code/modules/lootpanel/_lootpanel.dm b/code/modules/lootpanel/_lootpanel.dm
index d74023b57ef..ab13a7c2116 100644
--- a/code/modules/lootpanel/_lootpanel.dm
+++ b/code/modules/lootpanel/_lootpanel.dm
@@ -56,7 +56,7 @@
/datum/lootpanel/ui_status(mob/user, datum/ui_state/state)
- if(user.incapacitated())
+ if(user.incapacitated)
return UI_DISABLED
return UI_INTERACTIVE
diff --git a/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm
index 860eb8c8168..646de6a2186 100644
--- a/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm
+++ b/code/modules/mapfluff/ruins/objects_and_mobs/necropolis_gate.dm
@@ -161,7 +161,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate)
/obj/structure/necropolis_gate/legion_gate/attack_hand(mob/user, list/modifiers)
if(!open && !changing_openness)
var/safety = tgui_alert(user, "You think this might be a bad idea...", "Knock on the door?", list("Proceed", "Abort"))
- if(safety == "Abort" || !in_range(src, user) || !src || open || changing_openness || user.incapacitated())
+ if(safety == "Abort" || !in_range(src, user) || !src || open || changing_openness || user.incapacitated)
return
user.visible_message(span_warning("[user] knocks on [src]..."), span_boldannounce("You tentatively knock on [src]..."))
playsound(user.loc, 'sound/effects/shieldbash.ogg', 100, TRUE)
diff --git a/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm
index e0407e50326..b42618f94ee 100644
--- a/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm
+++ b/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm
@@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
to_chat(target, span_warning("You too far away from \the [src] to enter it!"))
// If the target is incapacitated after selecting a room, they're not allowed to teleport.
- if(target.incapacitated())
+ if(target.incapacitated)
to_chat(target, span_warning("You aren't able to activate \the [src] anymore!"))
// Has the user thrown it away or otherwise disposed of it such that it's no longer in their hands or in some storage connected to them?
diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm
index abf5ca77e18..0685dda148d 100644
--- a/code/modules/mining/equipment/mining_tools.dm
+++ b/code/modules/mining/equipment/mining_tools.dm
@@ -285,7 +285,7 @@
/obj/item/trench_tool/proc/check_menu(mob/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index e9e8b3a7c3d..7ad08083df3 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -517,7 +517,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
playsound(user.loc, 'sound/items/coinflip.ogg', 50, TRUE)
var/oldloc = loc
sleep(1.5 SECONDS)
- if(loc == oldloc && user && !user.incapacitated())
+ if(loc == oldloc && user && !user.incapacitated)
user.visible_message(span_notice("[user] flips [src]. It lands on [coinflip]."), \
span_notice("You flip [src]. It lands on [coinflip]."), \
span_hear("You hear the clattering of loose change."))
@@ -599,7 +599,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
playsound(user.loc, 'sound/items/coinflip.ogg', 50, TRUE)
var/oldloc = loc
sleep(1.5 SECONDS)
- if(loc == oldloc && user && !user.incapacitated())
+ if(loc == oldloc && user && !user.incapacitated)
user.visible_message(span_notice("[user] flips [src]. It lands on [coinflip]."), \
span_notice("You flip [src]. It lands on [coinflip]."), \
span_hear("You hear the clattering of loose change."))
diff --git a/code/modules/mob/living/basic/basic.dm b/code/modules/mob/living/basic/basic.dm
index 582af27c316..9501c4e21d3 100644
--- a/code/modules/mob/living/basic/basic.dm
+++ b/code/modules/mob/living/basic/basic.dm
@@ -266,7 +266,7 @@
REMOVE_TRAIT(src, TRAIT_NO_GLIDE, SPEED_TRAIT)
/mob/living/basic/relaymove(mob/living/user, direction)
- if(user.incapacitated())
+ if(user.incapacitated)
return
return relaydrive(user, direction)
diff --git a/code/modules/mob/living/basic/bots/_bots.dm b/code/modules/mob/living/basic/bots/_bots.dm
index 08f8d6d62c8..cc6ac85c6cb 100644
--- a/code/modules/mob/living/basic/bots/_bots.dm
+++ b/code/modules/mob/living/basic/bots/_bots.dm
@@ -58,6 +58,7 @@ GLOBAL_LIST_INIT(command_strings, list(
///All initial access this bot started with.
var/list/initial_access = list()
///Bot-related mode flags on the Bot indicating how they will act. BOT_MODE_ON | BOT_MODE_AUTOPATROL | BOT_MODE_REMOTE_ENABLED | BOT_MODE_CAN_BE_SAPIENT | BOT_MODE_ROUNDSTART_POSSESSION
+ /// DO NOT MODIFY MANUALLY, USE set_bot_mode_flags. If you don't shit breaks BAD
var/bot_mode_flags = BOT_MODE_ON | BOT_MODE_REMOTE_ENABLED | BOT_MODE_CAN_BE_SAPIENT | BOT_MODE_ROUNDSTART_POSSESSION
///Bot-related cover flags on the Bot to deal with what has been done to their cover, including emagging. BOT_COVER_MAINTS_OPEN | BOT_COVER_LOCKED | BOT_COVER_EMAGGED | BOT_COVER_HACKED
var/bot_access_flags = BOT_COVER_LOCKED
@@ -151,6 +152,11 @@ GLOBAL_LIST_INIT(command_strings, list(
ai_controller.set_blackboard_key(BB_RADIO_CHANNEL, radio_channel)
update_appearance()
+/mob/living/basic/bot/proc/set_mode_flags(mode_flags)
+ SHOULD_CALL_PARENT(TRUE)
+ bot_mode_flags = mode_flags
+ SEND_SIGNAL(src, COMSIG_BOT_MODE_FLAGS_SET, mode_flags)
+
/mob/living/basic/bot/proc/get_mode()
if(client) //Player bots do not have modes, thus the override. Also an easy way for PDA users/AI to know when a bot is a player.
return span_bold("[paicard ? "pAI Controlled" : "Autonomous"]")
@@ -181,7 +187,7 @@ GLOBAL_LIST_INIT(command_strings, list(
/mob/living/basic/bot/proc/turn_on()
if(stat == DEAD)
return FALSE
- bot_mode_flags |= BOT_MODE_ON
+ set_mode_flags(bot_mode_flags | BOT_MODE_ON)
remove_traits(list(TRAIT_INCAPACITATED, TRAIT_IMMOBILIZED, TRAIT_HANDS_BLOCKED), POWER_LACK_TRAIT)
set_light_on(bot_mode_flags & BOT_MODE_ON ? TRUE : FALSE)
update_appearance()
@@ -190,7 +196,7 @@ GLOBAL_LIST_INIT(command_strings, list(
return TRUE
/mob/living/basic/bot/proc/turn_off()
- bot_mode_flags &= ~BOT_MODE_ON
+ set_mode_flags(bot_mode_flags & ~BOT_MODE_ON)
add_traits(on_toggle_traits, POWER_LACK_TRAIT)
set_light_on(bot_mode_flags & BOT_MODE_ON ? TRUE : FALSE)
bot_reset() //Resets an AI's call, should it exist.
@@ -308,7 +314,7 @@ GLOBAL_LIST_INIT(command_strings, list(
return FALSE
bot_access_flags |= BOT_COVER_EMAGGED
bot_access_flags |= BOT_COVER_LOCKED
- bot_mode_flags &= ~BOT_MODE_REMOTE_ENABLED //Manually emagging the bot also locks the AI from controlling it.
+ set_mode_flags(bot_mode_flags & ~BOT_MODE_REMOTE_ENABLED) //Manually emagging the bot also locks the AI from controlling it.
bot_reset()
turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP.
to_chat(src, span_userdanger("(#$*#$^^( OVERRIDE DETECTED"))
@@ -553,9 +559,9 @@ GLOBAL_LIST_INIT(command_strings, list(
switch(command)
if("patroloff")
bot_reset() //HOLD IT!! //OBJECTION!!
- bot_mode_flags &= ~BOT_MODE_AUTOPATROL
+ set_mode_flags(bot_mode_flags & ~BOT_MODE_AUTOPATROL)
if("patrolon")
- bot_mode_flags |= BOT_MODE_AUTOPATROL
+ set_mode_flags(bot_mode_flags | BOT_MODE_AUTOPATROL)
if("summon")
summon_bot(user, user_access = user_access)
if("ejectpai")
@@ -607,10 +613,10 @@ GLOBAL_LIST_INIT(command_strings, list(
if("maintenance")
bot_access_flags ^= BOT_COVER_MAINTS_OPEN
if("patrol")
- bot_mode_flags ^= BOT_MODE_AUTOPATROL
+ set_mode_flags(bot_mode_flags ^ BOT_MODE_AUTOPATROL)
bot_reset()
if("airplane")
- bot_mode_flags ^= BOT_MODE_REMOTE_ENABLED
+ set_mode_flags(bot_mode_flags ^ BOT_MODE_REMOTE_ENABLED)
if("hack")
if(!HAS_SILICON_ACCESS(the_user))
return
diff --git a/code/modules/mob/living/basic/bots/bot_ai.dm b/code/modules/mob/living/basic/bots/bot_ai.dm
index b7cd5dcabd3..a0abbbfd48b 100644
--- a/code/modules/mob/living/basic/bots/bot_ai.dm
+++ b/code/modules/mob/living/basic/bots/bot_ai.dm
@@ -55,7 +55,15 @@
var/mob/living/basic/bot/bot_pawn = pawn
bot_pawn.bot_reset()
-/datum/ai_controller/basic_controller/bot/able_to_run()
+/datum/ai_controller/basic_controller/bot/setup_able_to_run()
+ . = ..()
+ RegisterSignal(pawn, COMSIG_BOT_MODE_FLAGS_SET, PROC_REF(update_able_to_run))
+
+/datum/ai_controller/basic_controller/bot/clear_able_to_run()
+ UnregisterSignal(pawn, list(COMSIG_BOT_MODE_FLAGS_SET))
+ return ..()
+
+/datum/ai_controller/basic_controller/bot/get_able_to_run()
var/mob/living/basic/bot/bot_pawn = pawn
if(!(bot_pawn.bot_mode_flags & BOT_MODE_ON))
return FALSE
diff --git a/code/modules/mob/living/basic/drone/_drone.dm b/code/modules/mob/living/basic/drone/_drone.dm
index 93bdaa41470..983ade8de0b 100644
--- a/code/modules/mob/living/basic/drone/_drone.dm
+++ b/code/modules/mob/living/basic/drone/_drone.dm
@@ -230,7 +230,7 @@
holder.pixel_y = hud_icon.Height() - world.icon_size
if(stat == DEAD)
holder.icon_state = "huddead2"
- else if(incapacitated())
+ else if(incapacitated)
holder.icon_state = "hudoffline"
else
holder.icon_state = "hudstat"
diff --git a/code/modules/mob/living/basic/drone/visuals_icons.dm b/code/modules/mob/living/basic/drone/visuals_icons.dm
index 7a2122022f8..32ff97da305 100644
--- a/code/modules/mob/living/basic/drone/visuals_icons.dm
+++ b/code/modules/mob/living/basic/drone/visuals_icons.dm
@@ -108,7 +108,7 @@
/mob/living/basic/drone/proc/check_menu()
if(!istype(src))
return FALSE
- if(incapacitated())
+ if(incapacitated)
return FALSE
return TRUE
diff --git a/code/modules/mob/living/basic/guardian/guardian_creator.dm b/code/modules/mob/living/basic/guardian/guardian_creator.dm
index 441a60124a7..08a28041cc8 100644
--- a/code/modules/mob/living/basic/guardian/guardian_creator.dm
+++ b/code/modules/mob/living/basic/guardian/guardian_creator.dm
@@ -129,7 +129,7 @@ GLOBAL_LIST_INIT(guardian_radial_images, setup_guardian_radial())
/obj/item/guardian_creator/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(user.incapacitated() || !user.is_holding(src) || used)
+ if(user.incapacitated || !user.is_holding(src) || used)
return FALSE
return TRUE
diff --git a/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/wrap.dm b/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/wrap.dm
index e7771f075a8..088905a5ae2 100644
--- a/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/wrap.dm
+++ b/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/wrap.dm
@@ -26,7 +26,7 @@
/datum/action/cooldown/mob_cooldown/wrap/IsAvailable(feedback = FALSE)
. = ..()
- if(!. || owner.incapacitated())
+ if(!. || owner.incapacitated)
return FALSE
if(DOING_INTERACTION(owner, DOAFTER_SOURCE_SPIDER))
if (feedback)
diff --git a/code/modules/mob/living/carbon/alien/adult/adult.dm b/code/modules/mob/living/carbon/alien/adult/adult.dm
index ad005888178..663419ce22c 100644
--- a/code/modules/mob/living/carbon/alien/adult/adult.dm
+++ b/code/modules/mob/living/carbon/alien/adult/adult.dm
@@ -78,6 +78,7 @@ GLOBAL_LIST_INIT(strippable_alien_humanoid_items, create_strippable_list(list(
SEND_SIGNAL(src, COMSIG_MOVABLE_SET_GRAB_STATE, newstate)
. = grab_state
grab_state = newstate
+ update_incapacitated()
switch(grab_state) // Current state.
if(GRAB_PASSIVE)
REMOVE_TRAIT(pulling, TRAIT_IMMOBILIZED, CHOKEHOLD_TRAIT)
@@ -101,7 +102,7 @@ GLOBAL_LIST_INIT(strippable_alien_humanoid_items, create_strippable_list(list(
/mob/living/carbon/alien/adult/proc/can_consume(atom/movable/poor_soul)
if(!isliving(poor_soul) || pulling != poor_soul)
return FALSE
- if(incapacitated() || grab_state < GRAB_AGGRESSIVE || stat != CONSCIOUS)
+ if(incapacitated || grab_state < GRAB_AGGRESSIVE || stat != CONSCIOUS)
return FALSE
if(get_dir(src, poor_soul) != dir) // Gotta face em 4head
return FALSE
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 9506be67d19..978714e9bf7 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -395,7 +395,7 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
// Shake animation
- if (incapacitated())
+ if (incapacitated)
shake_up_animation()
/mob/proc/shake_up_animation()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 98160122182..cf73704600c 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -909,7 +909,7 @@
return ishuman(target) && target.body_position == LYING_DOWN
/mob/living/carbon/human/proc/fireman_carry(mob/living/carbon/target)
- if(!can_be_firemanned(target) || incapacitated(IGNORE_GRAB))
+ if(!can_be_firemanned(target) || INCAPACITATED_IGNORING(src, INCAPABLE_GRAB))
to_chat(src, span_warning("You can't fireman carry [target] while [target.p_they()] [target.p_are()] standing!"))
return
@@ -940,7 +940,7 @@
return
//Second check to make sure they're still valid to be carried
- if(!can_be_firemanned(target) || incapacitated(IGNORE_GRAB) || target.buckled)
+ if(!can_be_firemanned(target) || INCAPACITATED_IGNORING(src, INCAPABLE_GRAB) || target.buckled)
visible_message(span_warning("[src] fails to fireman carry [target]!"))
return
@@ -956,7 +956,7 @@
visible_message(span_warning("[target] fails to climb onto [src]!"))
return
- if(target.incapacitated(IGNORE_GRAB) || incapacitated(IGNORE_GRAB))
+ if(INCAPACITATED_IGNORING(target, INCAPABLE_GRAB) || INCAPACITATED_IGNORING(src, INCAPABLE_GRAB))
target.visible_message(span_warning("[target] can't hang onto [src]!"))
return
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 11f2c0b989f..d2ad1ad89ae 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -374,7 +374,7 @@
/// take the most recent item out of a slot or place held item in a slot
/mob/living/carbon/human/proc/smart_equip_targeted(slot_type = ITEM_SLOT_BELT, slot_item_name = "belt")
- if(incapacitated())
+ if(incapacitated)
return
var/obj/item/thing = get_active_held_item()
var/obj/item/equipped_item = get_item_by_slot(slot_type)
diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm
index 4bf0407c467..0797f77c082 100644
--- a/code/modules/mob/living/init_signals.dm
+++ b/code/modules/mob/living/init_signals.dm
@@ -40,6 +40,8 @@
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_DEAF), PROC_REF(on_hearing_loss))
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_DEAF), PROC_REF(on_hearing_regain))
+ RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_STASIS), PROC_REF(on_stasis_trait_gain))
+ RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_STASIS), PROC_REF(on_stasis_trait_loss))
RegisterSignals(src, list(
SIGNAL_ADDTRAIT(TRAIT_CRITICAL_CONDITION),
@@ -187,24 +189,36 @@
SIGNAL_HANDLER
add_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED), TRAIT_INCAPACITATED)
update_appearance()
+ update_incapacitated()
/// Called when [TRAIT_INCAPACITATED] is removed from the mob.
/mob/living/proc/on_incapacitated_trait_loss(datum/source)
SIGNAL_HANDLER
remove_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED), TRAIT_INCAPACITATED)
update_appearance()
-
+ update_incapacitated()
/// Called when [TRAIT_RESTRAINED] is added to the mob.
/mob/living/proc/on_restrained_trait_gain(datum/source)
SIGNAL_HANDLER
ADD_TRAIT(src, TRAIT_HANDS_BLOCKED, TRAIT_RESTRAINED)
+ update_incapacitated()
/// Called when [TRAIT_RESTRAINED] is removed from the mob.
/mob/living/proc/on_restrained_trait_loss(datum/source)
SIGNAL_HANDLER
REMOVE_TRAIT(src, TRAIT_HANDS_BLOCKED, TRAIT_RESTRAINED)
+ update_incapacitated()
+/// Called when [TRAIT_STASIS] is added to the mob
+/mob/living/proc/on_stasis_trait_gain(datum/source)
+ SIGNAL_HANDLER
+ update_incapacitated()
+
+/// Called when [TRAIT_STASIS] is removed from the mob
+/mob/living/proc/on_stasis_trait_loss(datum/source)
+ SIGNAL_HANDLER
+ update_incapacitated()
/**
* Called when traits that alter succumbing are added/removed.
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 7015ed2b183..005eff4d542 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -70,7 +70,7 @@
damage_softening_multiplier *= potential_spine.athletics_boost_multiplier
// If you are incapped, you probably can't brace yourself
- var/can_help_themselves = !incapacitated(IGNORE_RESTRAINTS)
+ var/can_help_themselves = !INCAPACITATED_IGNORING(src, INCAPABLE_RESTRAINTS)
if(levels <= 1 && can_help_themselves)
var/obj/item/organ/external/wings/gliders = get_organ_by_type(/obj/item/organ/external/wings)
if(HAS_TRAIT(src, TRAIT_FREERUNNING) || gliders?.can_soften_fall()) // the power of parkour or wings allows falling short distances unscathed
@@ -516,7 +516,7 @@
//same as above
/mob/living/pointed(atom/A as mob|obj|turf in view(client.view, src))
- if(incapacitated())
+ if(incapacitated)
return FALSE
return ..()
@@ -545,31 +545,21 @@
investigate_log("has succumbed to death.", INVESTIGATE_DEATHS)
death()
-/**
- * Checks if a mob is incapacitated
- *
- * Normally being restrained, agressively grabbed, or in stasis counts as incapacitated
- * unless there is a flag being used to check if it's ignored
- *
- * args:
- * * flags (optional) bitflags that determine if special situations are exempt from being considered incapacitated
- *
- * bitflags: (see code/__DEFINES/status_effects.dm)
- * * IGNORE_RESTRAINTS - mob in a restraint (handcuffs) is not considered incapacitated
- * * IGNORE_STASIS - mob in stasis (stasis bed, etc.) is not considered incapacitated
- * * IGNORE_GRAB - mob that is agressively grabbed is not considered incapacitated
-**/
-/mob/living/incapacitated(flags)
+// Remember, anything that influences this needs to call update_incapacitated somehow when it changes
+// Most often best done in [code/modules/mob/living/init_signals.dm]
+/mob/living/build_incapacitated(flags)
+ // Holds a set of flags that describe how we are currently incapacitated
+ var/incap_status = NONE
if(HAS_TRAIT(src, TRAIT_INCAPACITATED))
- return TRUE
+ incap_status |= TRADITIONAL_INCAPACITATED
+ if(HAS_TRAIT(src, TRAIT_RESTRAINED))
+ incap_status |= INCAPABLE_RESTRAINTS
+ if(pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE)
+ incap_status |= INCAPABLE_GRAB
+ if(HAS_TRAIT(src, TRAIT_STASIS))
+ incap_status |= INCAPABLE_STASIS
- if(!(flags & IGNORE_RESTRAINTS) && HAS_TRAIT(src, TRAIT_RESTRAINED))
- return TRUE
- if(!(flags & IGNORE_GRAB) && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE)
- return TRUE
- if(!(flags & IGNORE_STASIS) && HAS_TRAIT(src, TRAIT_STASIS))
- return TRUE
- return FALSE
+ return incap_status
/mob/living/canUseStorage()
if (usable_hands <= 0)
@@ -1124,7 +1114,7 @@
/mob/living/proc/itch(obj/item/bodypart/target_part = null, damage = 0.5, can_scratch = TRUE, silent = FALSE)
if ((mob_biotypes & (MOB_ROBOTIC | MOB_SPIRIT)))
return FALSE
- var/will_scratch = can_scratch && !incapacitated()
+ var/will_scratch = can_scratch && !incapacitated
var/applied_damage = 0
if (will_scratch && damage)
applied_damage = apply_damage(damage, damagetype = BRUTE, def_zone = target_part)
@@ -1354,11 +1344,11 @@
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED))
var/ignore_flags = NONE
if(interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED)
- ignore_flags |= IGNORE_RESTRAINTS
+ ignore_flags |= INCAPABLE_RESTRAINTS
if(!(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB))
- ignore_flags |= IGNORE_GRAB
+ ignore_flags |= INCAPABLE_GRAB
- if(incapacitated(ignore_flags))
+ if(INCAPACITATED_IGNORING(src, ignore_flags))
to_chat(src, span_warning("You are incapacitated at the moment!"))
return FALSE
@@ -2152,10 +2142,9 @@ GLOBAL_LIST_EMPTY(fire_appearances)
/mob/living/proc/can_look_up()
if(next_move > world.time)
return FALSE
- if(incapacitated(IGNORE_RESTRAINTS))
+ if(INCAPACITATED_IGNORING(src, INCAPABLE_RESTRAINTS))
return FALSE
return TRUE
-
/**
* look_up Changes the perspective of the mob to any openspace turf above the mob
*
@@ -2351,6 +2340,7 @@ GLOBAL_LIST_EMPTY(fire_appearances)
/mob/living/set_pulledby(new_pulledby)
. = ..()
+ update_incapacitated()
if(. == FALSE) //null is a valid value here, we only want to return if FALSE is explicitly passed.
return
if(pulledby)
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index a06a7126249..2b61f5ac68d 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -268,6 +268,7 @@
return FALSE
grippedby(user)
+ update_incapacitated()
//proc to upgrade a simple pull into a more aggressive grab.
/mob/living/proc/grippedby(mob/living/user, instant = FALSE)
diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm
index 62c290217fd..4522b6ca69a 100644
--- a/code/modules/mob/living/living_movement.dm
+++ b/code/modules/mob/living/living_movement.dm
@@ -124,7 +124,7 @@
return ..()
/mob/living/can_z_move(direction, turf/start, turf/destination, z_move_flags = ZMOVE_FLIGHT_FLAGS, mob/living/rider)
- if(z_move_flags & ZMOVE_INCAPACITATED_CHECKS && incapacitated())
+ if(z_move_flags & ZMOVE_INCAPACITATED_CHECKS && incapacitated)
if(z_move_flags & ZMOVE_FEEDBACK)
to_chat(rider || src, span_warning("[rider ? src : "You"] can't do that right now!"))
return FALSE
diff --git a/code/modules/mob/living/navigation.dm b/code/modules/mob/living/navigation.dm
index 3096efb3a7c..a18342c4456 100644
--- a/code/modules/mob/living/navigation.dm
+++ b/code/modules/mob/living/navigation.dm
@@ -12,7 +12,7 @@
set name = "Navigate"
set category = "IC"
- if(incapacitated())
+ if(incapacitated)
return
if(length(client.navigation_images))
addtimer(CALLBACK(src, PROC_REF(cut_navigation)), world.tick_lag)
@@ -46,7 +46,7 @@
if(isnull(navigate_target))
return
- if(incapacitated())
+ if(incapacitated)
return
COOLDOWN_START(src, navigate_cooldown, 15 SECONDS)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 1a9ab2db3b1..92c853ba72c 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -288,7 +288,7 @@
/mob/living/silicon/ai/verb/pick_icon()
set category = "AI Commands"
set name = "Set AI Core Display"
- if(incapacitated())
+ if(incapacitated)
return
icon = initial(icon)
icon_state = "ai"
@@ -306,7 +306,7 @@
view_core()
var/ai_core_icon = show_radial_menu(src, src , iconstates, radius = 42)
- if(!ai_core_icon || incapacitated())
+ if(!ai_core_icon || incapacitated)
return
display_icon_override = ai_core_icon
@@ -347,7 +347,7 @@
var/reason = tgui_input_text(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call")
- if(incapacitated())
+ if(incapacitated)
return
if(trim(reason))
@@ -409,7 +409,7 @@
return // stop
if(stat == DEAD)
return
- if(incapacitated())
+ if(incapacitated)
if(battery < 50)
to_chat(src, span_warning("Insufficient backup power!"))
return
@@ -481,14 +481,14 @@
if(usr != src)
return
- if(href_list["emergencyAPC"]) //This check comes before incapacitated() because the only time it would be useful is when we have no power.
+ if(href_list["emergencyAPC"]) //This check comes before incapacitated because the only time it would be useful is when we have no power.
if(!apc_override)
to_chat(src, span_notice("APC backdoor is no longer available."))
return
apc_override.ui_interact(src)
return
- if(incapacitated())
+ if(incapacitated)
return
if (href_list["switchcamera"])
@@ -638,7 +638,7 @@
ai_tracking_tool.reset_tracking()
var/cameralist[0]
- if(incapacitated())
+ if(incapacitated)
return
var/mob/living/silicon/ai/U = usr
@@ -680,7 +680,7 @@
set desc = "Change the default hologram available to AI to something else."
set category = "AI Commands"
- if(incapacitated())
+ if(incapacitated)
return
var/input
switch(tgui_input_list(usr, "Would you like to select a hologram based on a custom character, an animal, or switch to a unique avatar?", "Customize", list("Custom Character","Unique","Animal")))
@@ -830,7 +830,7 @@
set desc = "Allows you to change settings of your radio."
set category = "AI Commands"
- if(incapacitated())
+ if(incapacitated)
return
to_chat(src, "Accessing Subspace Transceiver control...")
@@ -846,7 +846,7 @@
set desc = "Modify the default radio setting for your automatic announcements."
set category = "AI Commands"
- if(incapacitated())
+ if(incapacitated)
return
set_autosay()
@@ -1046,7 +1046,7 @@
set category = "AI Commands"
set name = "Deploy to Shell"
- if(incapacitated())
+ if(incapacitated)
return
if(control_disabled)
to_chat(src, span_warning("Wireless networking module is offline."))
diff --git a/code/modules/mob/living/silicon/ai/ai_defense.dm b/code/modules/mob/living/silicon/ai/ai_defense.dm
index 0c5eb6ec164..55a00a6ffc0 100644
--- a/code/modules/mob/living/silicon/ai/ai_defense.dm
+++ b/code/modules/mob/living/silicon/ai/ai_defense.dm
@@ -63,7 +63,7 @@
. = ..()
if(user.combat_mode)
return
- if(stat != DEAD && !incapacitated() && (client || deployed_shell?.client))
+ if(stat != DEAD && !incapacitated && (client || deployed_shell?.client))
// alive and well AIs control their floor bolts
balloon_alert(user, "the AI's bolt motors resist.")
return ITEM_INTERACT_SUCCESS
diff --git a/code/modules/mob/living/silicon/ai/ai_say.dm b/code/modules/mob/living/silicon/ai/ai_say.dm
index 958e975586c..a71074f9a01 100644
--- a/code/modules/mob/living/silicon/ai/ai_say.dm
+++ b/code/modules/mob/living/silicon/ai/ai_say.dm
@@ -18,7 +18,7 @@
return ..()
/mob/living/silicon/ai/radio(message, list/message_mods = list(), list/spans, language)
- if(incapacitated())
+ if(incapacitated)
return FALSE
if(!radio_enabled) //AI cannot speak if radio is disabled (via intellicard) or depowered.
to_chat(src, span_danger("Your radio transmitter is offline!"))
@@ -67,7 +67,7 @@
set desc = "Display a list of vocal words to announce to the crew."
set category = "AI Commands"
- if(incapacitated())
+ if(incapacitated)
return
var/dat = {"
@@ -106,7 +106,7 @@
last_announcement = message
- if(incapacitated())
+ if(incapacitated)
return
if(control_disabled)
diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm
index 98a2e629776..32382b66339 100644
--- a/code/modules/mob/living/silicon/ai/freelook/eye.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm
@@ -235,7 +235,7 @@
set category = "AI Commands"
set name = "Toggle Camera Acceleration"
- if(incapacitated())
+ if(incapacitated)
return
acceleration = !acceleration
to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].")
diff --git a/code/modules/mob/living/silicon/ai/robot_control.dm b/code/modules/mob/living/silicon/ai/robot_control.dm
index d963fc77be6..a04d1c3af75 100644
--- a/code/modules/mob/living/silicon/ai/robot_control.dm
+++ b/code/modules/mob/living/silicon/ai/robot_control.dm
@@ -7,7 +7,7 @@
owner = new_owner
/datum/robot_control/proc/is_interactable(mob/user)
- if(user != owner || owner.incapacitated())
+ if(user != owner || owner.incapacitated)
return FALSE
if(owner.control_disabled)
to_chat(user, span_warning("Wireless control is disabled."))
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 4c51c216143..cddb4961580 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -389,7 +389,7 @@
return ..()
/mob/living/silicon/robot/execute_mode()
- if(incapacitated())
+ if(incapacitated)
return
var/obj/item/W = get_active_held_item()
if(W)
@@ -936,7 +936,7 @@
M.visible_message(span_warning("[M] really can't seem to mount [src]..."))
return
- if(stat || incapacitated())
+ if(stat || incapacitated)
return
if(model && !model.allow_riding)
M.visible_message(span_boldwarning("Unfortunately, [M] just can't seem to hold onto [src]!"))
diff --git a/code/modules/mob/living/silicon/robot/robot_model.dm b/code/modules/mob/living/silicon/robot/robot_model.dm
index 015f23182dc..7aabdafaa48 100644
--- a/code/modules/mob/living/silicon/robot/robot_model.dm
+++ b/code/modules/mob/living/silicon/robot/robot_model.dm
@@ -327,7 +327,7 @@
/obj/item/robot_model/proc/check_menu(mob/living/silicon/robot/user, obj/item/robot_model/old_model)
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
if(user.model != old_model)
return FALSE
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 233ac862b58..507008caf94 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -402,7 +402,7 @@
silicon_hud.show_to(src)
/mob/living/silicon/proc/toggle_sensors()
- if(incapacitated())
+ if(incapacitated)
return
sensors_on = !sensors_on
if (!sensors_on)
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index 6c0cd6d16ab..bbd45e12a27 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -42,7 +42,7 @@
var/list/targets = list()
for(var/mob/living/carbon/nearby_carbon in view(7, src)) //Let's find us a target
var/threatlevel = 0
- if(nearby_carbon.incapacitated())
+ if(nearby_carbon.incapacitated)
continue
threatlevel = nearby_carbon.assess_threat(judgement_criteria)
if(threatlevel < THREAT_ASSESS_DANGEROUS)
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 23703ade8aa..dbfe987cac5 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -712,7 +712,7 @@
// player on mulebot attempted to move
/mob/living/simple_animal/bot/mulebot/relaymove(mob/living/user, direction)
- if(user.incapacitated())
+ if(user.incapacitated)
return
if(load == user)
unload(0)
@@ -806,7 +806,7 @@
/mob/living/simple_animal/bot/mulebot/paranormal/mouse_drop_receive(atom/movable/AM, mob/user, params)
var/mob/living/L = user
- if(user.incapacitated() || (istype(L) && L.body_position == LYING_DOWN))
+ if(user.incapacitated || (istype(L) && L.body_position == LYING_DOWN))
return
if(!istype(AM) || iscameramob(AM) || istype(AM, /obj/effect/dummy/phased_mob)) //allows ghosts!
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 507563e7c20..0803d96a706 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -320,7 +320,7 @@
/mob/living/simple_animal/hostile/proc/CheckAndAttack()
var/atom/target_from = GET_TARGETS_FROM(src)
- if(target && isturf(target_from.loc) && target.Adjacent(target_from) && !incapacitated())
+ if(target && isturf(target_from.loc) && target.Adjacent(target_from) && !incapacitated)
AttackingTarget(target)
/mob/living/simple_animal/hostile/proc/MoveToTarget(list/possible_targets)//Step 5, handle movement between us and our target
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 25d0e566b15..9d5041fe870 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -495,7 +495,7 @@
//ANIMAL RIDING
/mob/living/simple_animal/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
- if(user.incapacitated())
+ if(user.incapacitated)
return
for(var/atom/movable/A in get_turf(src))
if(A != src && A != M && A.density)
@@ -521,7 +521,7 @@
return
/mob/living/simple_animal/relaymove(mob/living/user, direction)
- if(user.incapacitated())
+ if(user.incapacitated)
return
return relaydrive(user, direction)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index c90c81b6ce4..be770fb22ac 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -83,6 +83,7 @@
add_to_dead_mob_list()
else
add_to_alive_mob_list()
+ update_incapacitated()
set_focus(src)
prepare_huds()
for(var/v in GLOB.active_alternate_appearances)
@@ -414,9 +415,21 @@
return null
-///Is the mob incapacitated
-/mob/proc/incapacitated(flags)
- return
+/// Called whenever anything that modifes incapacitated is ran, updates it and sends a signal if it changes
+/// Returns TRUE if anything changed, FALSE otherwise
+/mob/proc/update_incapacitated()
+ SIGNAL_HANDLER
+ var/old_incap = incapacitated
+ incapacitated = build_incapacitated()
+ if(old_incap == incapacitated)
+ return FALSE
+
+ SEND_SIGNAL(src, COMSIG_MOB_INCAPACITATE_CHANGED, old_incap, incapacitated)
+ return TRUE
+
+/// Returns an updated incapacitated bitflag. If a flag is set it means we're incapacitated in that case
+/mob/proc/build_incapacitated()
+ return NONE
/**
* This proc is called whenever someone clicks an inventory ui slot.
@@ -543,7 +556,7 @@
/mob/living/blind_examine_check(atom/examined_thing)
//need to be next to something and awake
- if(!Adjacent(examined_thing) || incapacitated())
+ if(!Adjacent(examined_thing) || incapacitated)
to_chat(src, span_warning("Something is there, but you can't see it!"))
return FALSE
@@ -702,7 +715,7 @@
if(ismecha(loc))
return
- if(incapacitated())
+ if(incapacitated)
return
var/obj/item/I = get_active_held_item()
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index ff948114bd7..24e95cad608 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -66,6 +66,20 @@
/// Whether a mob is alive or dead. TODO: Move this to living - Nodrak (2019, still here)
var/stat = CONSCIOUS
+ /**
+ * Whether and how a mob is incapacitated
+ *
+ * Normally being restrained, agressively grabbed, or in stasis counts as incapacitated
+ * unless there is a flag being used to check if it's ignored
+ *
+ * * bitflags: (see code/__DEFINES/status_effects.dm)
+ * * INCAPABLE_RESTRAINTS - if our mob is in a restraint (handcuffs)
+ * * INCAPABLE_STASIS - if our mob is in stasis (stasis bed, etc.)
+ * * INCAPABLE_GRAB - if our mob is being agressively grabbed
+ *
+ **/
+ VAR_FINAL/incapacitated = NONE
+
/* A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
The current method unnecessarily clusters up the variable list, especially for humans (although rearranging won't really clean it up a lot but the difference will be noticable for other mobs).
diff --git a/code/modules/mod/mod_activation.dm b/code/modules/mod/mod_activation.dm
index 237e151bcb2..b6d2978043c 100644
--- a/code/modules/mod/mod_activation.dm
+++ b/code/modules/mod/mod_activation.dm
@@ -17,8 +17,8 @@
if(!pick)
return
var/part_reference = display_names[pick]
- var/obj/item/part = locate(part_reference) in parts
- if(!istype(part) || user.incapacitated())
+ var/obj/item/part = locate(part_reference) in mod_parts
+ if(!istype(part) || user.incapacitated)
return
if(active || activating)
balloon_alert(user, "deactivate the suit first!")
diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm
index cf91aaf482c..aebf4865daf 100644
--- a/code/modules/mod/mod_control.dm
+++ b/code/modules/mod/mod_control.dm
@@ -233,7 +233,7 @@
balloon_alert(wearer, "retract parts first!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
return
- if(!wearer.incapacitated())
+ if(!wearer.incapacitated)
var/atom/movable/screen/inventory/hand/ui_hand = over_object
if(wearer.putItemFromInventoryInHandIfPossible(src, ui_hand.held_index))
add_fingerprint(user)
diff --git a/code/modules/mod/mod_paint.dm b/code/modules/mod/mod_paint.dm
index ead9151cbdf..0693b05a348 100644
--- a/code/modules/mod/mod_paint.dm
+++ b/code/modules/mod/mod_paint.dm
@@ -126,7 +126,7 @@
mod.theme.set_skin(mod, pick)
/obj/item/mod/paint/proc/check_menu(obj/item/mod/control/mod, mob/user)
- if(user.incapacitated() || !user.is_holding(src) || !mod || mod.active || mod.activating)
+ if(user.incapacitated || !user.is_holding(src) || !mod || mod.active || mod.activating)
return FALSE
return TRUE
diff --git a/code/modules/mod/modules/_module.dm b/code/modules/mod/modules/_module.dm
index 4bd4ef0d2ab..a9bb181cf6b 100644
--- a/code/modules/mod/modules/_module.dm
+++ b/code/modules/mod/modules/_module.dm
@@ -200,7 +200,7 @@
/// Called when an activated module without a device is used
/obj/item/mod/module/proc/on_select_use(atom/target)
- if(!(allow_flags & MODULE_ALLOW_INCAPACITATED) && mod.wearer.incapacitated(IGNORE_GRAB))
+ if(!(allow_flags & MODULE_ALLOW_INCAPACITATED) && INCAPACITATED_IGNORING(mod.wearer, INCAPABLE_GRAB))
return FALSE
mod.wearer.face_atom(target)
if(!used())
diff --git a/code/modules/mod/modules/module_kinesis.dm b/code/modules/mod/modules/module_kinesis.dm
index 9048701f1d0..374be840d95 100644
--- a/code/modules/mod/modules/module_kinesis.dm
+++ b/code/modules/mod/modules/module_kinesis.dm
@@ -67,7 +67,7 @@
clear_grab(playsound = !deleting)
/obj/item/mod/module/anomaly_locked/kinesis/process(seconds_per_tick)
- if(!mod.wearer.client || mod.wearer.incapacitated(IGNORE_GRAB))
+ if(!mod.wearer.client || INCAPACITATED_IGNORING(mod.wearer, INCAPABLE_GRAB))
clear_grab()
return
if(!range_check(grabbed_atom))
diff --git a/code/modules/pai/hud.dm b/code/modules/pai/hud.dm
index b104c7b90ea..77bcafefc82 100644
--- a/code/modules/pai/hud.dm
+++ b/code/modules/pai/hud.dm
@@ -5,7 +5,7 @@
var/required_software
/atom/movable/screen/pai/Click()
- if(isobserver(usr) || usr.incapacitated())
+ if(isobserver(usr) || usr.incapacitated)
return FALSE
var/mob/living/silicon/pai/user = usr
if(required_software && !user.installed_software.Find(required_software))
diff --git a/code/modules/pai/shell.dm b/code/modules/pai/shell.dm
index 2ef3cf3d8e2..6a8a8e709c8 100644
--- a/code/modules/pai/shell.dm
+++ b/code/modules/pai/shell.dm
@@ -30,7 +30,7 @@
* FALSE otherwise.
*/
/mob/living/silicon/pai/proc/check_menu(atom/anchor)
- if(incapacitated())
+ if(incapacitated)
return FALSE
if(get_turf(src) != get_turf(anchor))
return FALSE
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 403d6d269ed..14202b1bf3b 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -313,7 +313,7 @@
set category = "Object"
set src in usr
- if(!usr.can_read(src) || usr.is_blind() || usr.incapacitated(IGNORE_RESTRAINTS|IGNORE_GRAB) || (isobserver(usr) && !isAdminGhostAI(usr)))
+ if(!usr.can_read(src) || usr.is_blind() || INCAPACITATED_IGNORING(usr, INCAPABLE_RESTRAINTS|INCAPABLE_GRAB) || (isobserver(usr) && !isAdminGhostAI(usr)))
return
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
@@ -358,7 +358,7 @@
return UI_UPDATE
if(!in_range(user, src) && !isobserver(user))
return UI_CLOSE
- if(user.incapacitated(IGNORE_RESTRAINTS|IGNORE_GRAB) || (isobserver(user) && !isAdminGhostAI(user)))
+ if(INCAPACITATED_IGNORING(user, INCAPABLE_RESTRAINTS|INCAPABLE_GRAB) || (isobserver(user) && !isAdminGhostAI(user)))
return UI_UPDATE
// Even harder to read if your blind...braile? humm
// .. or if you cannot read
diff --git a/code/modules/photography/camera/silicon_camera.dm b/code/modules/photography/camera/silicon_camera.dm
index 9cdbee1bc2b..a8bf7a3ba90 100644
--- a/code/modules/photography/camera/silicon_camera.dm
+++ b/code/modules/photography/camera/silicon_camera.dm
@@ -7,7 +7,7 @@
/// Checks if we can take a picture at this moment. Returns TRUE if we can, FALSE if we can't.
/obj/item/camera/siliconcam/proc/can_take_picture(mob/living/silicon/clicker)
- if(clicker.stat != CONSCIOUS || clicker.incapacitated())
+ if(clicker.stat != CONSCIOUS || clicker.incapacitated)
return FALSE
return TRUE
diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm
index adc99a08cf2..342abb1625c 100644
--- a/code/modules/photography/photos/photo.dm
+++ b/code/modules/photography/photos/photo.dm
@@ -113,7 +113,7 @@
var/n_name = tgui_input_text(usr, "What would you like to label the photo?", "Photo Labelling", max_length = MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
- if(n_name && (loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && !usr.incapacitated())
+ if(n_name && (loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && !usr.incapacitated)
name = "photo[(n_name ? "- '[n_name]'" : null)]"
add_fingerprint(usr)
diff --git a/code/modules/power/apc/apc_tool_act.dm b/code/modules/power/apc/apc_tool_act.dm
index 8e4d51a703d..9d7c008c616 100644
--- a/code/modules/power/apc/apc_tool_act.dm
+++ b/code/modules/power/apc/apc_tool_act.dm
@@ -110,7 +110,7 @@
if(isnull(choice) \
|| !user.is_holding(installing_cable) \
|| !user.Adjacent(src) \
- || user.incapacitated() \
+ || user.incapacitated \
|| !can_place_terminal(user, installing_cable, silent = TRUE) \
)
return ITEM_INTERACT_BLOCKING
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index d5f3fa0a767..f68319f4205 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -497,7 +497,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
if(!ISADVANCEDTOOLUSER(user))
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
@@ -767,7 +767,7 @@ GLOBAL_LIST(hub_radial_layer_list)
if(!ISADVANCEDTOOLUSER(user))
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return FALSE
- if(user.incapacitated() || !user.Adjacent(src))
+ if(user.incapacitated || !user.Adjacent(src))
return FALSE
return TRUE
diff --git a/code/modules/power/pipecleaners.dm b/code/modules/power/pipecleaners.dm
index 4c913019789..47000049047 100644
--- a/code/modules/power/pipecleaners.dm
+++ b/code/modules/power/pipecleaners.dm
@@ -233,7 +233,7 @@ By design, d1 is the smallest direction and d2 is the highest
return FALSE
if(!user.is_holding(src))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
return TRUE
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index 562bf4c0825..b288fd6aa87 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -421,7 +421,7 @@
. = ..()
/obj/machinery/power/emitter/prototype/user_buckle_mob(mob/living/buckled_mob, mob/user, check_loc = TRUE)
- if(user.incapacitated() || !istype(user))
+ if(user.incapacitated || !istype(user))
return
for(var/atom/movable/atom in get_turf(src))
if(atom.density && (atom != src && atom != buckled_mob))
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 5beb7b21104..f74a93e263d 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -121,7 +121,7 @@
if(isnull(choice) \
|| !user.is_holding(item) \
|| !user.Adjacent(src) \
- || user.incapacitated() \
+ || user.incapacitated \
|| !can_place_terminal(user, item, silent = TRUE) \
)
return
diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm
index 53cbe825085..1180a90e8d2 100644
--- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm
+++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm
@@ -123,7 +123,7 @@
/obj/item/gun/energy/recharge/kinetic_accelerator/proc/check_menu(mob/living/carbon/human/user)
if(!istype(user))
return FALSE
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
return TRUE
diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm
index 3a633e5c836..ce829a6ac12 100644
--- a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm
@@ -230,7 +230,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
//Just the removed itching mechanism - omage to its origins.
/datum/reagent/inverse/ichiyuri/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
- if(prob(resetting_probability) && !(HAS_TRAIT(affected_mob, TRAIT_RESTRAINED) || affected_mob.incapacitated()))
+ if(prob(resetting_probability) && !(HAS_TRAIT(affected_mob, TRAIT_RESTRAINED) || affected_mob.incapacitated))
. = TRUE
if(spammer < world.time)
to_chat(affected_mob,span_warning("You can't help but itch yourself."))
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index dc54dcd7db4..4b6ee9c8c78 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -154,7 +154,7 @@
set name = "Empty Spray Bottle"
set category = "Object"
set src in usr
- if(usr.incapacitated())
+ if(usr.incapacitated)
return
if (tgui_alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", list("Yes", "No")) != "Yes")
return
diff --git a/code/modules/recycling/disposal/holder.dm b/code/modules/recycling/disposal/holder.dm
index b842a69413d..78469d49191 100644
--- a/code/modules/recycling/disposal/holder.dm
+++ b/code/modules/recycling/disposal/holder.dm
@@ -195,7 +195,7 @@
// called when player tries to move while in a pipe
/obj/structure/disposalholder/relaymove(mob/living/user, direction)
- if(user.incapacitated())
+ if(user.incapacitated)
return
for(var/mob/M in range(5, get_turf(src)))
M.show_message("CLONG, clong!", MSG_AUDIBLE)
diff --git a/code/modules/spells/spell_types/pointed/finger_guns.dm b/code/modules/spells/spell_types/pointed/finger_guns.dm
index 24f51a0e908..cf80489fc91 100644
--- a/code/modules/spells/spell_types/pointed/finger_guns.dm
+++ b/code/modules/spells/spell_types/pointed/finger_guns.dm
@@ -33,7 +33,7 @@
return FALSE
var/mob/living/carbon/human/human_invoker = invoker
- if(human_invoker.incapacitated())
+ if(human_invoker.incapacitated)
if(feedback)
to_chat(human_invoker, span_warning("You can't properly point your fingers while incapacitated."))
return FALSE
diff --git a/code/modules/spells/spell_types/shapeshift/_shapeshift.dm b/code/modules/spells/spell_types/shapeshift/_shapeshift.dm
index 59c9ffdde3b..b7542d4077f 100644
--- a/code/modules/spells/spell_types/shapeshift/_shapeshift.dm
+++ b/code/modules/spells/spell_types/shapeshift/_shapeshift.dm
@@ -141,7 +141,7 @@
if(QDELETED(caster))
return FALSE
- return !caster.incapacitated()
+ return !caster.incapacitated
/// Actually does the shapeshift, for the caster.
/datum/action/cooldown/spell/shapeshift/proc/do_shapeshift(mob/living/caster)
diff --git a/code/modules/spells/spell_types/teleport/teleport.dm b/code/modules/spells/spell_types/teleport/teleport.dm
index d4861572042..57e88b98520 100644
--- a/code/modules/spells/spell_types/teleport/teleport.dm
+++ b/code/modules/spells/spell_types/teleport/teleport.dm
@@ -48,5 +48,5 @@
return
var/mob/living/carbon/caster = cast_on
- if(caster.incapacitated() || !caster.is_holding(target))
+ if(caster.incapacitated || !caster.is_holding(target))
return . | SPELL_CANCEL_CAST
diff --git a/code/modules/surgery/bodyparts/robot_bodyparts.dm b/code/modules/surgery/bodyparts/robot_bodyparts.dm
index 314f3396f0a..738b3ce97ac 100644
--- a/code/modules/surgery/bodyparts/robot_bodyparts.dm
+++ b/code/modules/surgery/bodyparts/robot_bodyparts.dm
@@ -124,8 +124,8 @@
if (severity == EMP_HEAVY)
knockdown_time *= 2
owner.Knockdown(knockdown_time)
- if(owner.incapacitated(IGNORE_RESTRAINTS|IGNORE_GRAB)) // So the message isn't duplicated. If they were stunned beforehand by something else, then the message not showing makes more sense anyways.
- return FALSE
+ if(INCAPACITATED_IGNORING(owner, INCAPABLE_RESTRAINTS|INCAPABLE_GRAB)) // So the message isn't duplicated. If they were stunned beforehand by something else, then the message not showing makes more sense anyways.
+ return
to_chat(owner, span_danger("As your [plaintext_zone] unexpectedly malfunctions, it causes you to fall to the ground!"))
return
@@ -173,8 +173,8 @@
if (severity == EMP_HEAVY)
knockdown_time *= 2
owner.Knockdown(knockdown_time)
- if(owner.incapacitated(IGNORE_RESTRAINTS|IGNORE_GRAB)) // So the message isn't duplicated. If they were stunned beforehand by something else, then the message not showing makes more sense anyways.
- return FALSE
+ if(INCAPACITATED_IGNORING(owner, INCAPABLE_RESTRAINTS|INCAPABLE_GRAB)) // So the message isn't duplicated. If they were stunned beforehand by something else, then the message not showing makes more sense anyways.
+ return
to_chat(owner, span_danger("As your [plaintext_zone] unexpectedly malfunctions, it causes you to fall to the ground!"))
return
diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm
index dc3d543f143..a29279457a0 100644
--- a/code/modules/tgui/states.dm
+++ b/code/modules/tgui/states.dm
@@ -67,7 +67,7 @@
else if(stat)
return UI_DISABLED
// Update UIs if incapicitated but concious.
- else if(incapacitated())
+ else if(incapacitated)
return UI_UPDATE
return UI_INTERACTIVE
diff --git a/code/modules/tgui/states/not_incapacitated.dm b/code/modules/tgui/states/not_incapacitated.dm
index f7278c86de4..ab8cd5f6246 100644
--- a/code/modules/tgui/states/not_incapacitated.dm
+++ b/code/modules/tgui/states/not_incapacitated.dm
@@ -29,6 +29,6 @@ GLOBAL_DATUM_INIT(not_incapacitated_turf_state, /datum/ui_state/not_incapacitate
/datum/ui_state/not_incapacitated_state/can_use_topic(src_object, mob/user)
if(user.stat != CONSCIOUS)
return UI_CLOSE
- if(HAS_TRAIT(src, TRAIT_UI_BLOCKED) || user.incapacitated() || (turf_check && !isturf(user.loc)))
+ if(HAS_TRAIT(src, TRAIT_UI_BLOCKED) || user.incapacitated || (turf_check && !isturf(user.loc)))
return UI_DISABLED
return UI_INTERACTIVE
diff --git a/code/modules/transport/transport_module.dm b/code/modules/transport/transport_module.dm
index af8f4199438..01a34931305 100644
--- a/code/modules/transport/transport_module.dm
+++ b/code/modules/transport/transport_module.dm
@@ -612,7 +612,7 @@
if(!isliving(user))
return FALSE
// Gotta be awake and aware
- if(user.incapacitated())
+ if(user.incapacitated)
return FALSE
// Maintain the god given right to fight an elevator
if(user.combat_mode)
@@ -704,7 +704,7 @@
* * boolean, FALSE if the menu should be closed, TRUE if the menu is clear to stay opened.
*/
/obj/structure/transport/linear/proc/check_menu(mob/user, starting_loc)
- if(user.incapacitated() || !user.Adjacent(src) || starting_loc != src.loc)
+ if(user.incapacitated || !user.Adjacent(src) || starting_loc != src.loc)
return FALSE
return TRUE
diff --git a/code/modules/vehicles/mecha/_mecha.dm b/code/modules/vehicles/mecha/_mecha.dm
index d28b510328a..846d6a6434b 100644
--- a/code/modules/vehicles/mecha/_mecha.dm
+++ b/code/modules/vehicles/mecha/_mecha.dm
@@ -586,7 +586,7 @@
/obj/vehicle/sealed/mecha/proc/process_occupants(seconds_per_tick)
for(var/mob/living/occupant as anything in occupants)
- if(!(mecha_flags & IS_ENCLOSED) && occupant?.incapacitated()) //no sides mean it's easy to just sorta fall out if you're incapacitated.
+ if(!(mecha_flags & IS_ENCLOSED) && occupant?.incapacitated) //no sides mean it's easy to just sorta fall out if you're incapacitated.
mob_exit(occupant, randomstep = TRUE) //bye bye
continue
if(cell && cell.maxcharge)
@@ -658,7 +658,7 @@
if(phasing)
balloon_alert(user, "not while [phasing]!")
return
- if(user.incapacitated())
+ if(user.incapacitated)
return
if(!get_charge())
return
diff --git a/code/modules/vehicles/mecha/mecha_mob_interaction.dm b/code/modules/vehicles/mecha/mecha_mob_interaction.dm
index 7a9141e80c1..a1e398f6f90 100644
--- a/code/modules/vehicles/mecha/mecha_mob_interaction.dm
+++ b/code/modules/vehicles/mecha/mecha_mob_interaction.dm
@@ -20,7 +20,7 @@
moved_inside(M)
/obj/vehicle/sealed/mecha/enter_checks(mob/M)
- if(M.incapacitated())
+ if(M.incapacitated)
return FALSE
if(atom_integrity <= 0)
to_chat(M, span_warning("You cannot get in the [src], it has been destroyed!"))
diff --git a/code/modules/vehicles/scooter.dm b/code/modules/vehicles/scooter.dm
index 82146976ad1..25e8ed97409 100644
--- a/code/modules/vehicles/scooter.dm
+++ b/code/modules/vehicles/scooter.dm
@@ -169,7 +169,7 @@
pick_up_board(skater)
/obj/vehicle/ridden/scooter/skateboard/proc/pick_up_board(mob/living/carbon/skater)
- if (skater.incapacitated() || !Adjacent(skater))
+ if (skater.incapacitated || !Adjacent(skater))
return
if(has_buckled_mobs())
to_chat(skater, span_warning("You can't lift this up when somebody's on it."))