diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm
index eb07d5d2a9f4..90116e971fd9 100644
--- a/code/__DEFINES/combat.dm
+++ b/code/__DEFINES/combat.dm
@@ -19,13 +19,15 @@
#define SHAME (1<<4)
#define MANUAL_SUICIDE (1<<5) //suicide_act will do the actual killing.
-#define EFFECT_STUN "stun"
-#define EFFECT_KNOCKDOWN "knockdown"
+#define EFFECT_STUN "stun"
+#define EFFECT_KNOCKDOWN "knockdown"
#define EFFECT_UNCONSCIOUS "unconscious"
+#define EFFECT_PARALYZE "paralyze"
+#define EFFECT_IMMOBILIZE "immobilize"
#define EFFECT_IRRADIATE "irradiate"
#define EFFECT_STUTTER "stutter"
#define EFFECT_SLUR "slur"
-#define EFFECT_EYE_BLUR "eye_blur"
+#define EFFECT_EYE_BLUR "eye_blur"
#define EFFECT_DROWSY "drowsy"
#define EFFECT_JITTER "jitter"
@@ -63,8 +65,10 @@
#define GRAB_NECK 2
#define GRAB_KILL 3
-//slowdown when in softcrit
-#define SOFTCRIT_ADD_SLOWDOWN 6
+//slowdown when in softcrit. Note that crawling slowdown will also apply at the same time!
+#define SOFTCRIT_ADD_SLOWDOWN 4
+//slowdown when crawling
+#define CRAWLING_ADD_SLOWDOWN 2
//Attack types for checking shields/hit reactions
#define MELEE_ATTACK 1
diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm
index 58257cd974b0..b755c239a201 100644
--- a/code/__DEFINES/components.dm
+++ b/code/__DEFINES/components.dm
@@ -141,6 +141,15 @@
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage)
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
+//ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS!
+#define COMSIG_LIVING_STATUS_STUN "living_stun" //from base of mob/living/Stun() (amount, update, ignore)
+#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown" //from base of mob/living/Knockdown() (amount, update, ignore)
+#define COMSIG_LIVING_STATUS_PARALYZE "living_paralyze" //from base of mob/living/Paralyze() (amount, update, ignore)
+#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize" //from base of mob/living/Immobilize() (amount, update, ignore)
+#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious" //from base of mob/living/Unconscious() (amount, update, ignore)
+#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping" //from base of mob/living/Sleeping() (amount, update, ignore)
+ #define COMPONENT_NO_STUN 1 //For all of them
+
// /mob/living/carbon signals
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm
index 751e7688aed6..7fcb5276f3ac 100644
--- a/code/__DEFINES/flags.dm
+++ b/code/__DEFINES/flags.dm
@@ -4,6 +4,9 @@
#define ALL (~0) //For convenience.
#define NONE 0
+//check if all bitflags specified are present
+#define CHECK_MULTIPLE_BITFIELDS(flagvar, flags) ((flagvar & (flags)) == flags)
+
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
// for /datum/var/datum_flags
@@ -80,6 +83,18 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define EMP_PROTECT_CONTENTS (1<<1)
#define EMP_PROTECT_WIRES (1<<2)
+//Mob mobility var flags
+#define MOBILITY_MOVE (1<<0) //can move
+#define MOBILITY_STAND (1<<1) //can, and is, standing up
+#define MOBILITY_PICKUP (1<<2) //can pickup items
+#define MOBILITY_USE (1<<3) //can hold and use items
+#define MOBILITY_UI (1<<4) //can use interfaces like machinery
+#define MOBILITY_STORAGE (1<<5) //can use storage item
+#define MOBILITY_PULL (1<<6) //can pull things
+
+#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_PICKUP | MOBILITY_USE | MOBILITY_UI | MOBILITY_STORAGE | MOBILITY_PULL)
+#define MOBILITY_FLAGS_INTERACTION (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_UI | MOBILITY_STORAGE)
+
// radiation
#define RAD_PROTECT_CONTENTS (1<<0)
#define RAD_NO_CONTAMINATE (1<<1)
diff --git a/code/__DEFINES/movespeed_modification.dm b/code/__DEFINES/movespeed_modification.dm
index d3585aab97e6..06f20fc56efc 100644
--- a/code/__DEFINES/movespeed_modification.dm
+++ b/code/__DEFINES/movespeed_modification.dm
@@ -20,6 +20,7 @@
#define MOVESPEED_ID_CARBON_SOFTCRIT "CARBON_SOFTCRIT"
#define MOVESPEED_ID_CARBON_OLDSPEED "CARBON_DEPRECATED_SPEED"
+#define MOVESPEED_ID_CARBON_CRAWLING "CARBON_CRAWLING"
#define MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD "MONKEY_REAGENT_SPEEDMOD"
#define MOVESPEED_ID_MONKEY_TEMPERATURE_SPEEDMOD "MONKEY_TEMPERATURE_SPEEDMOD"
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index c08898891eb0..53b5ddf6e878 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -36,9 +36,13 @@
// DEBUFFS //
/////////////
-#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is stunned
+#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is unable to move or use items
-#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is knocked down
+#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is unable to stand up
+
+#define STATUS_EFFECT_IMMOBILIZED /datum/status_effect/incapacitating/immobilized //the affected is unable to move
+
+#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed //the affected is unable to move, use items, or stand up.
#define STATUS_EFFECT_UNCONSCIOUS /datum/status_effect/incapacitating/unconscious //the affected is unconscious
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index edb80dc1b01c..aa56db61cd7a 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -199,7 +199,7 @@ GLOBAL_LIST_EMPTY(species_list)
drifting = 0
user_loc = user.loc
- if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying || (extra_checks && !extra_checks.Invoke()))
+ if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_held_item() != holding || user.incapacitated() || (extra_checks && !extra_checks.Invoke()))
. = 0
break
if (progress)
@@ -257,10 +257,16 @@ GLOBAL_LIST_EMPTY(species_list)
drifting = 0
Uloc = user.loc
- if(QDELETED(user) || user.stat || user.IsKnockdown() || user.IsStun() || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
+ if(QDELETED(user) || user.stat || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
. = 0
break
+ if(isliving(user))
+ var/mob/living/L = user
+ if(L.IsStun() || L.IsParalyzed())
+ . = 0
+ break
+
if(!QDELETED(Tloc) && (QDELETED(target) || Tloc != target.loc))
if((Uloc != Tloc || Tloc != user) && !drifting)
. = 0
@@ -283,7 +289,7 @@ GLOBAL_LIST_EMPTY(species_list)
. = 1
return
-/proc/do_after_mob(mob/user, var/list/targets, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks)
+/proc/do_after_mob(mob/user, list/targets, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks, required_mobility_flags = MOBILITY_STAND)
if(!user || !targets)
return 0
if(!islist(targets))
@@ -305,6 +311,9 @@ GLOBAL_LIST_EMPTY(species_list)
var/endtime = world.time + time
var/starttime = world.time
+ var/mob/living/L
+ if(isliving(user))
+ L = user
. = 1
mainloop:
while(world.time < endtime)
@@ -321,8 +330,12 @@ GLOBAL_LIST_EMPTY(species_list)
drifting = 0
user_loc = user.loc
+ if(L && !CHECK_MULTIPLE_BITFIELDS(L.mobility_flags, required_mobility_flags))
+ . = 0
+ break
+
for(var/atom/target in targets)
- if((!drifting && user_loc != user.loc) || QDELETED(target) || originalloc[target] != target.loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying || (extra_checks && !extra_checks.Invoke()))
+ if((!drifting && user_loc != user.loc) || QDELETED(target) || originalloc[target] != target.loc || user.get_active_held_item() != holding || user.incapacitated() || (extra_checks && !extra_checks.Invoke()))
. = 0
break mainloop
if(progbar)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index bfc9dc7a257f..91d0b9c4f251 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -832,7 +832,7 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time
That said, this proc should not be used if the change facing proc of the click code is overridden at the same time*/
- if(!ismob(target) || target.lying)
+ if(!ismob(target) || !(target.mobility_flags & MOBILITY_STAND))
//Make sure we are not doing this for things that can't have a logical direction to the players given that the target would be on their side
return FALSE
if(initator.dir == target.dir) //mobs are facing the same direction
@@ -906,18 +906,18 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
//If one of them is a match, then A is facing B
/proc/is_A_facing_B(atom/A,atom/B)
if(!istype(A) || !istype(B))
- return 0
+ return FALSE
if(isliving(A))
var/mob/living/LA = A
- if(LA.lying)
- return 0
+ if(!(LA.mobility_flags & MOBILITY_STAND))
+ return FALSE
var/goal_dir = get_dir(A,B)
var/clockwise_A_dir = turn(A.dir, -45)
var/anticlockwise_A_dir = turn(A.dir, 45)
if(A.dir == goal_dir || clockwise_A_dir == goal_dir || anticlockwise_A_dir == goal_dir)
- return 1
- return 0
+ return TRUE
+ return FALSE
/*
diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm
index 1cd6fe029de0..707c9a6bf9ad 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -168,8 +168,16 @@ GLOBAL_LIST_INIT(bitfields, list(
"car_traits" = list(
"CAN_KIDNAP" = CAN_KIDNAP,
),
+ "mobility_flags" = list(
+ "MOVE" = MOBILITY_MOVE,
+ "STAND" = MOBILITY_STAND,
+ "PICKUP" = MOBILITY_PICKUP,
+ "USE" = MOBILITY_USE,
+ "UI" = MOBILITY_UI,
+ "STORAGE" = MOBILITY_STORAGE
+ ),
"rad_flags" = list(
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
- ),
+ )
))
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index 006207c3f3be..0f7aae4c897a 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -14,7 +14,7 @@
if(check_click_intercept(params,A))
return
- if(stat || lockcharge || IsKnockdown() || IsStun() || IsUnconscious())
+ if(stat || lockcharge || IsParalyzed() || IsStun() || IsUnconscious())
return
var/list/modifiers = params2list(params)
diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index c6fca66645dc..823739cb29a2 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -257,7 +257,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
if(!istype(L) || !L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
- if(L.canmove)
+ if(L.mobility_flags & MOBILITY_MOVE)
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
@@ -585,7 +585,7 @@ so as to remain in compliance with the most up-to-date laws."
if(!istype(L) || !L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
- if((L.canmove) && (L.last_special <= world.time))
+ if((L.mobility_flags & MOBILITY_MOVE) && (L.last_special <= world.time))
return L.resist_restraints()
/obj/screen/alert/restrained/buckled/Click()
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 0c3d4ba9dcba..8becdd37faca 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -95,20 +95,24 @@
/datum/action/proc/IsAvailable()
if(!owner)
- return 0
+ return FALSE
if(check_flags & AB_CHECK_RESTRAINED)
if(owner.restrained())
- return 0
+ return FALSE
if(check_flags & AB_CHECK_STUN)
- if(owner.IsKnockdown() || owner.IsStun())
- return 0
+ if(isliving(owner))
+ var/mob/living/L = owner
+ if(L.IsParalyzed() || L.IsStun())
+ return FALSE
if(check_flags & AB_CHECK_LYING)
- if(owner.lying)
- return 0
+ if(isliving(owner))
+ var/mob/living/L = owner
+ if(!(L.mobility_flags & MOBILITY_STAND))
+ return FALSE
if(check_flags & AB_CHECK_CONSCIOUS)
if(owner.stat)
- return 0
- return 1
+ return FALSE
+ return TRUE
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
if(button)
diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm
index ac0318cf2b65..503fb18bba59 100644
--- a/code/datums/brain_damage/mild.dm
+++ b/code/datums/brain_damage/mild.dm
@@ -140,9 +140,9 @@
var/fall_chance = 1
if(owner.m_intent == MOVE_INTENT_RUN)
fall_chance += 2
- if(prob(fall_chance) && !owner.lying && !owner.buckled)
+ if(prob(fall_chance) && (owner.mobility_flags & MOBILITY_STAND))
to_chat(owner, "Your leg gives out!")
- owner.Knockdown(35)
+ owner.Paralyze(35)
else if(owner.get_active_held_item())
var/drop_chance = 1
@@ -167,7 +167,7 @@
if(prob(7))
switch(rand(1,5))
if(1)
- if(owner.canmove && !isspaceturf(owner.loc))
+ if((owner.mobility_flags & MOBILITY_MOVE) && !isspaceturf(owner.loc))
to_chat(owner, "Your leg spasms!")
step(owner, pick(GLOB.cardinals))
if(2)
diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm
index 9c8bfffcb33e..0ae2a99f0d2f 100644
--- a/code/datums/brain_damage/severe.dm
+++ b/code/datums/brain_damage/severe.dm
@@ -66,11 +66,11 @@
lose_text = "You can feel your limbs again!"
/datum/brain_trauma/severe/paralysis/on_life()
- owner.Knockdown(200, ignore_canknockdown = TRUE)
+ owner.Paralyze(200, ignore_canknockdown = TRUE)
..()
/datum/brain_trauma/severe/paralysis/on_lose()
- owner.SetKnockdown(0)
+ owner.SetParalyzed(0)
..()
/datum/brain_trauma/severe/narcolepsy
@@ -204,7 +204,7 @@
/datum/brain_trauma/severe/pacifism/on_lose()
owner.remove_trait(TRAIT_PACIFISM, TRAUMA_TRAIT)
..()
-
+
/datum/brain_trauma/severe/hypnotic_stupor
name = "Hypnotic Stupor"
desc = "Patient is prone to episodes of extreme stupor that leaves them extremely suggestible."
@@ -215,9 +215,8 @@
/datum/brain_trauma/severe/hypnotic_stupor/on_lose() //hypnosis must be cleared separately, but brain surgery should get rid of both anyway
..()
owner.remove_status_effect(/datum/status_effect/trance)
-
+
/datum/brain_trauma/severe/hypnotic_stupor/on_life()
..()
if(prob(1) && !owner.has_status_effect(/datum/status_effect/trance))
owner.apply_status_effect(/datum/status_effect/trance, rand(100,300), FALSE)
-
\ No newline at end of file
diff --git a/code/datums/brain_damage/special.dm b/code/datums/brain_damage/special.dm
index 0bbbf8de08fc..adac9fed20de 100644
--- a/code/datums/brain_damage/special.dm
+++ b/code/datums/brain_damage/special.dm
@@ -13,7 +13,7 @@
/datum/brain_trauma/special/godwoken/on_life()
..()
if(prob(4))
- if(prob(33) && (owner.IsStun() || owner.IsKnockdown() || owner.IsUnconscious()))
+ if(prob(33) && (owner.IsStun() || owner.IsParalyzed() || owner.IsUnconscious()))
speak("unstun", TRUE)
else if(prob(60) && owner.health <= owner.crit_threshold)
speak("heal", TRUE)
diff --git a/code/datums/components/caltrop.dm b/code/datums/components/caltrop.dm
index 1e1b7a0a4820..5c6866533c7a 100644
--- a/code/datums/components/caltrop.dm
+++ b/code/datums/components/caltrop.dm
@@ -59,4 +59,4 @@
"You slide on [A]!")
cooldown = world.time
- H.Knockdown(60)
+ H.Paralyze(60)
diff --git a/code/datums/components/chasm.dm b/code/datums/components/chasm.dm
index bc1bbac42307..0303e8f03d34 100644
--- a/code/datums/components/chasm.dm
+++ b/code/datums/components/chasm.dm
@@ -99,7 +99,7 @@
AM.forceMove(T)
if(isliving(AM))
var/mob/living/L = AM
- L.Knockdown(100)
+ L.Paralyze(100)
L.adjustBruteLoss(30)
falling_atoms -= AM
diff --git a/code/datums/components/cleaning.dm b/code/datums/components/cleaning.dm
index 05c26efcc1b8..9ab1793fef11 100644
--- a/code/datums/components/cleaning.dm
+++ b/code/datums/components/cleaning.dm
@@ -24,7 +24,7 @@
M.regenerate_icons()
else if(ishuman(A))
var/mob/living/carbon/human/cleaned_human = A
- if(cleaned_human.lying)
+ if(!(cleaned_human.mobility_flags & MOBILITY_STAND))
if(cleaned_human.head)
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
if(cleaned_human.wear_suit)
diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm
index ccd3d30463ef..a1d4b91825ea 100644
--- a/code/datums/components/footstep.dm
+++ b/code/datums/components/footstep.dm
@@ -17,7 +17,7 @@
var/mob/living/LM = parent
var/v = volume
var/e = e_range
- if(!T.footstep || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
+ if(!T.footstep || LM.buckled || !CHECK_MULTIPLE_BITFIELDS(LM.mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
return
if(iscarbon(LM))
var/mob/living/carbon/C = LM
diff --git a/code/datums/components/jousting.dm b/code/datums/components/jousting.dm
index d1d0d6d5047b..288e9693bc6e 100644
--- a/code/datums/components/jousting.dm
+++ b/code/datums/components/jousting.dm
@@ -54,7 +54,7 @@
msg += " and knocks [target] [target_buckled? "off of [target.buckled]" : "down"]"
if(target_buckled)
target.buckled.unbuckle_mob(target)
- target.Knockdown(knockdown_time)
+ target.Paralyze(knockdown_time)
if(length(msg))
user.visible_message("[msg]!")
diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm
index 71e145d0bda9..a64c2424b586 100644
--- a/code/datums/components/riding.dm
+++ b/code/datums/components/riding.dm
@@ -162,12 +162,12 @@
if(!Process_Spacemove(direction) || !isturf(AM.loc))
return
step(AM, direction)
-
+
if((direction & (direction - 1)) && (AM.loc == next)) //moved diagonally
last_move_diagonal = TRUE
else
last_move_diagonal = FALSE
-
+
handle_vehicle_layer()
handle_vehicle_offsets()
else
@@ -213,7 +213,7 @@
/datum/component/riding/human/force_dismount(mob/living/user)
var/atom/movable/AM = parent
AM.unbuckle_mob(user)
- user.Knockdown(60)
+ user.Paralyze(60)
user.visible_message("[AM] pushes [user] off of [AM.p_them()]!")
/datum/component/riding/cyborg
@@ -271,7 +271,7 @@
M.Move(targetm)
M.visible_message("[M] is thrown clear of [AM]!")
M.throw_at(target, 14, 5, AM)
- M.Knockdown(60)
+ M.Paralyze(60)
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1)
var/atom/movable/AM = parent
diff --git a/code/datums/components/signal_redirect.dm b/code/datums/components/signal_redirect.dm
index db98d5664aba..b190ab9efb4b 100644
--- a/code/datums/components/signal_redirect.dm
+++ b/code/datums/components/signal_redirect.dm
@@ -18,7 +18,7 @@
. = COMPONENT_INCOMPATIBLE
CRASH("Redirect components must be given instanced callbacks, not proc paths.")
_signals[COMSIG_TURF_CHANGE] = CALLBACK(src, .proc/turf_change)
-
+
signals = _signals
/datum/component/redirect/RegisterWithParent()
diff --git a/code/datums/components/spooky.dm b/code/datums/components/spooky.dm
index 8989cb499dbe..68304e0f9414 100644
--- a/code/datums/components/spooky.dm
+++ b/code/datums/components/spooky.dm
@@ -22,7 +22,7 @@
return //undeads are unaffected by the spook-pocalypse.
if(istype(H.dna.species, /datum/species/zombie))
H.adjustStaminaLoss(25)
- H.Knockdown(15) //zombies can't resist the doot
+ H.Paralyze(15) //zombies can't resist the doot
C.Jitter(35)
C.stuttering = 20
if((!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
@@ -36,7 +36,7 @@
/datum/component/spooky/proc/spectral_change(mob/living/carbon/human/H, mob/user)
if((H.getStaminaLoss() > 95) && (!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
- H.Knockdown(20)
+ H.Paralyze(20)
H.set_species(/datum/species/skeleton)
H.visible_message("[H] has given up on life as a mortal.")
var/T = get_turf(H)
diff --git a/code/datums/components/storage/concrete/bag_of_holding.dm b/code/datums/components/storage/concrete/bag_of_holding.dm
index bf97ec651643..251e56f4cc5b 100644
--- a/code/datums/components/storage/concrete/bag_of_holding.dm
+++ b/code/datums/components/storage/concrete/bag_of_holding.dm
@@ -11,7 +11,7 @@
var/turf/loccheck = get_turf(A)
if(is_reebe(loccheck.z))
user.visible_message("An unseen force knocks [user] to the ground!", "\"I think not!\"")
- user.Knockdown(60)
+ user.Paralyze(60)
return
if(istype(loccheck.loc, /area/fabric_of_reality))
to_chat(user, "You can't do that here!")
@@ -25,7 +25,7 @@
for(var/mob/living/M in T)
if(M.movement_type & FLYING)
M.visible_message("The bluespace collapse crushes the air towards it, pulling [M] towards the ground...")
- M.Knockdown(5, TRUE, TRUE) //Overrides stun absorbs.
+ M.Paralyze(5, TRUE, TRUE) //Overrides stun absorbs.
T.TerraformTurf(/turf/open/chasm/magic, /turf/open/chasm/magic)
for (var/obj/structure/ladder/unbreakable/binary/ladder in GLOB.ladders)
ladder.ActivateAlmonds()
diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm
index 55af26b6b2e7..1531092d004c 100644
--- a/code/datums/components/storage/storage.dm
+++ b/code/datums/components/storage/storage.dm
@@ -233,7 +233,7 @@
/datum/component/storage/proc/quick_empty(mob/M)
var/atom/A = parent
- if((!ishuman(M) && (A.loc != M)) || (M.stat != CONSCIOUS) || M.restrained() || !M.canmove)
+ if((!ishuman(M) && (A.loc != M)) || (M.stat != CONSCIOUS) || M.incapacitated())
return
if(locked)
to_chat(M, "[parent] seems to be locked!")
diff --git a/code/datums/components/waddling.dm b/code/datums/components/waddling.dm
index a1f538e4dd76..ce865aed74af 100644
--- a/code/datums/components/waddling.dm
+++ b/code/datums/components/waddling.dm
@@ -8,7 +8,7 @@
/datum/component/waddling/proc/Waddle()
var/mob/living/L = parent
- if(L.incapacitated() || L.lying)
+ if(L.incapacitated() || !(L.mobility_flags & MOBILITY_STAND))
return
animate(L, pixel_z = 4, time = 0)
animate(pixel_z = 0, transform = turn(matrix(), pick(-12, 0, 12)), time=2)
diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm
index 0ace2ca8fd65..ff2cf0ac5c48 100644
--- a/code/datums/diseases/advance/symptoms/heal.dm
+++ b/code/datums/diseases/advance/symptoms/heal.dm
@@ -251,7 +251,7 @@
M.emote("deathgasp")
M.fakedeath("regenerative_coma")
M.update_stat()
- M.update_canmove()
+ M.update_mobility()
addtimer(CALLBACK(src, .proc/uncoma, M), 300)
/datum/symptom/heal/coma/proc/uncoma(mob/living/M)
@@ -260,7 +260,7 @@
active_coma = FALSE
M.cure_fakedeath("regenerative_coma")
M.update_stat()
- M.update_canmove()
+ M.update_mobility()
/datum/symptom/heal/coma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
var/heal_amt = 4 * actual_power
diff --git a/code/datums/diseases/cold.dm b/code/datums/diseases/cold.dm
index 22d45ffb29d1..96e2d0344e05 100644
--- a/code/datums/diseases/cold.dm
+++ b/code/datums/diseases/cold.dm
@@ -13,7 +13,7 @@
..()
switch(stage)
if(2)
- if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(40)) //changed FROM prob(10) until sleeping is fixed
to_chat(affected_mob, "You feel better.")
cure()
return
@@ -30,7 +30,7 @@
if(prob(1))
to_chat(affected_mob, "Mucous runs down the back of your throat.")
if(3)
- if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(25)) //changed FROM prob(5) until sleeping is fixed
to_chat(affected_mob, "You feel better.")
cure()
return
diff --git a/code/datums/diseases/flu.dm b/code/datums/diseases/flu.dm
index e1943937baf3..96a36be1538b 100644
--- a/code/datums/diseases/flu.dm
+++ b/code/datums/diseases/flu.dm
@@ -15,7 +15,7 @@
..()
switch(stage)
if(2)
- if(affected_mob.lying && prob(20))
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(20))
to_chat(affected_mob, "You feel better.")
stage--
return
@@ -34,7 +34,7 @@
affected_mob.updatehealth()
if(3)
- if(affected_mob.lying && prob(15))
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(15))
to_chat(affected_mob, "You feel better.")
stage--
return
diff --git a/code/datums/diseases/heart_failure.dm b/code/datums/diseases/heart_failure.dm
index 3fbf6ef17766..9fe0c81775ee 100644
--- a/code/datums/diseases/heart_failure.dm
+++ b/code/datums/diseases/heart_failure.dm
@@ -44,7 +44,7 @@
if(prob(25))
affected_mob.vomit(95)
H.emote("cough")
- H.Knockdown(40)
+ H.Paralyze(40)
H.losebreath += 4
if(prob(3))
to_chat(H, "You feel very weak and dizzy...")
diff --git a/code/datums/diseases/retrovirus.dm b/code/datums/diseases/retrovirus.dm
index fe099e495bac..47365b3a7526 100644
--- a/code/datums/diseases/retrovirus.dm
+++ b/code/datums/diseases/retrovirus.dm
@@ -31,7 +31,7 @@
switch(stage)
if(1)
if(restcure)
- if(affected_mob.lying && prob(30))
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(30))
to_chat(affected_mob, "You feel better.")
cure()
return
@@ -43,7 +43,7 @@
to_chat(affected_mob, "You feel angry.")
if(2)
if(restcure)
- if(affected_mob.lying && prob(20))
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(20))
to_chat(affected_mob, "You feel better.")
cure()
return
@@ -58,7 +58,7 @@
to_chat(affected_mob, "Your stomach churns.")
if(3)
if(restcure)
- if(affected_mob.lying && prob(20))
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(20))
to_chat(affected_mob, "You feel better.")
cure()
return
@@ -73,7 +73,7 @@
if(4)
if(restcure)
- if(affected_mob.lying && prob(5))
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(5))
to_chat(affected_mob, "You feel better.")
cure()
return
diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm
index 57cdb9bcf51a..0e81db437912 100644
--- a/code/datums/emotes.dm
+++ b/code/datums/emotes.dm
@@ -120,11 +120,14 @@
if(DEAD)
to_chat(user, "You cannot [key] while dead.")
return FALSE
- if(restraint_check && (user.IsStun() || user.IsKnockdown()))
- if(!intentional)
- return FALSE
- to_chat(user, "You cannot [key] while stunned.")
- return FALSE
+ if(restraint_check)
+ if(isliving(user))
+ var/mob/living/L = user
+ if(L.IsParalyzed() || L.IsStun())
+ if(!intentional)
+ return FALSE
+ to_chat(user, "You cannot [key] while stunned.")
+ return FALSE
if(restraint_check && user.restrained())
if(!intentional)
return FALSE
diff --git a/code/datums/martial.dm b/code/datums/martial.dm
index 2bc01e0bf614..9a5f8e4aba86 100644
--- a/code/datums/martial.dm
+++ b/code/datums/martial.dm
@@ -38,7 +38,7 @@
var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
var/atk_verb = A.dna.species.attack_verb
- if(D.lying)
+ if(!(D.mobility_flags & MOBILITY_STAND))
atk_verb = "kick"
switch(atk_verb)
@@ -74,7 +74,7 @@
"[A] has knocked [D] down!")
D.apply_effect(40, EFFECT_KNOCKDOWN, armor_block)
D.forcesay(GLOB.hit_appends)
- else if(D.lying)
+ else if(!(D.mobility_flags & MOBILITY_STAND))
D.forcesay(GLOB.hit_appends)
return 1
diff --git a/code/datums/martial/boxing.dm b/code/datums/martial/boxing.dm
index 96431fbe32be..0b159c5e2520 100644
--- a/code/datums/martial/boxing.dm
+++ b/code/datums/martial/boxing.dm
@@ -43,7 +43,7 @@
D.SetSleeping(100)
D.forcesay(GLOB.hit_appends)
log_combat(A, D, "knocked out (boxing) ")
- else if(D.lying)
+ else if(!(D.mobility_flags & MOBILITY_STAND))
D.forcesay(GLOB.hit_appends)
return 1
diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm
index c2322a3c31a6..7b4dea95e72f 100644
--- a/code/datums/martial/cqc.dm
+++ b/code/datums/martial/cqc.dm
@@ -53,19 +53,19 @@
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!can_use(A))
return FALSE
- if(!D.stat || !D.IsKnockdown())
+ if(D.mobility_flags & MOBILITY_STAND)
D.visible_message("[A] slams [D] into the ground!", \
"[A] slams you into the ground!")
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
D.apply_damage(10, BRUTE)
- D.Knockdown(120)
+ D.Paralyze(120)
log_combat(A, D, "slammed (CQC)")
return TRUE
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!can_use(A))
return FALSE
- if(!D.stat || !D.IsKnockdown())
+ if(!D.stat || !D.IsParalyzed())
D.visible_message("[A] kicks [D] back!", \
"[A] kicks you back!")
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
@@ -73,7 +73,7 @@
D.throw_at(throw_target, 1, 14, A)
D.apply_damage(10, BRUTE)
log_combat(A, D, "kicked (CQC)")
- if(D.IsKnockdown() && !D.stat)
+ if(D.IsParalyzed() && !D.stat)
D.visible_message("[A] kicks [D]'s head, knocking [D.p_them()] out!", \
"[A] kicks your head, knocking you out!")
playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1)
@@ -144,7 +144,7 @@
A.do_attack_animation(D)
var/picked_hit_type = pick("CQC'd", "Big Bossed")
var/bonus_damage = 13
- if(D.IsKnockdown() || D.resting || D.lying)
+ if(!(D.mobility_flags & MOBILITY_STAND))
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE)
@@ -155,12 +155,12 @@
D.visible_message("[A] [picked_hit_type] [D]!", \
"[A] [picked_hit_type] you!")
log_combat(A, D, "[picked_hit_type] (CQC)")
- if(A.resting && !D.stat && !D.IsKnockdown())
+ if(A.resting && !D.stat && !D.IsParalyzed())
D.visible_message("[A] leg sweeps [D]!", \
"[A] leg sweeps you!")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
D.apply_damage(10, BRUTE)
- D.Knockdown(60)
+ D.Paralyze(60)
log_combat(A, D, "sweeped (CQC)")
return TRUE
@@ -172,7 +172,7 @@
if(check_streak(A,D))
return TRUE
if(prob(65))
- if(!D.stat || !D.IsKnockdown() || !restraining)
+ if(!D.stat || !D.IsParalyzed() || !restraining)
I = D.get_active_held_item()
D.visible_message("[A] strikes [D]'s jaw with their hand!", \
"[A] strikes your jaw, disorienting you!")
diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm
index 8a5f0f9439d5..25ae60c60164 100644
--- a/code/datums/martial/krav_maga.dm
+++ b/code/datums/martial/krav_maga.dm
@@ -86,13 +86,13 @@
return 0
/datum/martial_art/krav_maga/proc/leg_sweep(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
- if(D.stat || D.IsKnockdown())
+ if(D.stat || D.IsParalyzed())
return 0
D.visible_message("[A] leg sweeps [D]!", \
"[A] leg sweeps you!")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
D.apply_damage(5, BRUTE)
- D.Knockdown(40)
+ D.Paralyze(40)
log_combat(A, D, "leg sweeped")
return 1
@@ -128,7 +128,7 @@
log_combat(A, D, "punched")
var/picked_hit_type = pick("punches", "kicks")
var/bonus_damage = 10
- if(D.IsKnockdown() || D.resting || D.lying)
+ if(!(D.mobility_flags & MOBILITY_STAND))
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE)
diff --git a/code/datums/martial/mushpunch.dm b/code/datums/martial/mushpunch.dm
index 33d5bb51bf88..e38b764ad81f 100644
--- a/code/datums/martial/mushpunch.dm
+++ b/code/datums/martial/mushpunch.dm
@@ -15,7 +15,7 @@
playsound(D, 'sound/effects/meteorimpact.ogg', 25, 1, -1)
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
- D.Knockdown(20)
+ D.Paralyze(20)
if(atk_verb)
log_combat(A, D, "[atk_verb] (Mushroom Punch)")
return TRUE
diff --git a/code/datums/martial/psychotic_brawl.dm b/code/datums/martial/psychotic_brawl.dm
index 4a3000548cbf..196ec5307e25 100644
--- a/code/datums/martial/psychotic_brawl.dm
+++ b/code/datums/martial/psychotic_brawl.dm
@@ -57,7 +57,7 @@
playsound(get_turf(D), 'sound/effects/meteorimpact.ogg', 25, 1, -1)
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
- D.Knockdown(60)
+ D.Paralyze(60)
if(7,8)
basic_hit(A,D)
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index e9fd9a94f910..aa499f90c2ed 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -35,7 +35,7 @@
return 0
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat && !D.IsStun() && !D.IsKnockdown())
+ if(!D.stat && !D.IsStun() && !D.IsParalyzed())
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("[A] grabs [D]'s wrist and wrenches it sideways!", \
"[A] grabs your wrist and violently wrenches it to the side!")
@@ -49,19 +49,19 @@
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(A.dir == D.dir && !D.stat && !D.IsKnockdown())
+ if(A.dir == D.dir && !D.stat && !D.IsParalyzed())
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("[A] kicks [D] in the back!", \
"[A] kicks you in the back, making you stumble and fall!")
step_to(D,get_step(D,D.dir),1)
- D.Knockdown(80)
+ D.Paralyze(80)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
return 1
log_combat(A, D, "back-kicked (Sleeping Carp)")
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat && !D.IsKnockdown())
+ if(!D.stat && !D.IsParalyzed())
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.visible_message("[A] knees [D] in the stomach!", \
"[A] winds you with a knee in the stomach!")
@@ -74,7 +74,7 @@
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(!D.stat && !D.IsKnockdown())
+ if(!D.stat && !D.IsParalyzed())
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.visible_message("[A] kicks [D] in the head!", \
"[A] kicks you in the jaw!")
@@ -87,7 +87,7 @@
return basic_hit(A,D)
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
- if(D.IsKnockdown() || D.resting || D.stat)
+ if(!(D.mobility_flags & MOBILITY_STAND))
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("[A] elbow drops [D]!", \
"[A] piledrives you with their elbow!")
@@ -130,9 +130,9 @@
"[A] [atk_verb] you!")
D.apply_damage(rand(10,15), BRUTE)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1)
- if(prob(D.getBruteLoss()) && !D.lying)
+ if(prob(D.getBruteLoss()) && (D.mobility_flags & MOBILITY_STAND))
D.visible_message("[D] stumbles and falls!", "The blow sends you to the ground!")
- D.Knockdown(80)
+ D.Paralyze(80)
log_combat(A, D, "[atk_verb] (Sleeping Carp)")
return 1
@@ -181,7 +181,7 @@
add_fingerprint(user)
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
to_chat(user, "You club yourself over the head with [src].")
- user.Knockdown(60)
+ user.Paralyze(60)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
@@ -215,7 +215,7 @@
if(prob(10))
H.visible_message("[H] collapses!", \
"Your legs give out!")
- H.Knockdown(80)
+ H.Paralyze(80)
if(H.staminaloss && !H.IsSleeping())
var/total_health = (H.health - H.staminaloss)
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm
index e57edf9fb2f5..f993675dd9b9 100644
--- a/code/datums/martial/wrestling.dm
+++ b/code/datums/martial/wrestling.dm
@@ -191,7 +191,7 @@
if (T && isturf(T))
if (!D.stat)
D.emote("scream")
- D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human/.Knockdown, 20))
+ D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human/.Paralyze, 20))
log_combat(A, D, "has thrown with wrestling")
return 0
@@ -287,7 +287,7 @@
playsound(A.loc, "swing_hit", 50, 1)
if (!D.stat)
D.emote("scream")
- D.Knockdown(40)
+ D.Paralyze(40)
switch(rand(1,3))
if (2)
@@ -345,7 +345,7 @@
var/turf/T = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
if (T && isturf(T))
- D.Knockdown(20)
+ D.Paralyze(20)
D.throw_at(T, 3, 2)
log_combat(A, D, "roundhouse-kicked")
@@ -384,7 +384,7 @@
if (falling == 1)
A.visible_message("...and dives head-first into the ground, ouch!")
A.adjustBruteLoss(rand(10,20))
- A.Knockdown(60)
+ A.Paralyze(60)
to_chat(A, "[D] is too far away!")
return 0
@@ -413,7 +413,7 @@
else
D.adjustBruteLoss(rand(20,30))
- D.Knockdown(40)
+ D.Paralyze(40)
A.pixel_y = 0
diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm
index 04f9342fbc34..c970e9d42204 100644
--- a/code/datums/status_effects/buffs.dm
+++ b/code/datums/status_effects/buffs.dm
@@ -74,7 +74,9 @@
owner.add_stun_absorption("vanguard", INFINITY, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
owner.visible_message("[owner] begins to faintly glow!", "You will absorb all stuns for the next twenty seconds.")
owner.SetStun(0, FALSE)
- owner.SetKnockdown(0)
+ owner.SetKnockdown(0, FALSE)
+ owner.SetParalyzed(0, FALSE)
+ owner.SetImmobilized(0)
progbar = new(owner, duration, owner)
progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0))
progbar.update(duration - world.time)
@@ -96,7 +98,7 @@
if(owner.stun_absorption[i]["end_time"] > world.time && owner.stun_absorption[i]["priority"] > vanguard["priority"])
otheractiveabsorptions = TRUE
if(!GLOB.ratvar_awakens && stuns_blocked && !otheractiveabsorptions)
- owner.Knockdown(stuns_blocked)
+ owner.Paralyze(stuns_blocked)
message_to_owner = "The weight of the Vanguard's protection crashes down upon you!"
if(stuns_blocked >= 300)
message_to_owner += "\nYou faint from the exertion!"
@@ -224,9 +226,9 @@
return ..()
/datum/status_effect/wish_granters_gift/on_remove()
- owner.revive(full_heal = 1, admin_revive = 1)
+ owner.revive(full_heal = TRUE, admin_revive = TRUE)
owner.visible_message("[owner] appears to wake from the dead, having healed all wounds!", "You have regenerated.")
- owner.update_canmove()
+ owner.update_mobility()
/obj/screen/alert/status_effect/wish_granters_gift
name = "Wish Granter's Immortality"
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 286b92861b2a..d60f3a5896a6 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -12,12 +12,12 @@
. = ..()
if(.)
if(updating_canmove)
- owner.update_canmove()
+ owner.update_mobility()
if(needs_update_stat || issilicon(owner))
owner.update_stat()
/datum/status_effect/incapacitating/on_remove()
- owner.update_canmove()
+ owner.update_mobility()
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
owner.update_stat()
@@ -29,10 +29,12 @@
/datum/status_effect/incapacitating/knockdown
id = "knockdown"
-/datum/status_effect/incapacitating/knockdown/tick()
- if(owner.getStaminaLoss())
- owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
+//IMMOBILIZED
+/datum/status_effect/incapacitating/immobilized
+ id = "immobilized"
+/datum/status_effect/incapacitating/paralyzed
+ id = "paralyzed"
//UNCONSCIOUS
/datum/status_effect/incapacitating/unconscious
@@ -128,7 +130,7 @@
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check() && number_legs)
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
if(GLOB.ratvar_awakens)
- owner.Knockdown(20)
+ owner.Paralyze(20)
if(iscultist(owner))
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_L_LEG)
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_R_LEG)
@@ -458,7 +460,7 @@
var/old_health
/datum/status_effect/kindle/tick()
- owner.Knockdown(15)
+ owner.Paralyze(15)
if(iscarbon(owner))
var/mob/living/carbon/C = owner
C.silent = max(2, C.silent)
diff --git a/code/datums/status_effects/gas.dm b/code/datums/status_effects/gas.dm
index dfe0a1d94e10..4dce078ee3ce 100644
--- a/code/datums/status_effects/gas.dm
+++ b/code/datums/status_effects/gas.dm
@@ -18,11 +18,11 @@
to_chat(owner, "You become frozen in a cube!")
cube = icon('icons/effects/freeze.dmi', "ice_cube")
owner.add_overlay(cube)
- owner.update_canmove()
+ owner.update_mobility()
return ..()
/datum/status_effect/freon/tick()
- owner.update_canmove()
+ owner.update_mobility()
if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL)
qdel(src)
@@ -32,14 +32,14 @@
if(!QDELETED(src))
to_chat(owner, "You break out of the ice cube!")
owner.remove_status_effect(/datum/status_effect/freon)
- owner.update_canmove()
+ owner.update_mobility()
/datum/status_effect/freon/on_remove()
if(!owner.stat)
to_chat(owner, "The cube melts!")
owner.cut_overlay(cube)
owner.adjust_bodytemperature(100)
- owner.update_canmove()
+ owner.update_mobility()
qdel(redirect_component.resolve())
redirect_component = null
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index eb9e40e61246..1bbaacb8f118 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -112,7 +112,7 @@
grab_state = 0
if(isliving(ex_pulled))
var/mob/living/L = ex_pulled
- L.update_canmove()// mob gets up if it was lyng down in a chokehold
+ L.update_mobility()// mob gets up if it was lyng down in a chokehold
/atom/movable/proc/Move_Pulled(atom/A)
if(!pulling)
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 868ad8e0e6d7..f62021bcc376 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -85,8 +85,12 @@
open_machine()
/obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ if(user.stat || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_STAND))
+ return
close_machine(target)
/obj/machinery/sleeper/attackby(obj/item/I, mob/user, params)
diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm
index d5a753c973e2..815feb093149 100644
--- a/code/game/machinery/_machinery.dm
+++ b/code/game/machinery/_machinery.dm
@@ -176,7 +176,7 @@ Class Procs:
A.forceMove(T)
if(isliving(A))
var/mob/living/L = A
- L.update_canmove()
+ L.update_mobility()
occupant = null
/obj/machinery/proc/close_machine(atom/movable/target = null)
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 95d1c9210cbf..72bba416df19 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -529,7 +529,7 @@
M.vomit(10, distance = 5)
if(ORION_TRAIL_FLUX)
if(prob(75))
- M.Knockdown(60)
+ M.Paralyze(60)
say("A sudden gust of powerful wind slams [M] into the floor!")
M.take_bodypart_damage(25)
playsound(loc, 'sound/weapons/genhit.ogg', 100, 1)
diff --git a/code/game/machinery/computer/gulag_teleporter.dm b/code/game/machinery/computer/gulag_teleporter.dm
index 68cbf03f03c9..ca72f9bdd19e 100644
--- a/code/game/machinery/computer/gulag_teleporter.dm
+++ b/code/game/machinery/computer/gulag_teleporter.dm
@@ -152,7 +152,7 @@
teleporter.handle_prisoner(id, temporary_record)
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
prisoner.forceMove(get_turf(beacon))
- prisoner.Knockdown(40) // small travel dizziness
+ prisoner.Paralyze(40) // small travel dizziness
to_chat(prisoner, "The teleportation makes you a little dizzy.")
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
playsound(src, "sparks", 50, 1)
diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm
index 5c8d189a7f98..a4f7b289acc3 100644
--- a/code/game/machinery/computer/robot.dm
+++ b/code/game/machinery/computer/robot.dm
@@ -37,11 +37,11 @@
dat += "[R.name] |"
if(R.stat)
dat += " Not Responding |"
- else if (!R.canmove)
+ else if (!(R.mobility_flags & MOBILITY_MOVE))
dat += " Locked Down |"
else
dat += " Operating Normally |"
- if (!R.canmove)
+ if (!(R.mobility_flags & MOBILITY_MOVE))
else if(R.cell)
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
else
@@ -62,7 +62,7 @@
dat += "(Hack) "
else if(IsAdminGhost(user) && !R.emagged)
dat += "(Hack) "
- dat += "([R.canmove ? "Lockdown" : "Release"]) "
+ dat += "([(R.mobility_flags & MOBILITY_MOVE) ? "Lockdown" : "Release"]) "
dat += "(Destroy)"
dat += "
"
@@ -116,10 +116,10 @@
if(src.allowed(usr))
var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) in GLOB.silicon_mobs
if(can_control(usr, R))
- var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
+ var/choice = input("Are you certain you wish to [!R.lockcharge ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm" && can_control(usr, R) && !..())
- message_admins("[ADMIN_LOOKUPFLW(usr)] [R.canmove ? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!")
- log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [key_name(R)]!")
+ message_admins("[ADMIN_LOOKUPFLW(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!")
+ log_game("[key_name(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!")
R.SetLockdown(!R.lockcharge)
to_chat(R, "[!R.lockcharge ? "Your lockdown has been lifted!" : "You have been locked down!"]")
if(R.connected_ai)
diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm
index 1cf959202eb6..b5f8f4eef9b8 100644
--- a/code/game/machinery/dance_machine.dm
+++ b/code/game/machinery/dance_machine.dm
@@ -375,10 +375,8 @@
sleep(speed)
for(var/i in 1 to speed)
M.setDir(pick(GLOB.cardinals))
- // update resting manually to avoid chat spam
for(var/mob/living/carbon/NS in rangers)
- NS.resting = !NS.resting
- NS.update_canmove()
+ NS.set_resting(!NS.resting, TRUE)
time--
/obj/machinery/jukebox/disco/proc/dance5(var/mob/living/M)
@@ -461,5 +459,9 @@
. = ..()
if(active)
for(var/mob/M in rangers)
- if(prob(5+(allowed(M)*4)) && M.canmove)
+ if(prob(5+(allowed(M)*4)))
+ if(isliving(M))
+ var/mob/living/L = M
+ if(!(L.mobility_flags & MOBILITY_MOVE))
+ continue
dance(M)
diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm
index 2f221b07878b..27ffc12d2b2d 100644
--- a/code/game/machinery/dna_scanner.dm
+++ b/code/game/machinery/dna_scanner.dm
@@ -144,6 +144,7 @@
toggle_open(user)
/obj/machinery/dna_scannernew/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ var/mob/living/L = user
+ if(user.stat || (isliving(user) && (!(L.mobility_flags & MOBILITY_STAND) || !(L.mobility_flags & MOBILITY_UI))) || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
return
close_machine(target)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 6b9755433c02..72e88243bfae 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -765,7 +765,7 @@
if(!istype(H.head, /obj/item/clothing/head/helmet))
H.visible_message("[user] headbutts the airlock.", \
"You headbutt the airlock!")
- H.Knockdown(100)
+ H.Paralyze(100)
H.apply_damage(10, BRUTE, BODY_ZONE_HEAD)
else
visible_message("[user] headbutts the airlock. Good thing [user.p_theyre()] wearing a helmet.")
@@ -1031,7 +1031,7 @@
if(!I.use_tool(src, user, 150, volume=50))
to_chat(user, "You slip and [charge] detonates!")
charge.ex_act(EXPLODE_DEVASTATE)
- user.Knockdown(60)
+ user.Paralyze(60)
return
user.visible_message("[user] removes [charge] from [src].", \
"You gently pry out [charge] from [src] and unhook its wires.")
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index d590fd79256b..297a646ce8c9 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -498,7 +498,7 @@
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
flash_color(L, flash_color="#960000", flash_time=20)
- L.Knockdown(40)
+ L.Paralyze(40)
L.throw_at(throwtarget, 5, 1,src)
return 0
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 6f216670bd7d..4b53dd9794c3 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -323,10 +323,10 @@
else if(ishuman(L)) //For humans
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
L.emote("scream")
- L.Knockdown(100)
+ L.Paralyze(100)
else if(ismonkey(L)) //For monkeys
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
- L.Knockdown(100)
+ L.Paralyze(100)
else //for simple_animals & borgs
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
var/turf/location = get_turf(src)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 1390f3d7c396..4d24a5503763 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -115,7 +115,7 @@
continue
if(L.flash_act(affect_silicon = 1))
- L.Knockdown(strength)
+ L.Paralyze(strength)
flashed = TRUE
if(flashed)
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index 6b8cac544e64..22b6fe900bc8 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -91,7 +91,7 @@ Buildable meters
set name = "Flip Pipe"
set src in view(1)
- if ( usr.stat || usr.restrained() || !usr.canmove )
+ 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 effdc174b6a5..9f632cfef90f 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -34,7 +34,8 @@
/obj/machinery/pipedispenser/Topic(href, href_list)
if(..())
return 1
- if(!anchored|| !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
+ var/mob/living/L = usr
+ if(!anchored || (istype(L) && !(L.mobility_flags & MOBILITY_UI)) || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=pipedispenser")
return 1
usr.set_machine(src)
@@ -94,7 +95,7 @@
//Allow you to drag-drop disposal pipes and transit tubes into it
/obj/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/pipe, mob/usr)
- if(!usr.canmove || usr.stat || usr.restrained())
+ if(!usr.incapacitated())
return
if (!istype(pipe, /obj/structure/disposalconstruct) && !istype(pipe, /obj/structure/c_transit_tube) && !istype(pipe, /obj/structure/c_transit_tube_pod))
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index f44e52e187b7..ef3981f7ea1d 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -386,8 +386,8 @@
if(iscarbon(A))
var/mob/living/carbon/C = A
- //If not emagged, only target non downed carbons
- if(mode != TURRET_LETHAL && (C.stat || C.handcuffed || C.lying))
+ //If not emagged, only target carbons that can use items
+ if(mode != TURRET_LETHAL && (C.stat || C.handcuffed || !(C.mobility_flags & MOBILITY_USE)))
continue
//If emagged, target all but dead carbons
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index a157f9c4859a..66d54d2176b9 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -178,9 +178,13 @@
new /obj/item/stack/sheet/metal (loc, 2)
qdel(src)
-/obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !Adjacent(A) || !isliving(A))
+/obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/living/user)
+ if(!istype(user) || user.stat || !Adjacent(user) || !Adjacent(A) || !isliving(A))
return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_STAND))
+ return
var/mob/living/target = A
if(!state_open)
to_chat(user, "The unit's doors are shut!")
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index 1ebe8cb463f2..1b32b642cba4 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -54,7 +54,7 @@
// Only humans can enter from the west side, while lying down.
var/move_dir = get_dir(loc, AM.loc)
var/mob/living/carbon/human/H = AM
- if((transform_standing || H.lying) && move_dir == EAST)// || move_dir == WEST)
+ if((transform_standing || !(H.mobility_flags & MOBILITY_STAND)) && move_dir == EAST)// || move_dir == WEST)
AM.forceMove(drop_location())
do_transform(AM)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index 5dbccbb99cf6..357be713a2cf 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -227,6 +227,8 @@
M.adjustOxyLoss(-1)
M.AdjustStun(-80)
M.AdjustKnockdown(-80)
+ M.AdjustParalyzed(-80)
+ M.AdjustImmobilized(-80)
M.AdjustUnconscious(-80)
if(M.reagents.get_reagent_amount("epinephrine") < 5)
M.reagents.add_reagent("epinephrine", 5)
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index c632f2757da2..2ca7f1e478b4 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -177,7 +177,7 @@
M.SetSleeping(0)
M.stuttering += 20
M.adjustEarDamage(0, 30)
- M.Knockdown(60)
+ M.Paralyze(60)
if(prob(30))
M.Stun(200)
M.Unconscious(80)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index c142269a81d6..f24cde53f365 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -741,7 +741,7 @@
AI.cancel_camera()
AI.controlled_mech = src
AI.remote_control = src
- AI.canmove = 1 //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
+ AI.mobility_flags = ALL //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
to_chat(AI, AI.can_dominate_mechs ? "Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!" :\
"You have been uploaded to a mech's onboard computer.")
@@ -914,7 +914,7 @@
brainmob.forceMove(src) //should allow relaymove
brainmob.reset_perspective(src)
brainmob.remote_control = src
- brainmob.update_canmove()
+ brainmob.update_mobility()
brainmob.update_mouse_pointer()
icon_state = initial(icon_state)
update_icon()
@@ -980,7 +980,7 @@
L.reset_perspective()
mmi.mecha = null
mmi.update_icon()
- L.canmove = 0
+ L.mobility_flags = NONE
icon_state = initial(icon_state)+"-open"
setDir(dir_in)
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index 9c3df5395f3c..2ff97e86c7eb 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -66,7 +66,7 @@
M.buckled = src
M.setDir(dir)
buckled_mobs |= M
- M.update_canmove()
+ M.update_mobility()
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
post_buckle_mob(M)
@@ -85,7 +85,7 @@
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
- buckled_mob.update_canmove()
+ buckled_mob.update_mobility()
buckled_mob.clear_alert("buckled")
buckled_mobs -= buckled_mob
SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
index 625b2d3c8242..438a92dc8c61 100644
--- a/code/game/objects/effects/anomalies.dm
+++ b/code/game/objects/effects/anomalies.dm
@@ -113,7 +113,7 @@
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
if(boing && isliving(A) && !A.stat)
- A.Knockdown(40)
+ A.Paralyze(40)
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
A.throw_at(target, 5, 1)
boing = 0
diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm
index 18c1ff58902c..cc9de7794dea 100644
--- a/code/game/objects/effects/effect_system/effects_other.dm
+++ b/code/game/objects/effects/effect_system/effects_other.dm
@@ -112,7 +112,7 @@
for(var/mob/living/L in viewers(1, location))
if(prob(50 * amount))
to_chat(L, "The explosion knocks you down.")
- L.Knockdown(rand(20,100))
+ L.Paralyze(rand(20,100))
return
else
dyn_explosion(location, amount, flashing_factor)
\ No newline at end of file
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index b4993125ebca..5e51f50cc6c7 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -48,7 +48,7 @@
/obj/effect/mine/stun/mineEffect(mob/living/victim)
if(isliving(victim))
- victim.Knockdown(stun_time)
+ victim.Paralyze(stun_time)
/obj/effect/mine/kickmine
name = "kick mine"
diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm
index 3e0848130d8c..b2d81dce0a6e 100644
--- a/code/game/objects/effects/step_triggers.dm
+++ b/code/game/objects/effects/step_triggers.dm
@@ -61,10 +61,10 @@
if(AM in T.affecting)
return
- if(ismob(AM))
- var/mob/M = AM
+ if(isliving(AM))
+ var/mob/living/M = AM
if(immobilize)
- M.canmove = 0
+ M.mobility_flags &= ~MOBILITY_MOVE
affecting.Add(AM)
while(AM && !stopthrow)
@@ -98,10 +98,11 @@
affecting.Remove(AM)
- if(ismob(AM))
- var/mob/M = AM
+ if(isliving(AM))
+ var/mob/living/M = AM
if(immobilize)
- M.canmove = 1
+ M.mobility_flags |= MOBILITY_MOVE
+ M.update_mobility()
/* Stops things thrown by a thrower, doesn't do anything */
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 7d7062026d25..3a505464d38d 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -173,14 +173,17 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
set category = "Object"
set src in oview(1)
- if(!isturf(loc) || usr.stat || usr.restrained() || !usr.canmove)
+ if(!isturf(loc) || usr.stat || usr.restrained())
return
- var/turf/T = src.loc
+ if(isliving(usr))
+ var/mob/living/L = usr
+ if(!(L.mobility_flags & MOBILITY_PICKUP))
+ return
- src.loc = null
-
- src.loc = T
+ var/turf/T = loc
+ loc = null
+ loc = T
/obj/item/examine(mob/user) //This might be spammy. Remove?
..()
@@ -413,9 +416,14 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
set category = "Object"
set name = "Pick up"
- if(usr.incapacitated() || !Adjacent(usr) || usr.lying)
+ if(usr.incapacitated() || !Adjacent(usr))
return
+ if(isliving(usr))
+ var/mob/living/L = usr
+ if(!(L.mobility_flags & MOBILITY_PICKUP))
+ return
+
if(usr.get_active_held_item() == null) // Let me know if this has any problems -Yota
usr.UnarmedAttack(src)
@@ -502,7 +510,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
to_chat(M, "You drop what you're holding and clutch at your eyes!")
M.adjust_blurriness(10)
M.Unconscious(20)
- M.Knockdown(40)
+ M.Paralyze(40)
if (prob(eyes.eye_damage - 10 + 1))
M.become_blind(EYE_DAMAGE)
to_chat(M, "You go blind!")
diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm
index f7c37715aab3..d476827e512e 100644
--- a/code/game/objects/items/chrono_eraser.dm
+++ b/code/game/objects/items/chrono_eraser.dm
@@ -108,8 +108,8 @@
if(F)
if(field == F)
var/turf/currentpos = get_turf(src)
- var/mob/living/user = src.loc
- if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !user.lying && (user.stat == CONSCIOUS))
+ var/mob/living/user = loc
+ if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && (user.mobility_flags & MOBILITY_STAND) && (user.stat == CONSCIOUS))
return 1
field_disconnect(F)
return 0
@@ -150,8 +150,8 @@
gun = loc
. = ..()
-
-
+
+
/obj/effect/chrono_field
diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm
index 1214a60946d7..8ac62d839d23 100644
--- a/code/game/objects/items/cigs_lighters.dm
+++ b/code/game/objects/items/cigs_lighters.dm
@@ -859,7 +859,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
- M.Knockdown(300, 1, 0)
+ M.Paralyze(300, 1, 0)
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
sp.set_up(5, 1, src)
sp.start()
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index fd1bc9e0d5f0..1e29c1041079 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -638,7 +638,7 @@
C.blind_eyes(1)
if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS.
C.confused = max(C.confused, 3)
- C.Knockdown(60)
+ C.Paralyze(60)
if(ishuman(C) && actually_paints)
var/mob/living/carbon/human/H = C
H.lip_style = "spray_face"
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index 24cee2f21d31..641a51030d63 100644
--- a/code/game/objects/items/defib.dm
+++ b/code/game/objects/items/defib.dm
@@ -456,7 +456,7 @@
M.visible_message("[user] has touched [M] with [src]!", \
"[user] has touched [M] with [src]!")
M.adjustStaminaLoss(50)
- M.Knockdown(100)
+ M.Paralyze(100)
M.updatehealth() //forces health update before next life tick
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
M.emote("gasp")
@@ -512,7 +512,7 @@
H.set_heartattack(TRUE)
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
log_combat(user, H, "overloaded the heart of", defib)
- H.Knockdown(100)
+ H.Paralyze(100)
H.Jitter(100)
if(req_defib)
defib.deductcharge(revivecost)
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index d526f3026e9c..67905a47b60c 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -178,10 +178,11 @@
else
names[M.name] = 1
dat += "[M.name]"
- if(M.buckled && !M.lying)
- dat += " (Sitting)"
- if(M.lying)
- dat += " (Laying down)"
+ if(!(M.mobility_flags & MOBILITY_STAND))
+ if(M.buckled)
+ dat += " (Sitting)"
+ else
+ dat += " (Laying down)"
dat += " \[Track\]
"
if(length(dat) == 0)
dat += "No motion detected."
diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm
index 17a056291026..7e0cf2a60f12 100644
--- a/code/game/objects/items/devices/instruments.dm
+++ b/code/game/objects/items/devices/instruments.dm
@@ -41,11 +41,8 @@
/obj/item/instrument/interact(mob/user)
ui_interact(user)
-/obj/item/instrument/ui_interact(mob/user)
- if(!user)
- return
-
- if(!isliving(user) || user.stat || user.restrained() || user.lying)
+/obj/item/instrument/ui_interact(mob/living/user)
+ if(!isliving(user) || user.stat || user.restrained() || !(user.mobility_flags & MOBILITY_STAND))
return
user.set_machine(src)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 2b553318c281..c22f17c52cf6 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -113,7 +113,7 @@
//chance to actually hit the eyes depends on internal component
if(prob(effectchance * diode.rating))
S.flash_act(affect_silicon = 1)
- S.Knockdown(rand(100,200))
+ S.Paralyze(rand(100,200))
to_chat(S, "Your sensors were overloaded by a laser!")
outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
else
@@ -133,7 +133,7 @@
for(var/mob/living/carbon/human/H in view(1,targloc))
if(!iscatperson(H) || H.incapacitated() || H.eye_blind )
continue
- if(!H.lying)
+ if(user.mobility_flags & MOBILITY_STAND)
H.setDir(get_dir(H,targloc)) // kitty always looks at the light
if(prob(effectchance))
H.visible_message("[H] makes a grab for the light!","LIGHT!")
@@ -149,8 +149,7 @@
if(prob(50))
C.visible_message("[C] pounces on the light!","LIGHT!")
C.Move(targloc)
- C.resting = TRUE
- C.update_canmove()
+ C.set_resting(TRUE, FALSE)
else
C.visible_message("[C] looks uninterested in your games.","You spot [user] shining [src] at you. How insulting!")
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index 2f8b111b4b58..975a53bb11a3 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -116,7 +116,7 @@
s.set_up(3, 1, L)
s.start()
- L.Knockdown(100)
+ L.Paralyze(100)
if(master)
master.receive_signal()
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 5a68a8423acf..73fc34e0f426 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -350,7 +350,7 @@ SLIME SCANNER
set name = "Switch Verbosity"
set category = "Object"
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.incapacitated())
return
mode = !mode
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 2c234a59ba2d..12a0b7db2892 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -44,7 +44,7 @@ effective or pretty fucking useless.
for(var/mob/living/carbon/human/M in urange(10, user, 1))
if(prob(50))
- M.Knockdown(rand(200,400))
+ M.Paralyze(rand(200,400))
to_chat(M, "You feel a tremendous, paralyzing wave flood your mind.")
else
diff --git a/code/game/objects/items/granters.dm b/code/game/objects/items/granters.dm
index 8d0d8d020edf..bf2f2fe25706 100644
--- a/code/game/objects/items/granters.dm
+++ b/code/game/objects/items/granters.dm
@@ -240,7 +240,7 @@
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
..()
to_chat(user,"You're knocked down!")
- user.Knockdown(40)
+ user.Paralyze(40)
/obj/item/book/granter/spell/barnyard
spell = /obj/effect/proc_holder/spell/targeted/barnyardcurse
diff --git a/code/game/objects/items/grenades/flashbang.dm b/code/game/objects/items/grenades/flashbang.dm
index e8b5704e413f..32054490180f 100644
--- a/code/game/objects/items/grenades/flashbang.dm
+++ b/code/game/objects/items/grenades/flashbang.dm
@@ -26,10 +26,10 @@
//Flash
if(M.flash_act(affect_silicon = 1))
- M.Knockdown(max(200/max(1,distance), 60))
+ M.Paralyze(max(200/max(1,distance), 60))
//Bang
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
- M.Knockdown(200)
+ M.Paralyze(200)
M.soundbang_act(1, 200, 10, 15)
else
diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm
index b92186a467dd..72d8467c7344 100644
--- a/code/game/objects/items/handcuffs.dm
+++ b/code/game/objects/items/handcuffs.dm
@@ -270,7 +270,7 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
snap = 1
- if(!C.lying)
+ if(C.mobility_flags & MOBILITY_STAND)
def_zone = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
if(!C.legcuffed && C.get_num_legs(FALSE) >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
C.legcuffed = src
@@ -340,7 +340,7 @@
C.update_inv_legcuffed()
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
to_chat(C, "\The [src] ensnares you!")
- C.Knockdown(knockdown)
+ C.Paralyze(knockdown)
/obj/item/restraints/legcuffs/bola/tactical//traitor variant
name = "reinforced bola"
diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm
index af6f96308c41..af9ee062c6a7 100644
--- a/code/game/objects/items/his_grace.dm
+++ b/code/game/objects/items/his_grace.dm
@@ -91,7 +91,7 @@
master.emote("scream")
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
item_flags &= ~NODROP
- master.Knockdown(60)
+ master.Paralyze(60)
master.adjustBruteLoss(master.maxHealth)
playsound(master, 'sound/effects/splat.ogg', 100, 0)
else
diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm
index 11ff00bdd0d3..6c5d7e57a27f 100644
--- a/code/game/objects/items/holy_weapons.dm
+++ b/code/game/objects/items/holy_weapons.dm
@@ -30,7 +30,9 @@
else
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
-/obj/item/holybeacon/proc/beacon_armor(mob/M)
+/obj/item/holybeacon/proc/beacon_armor(mob/living/M)
+ if(!istype(M))
+ return
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
var/list/display_names = list()
for(var/V in holy_armor_list)
@@ -38,7 +40,7 @@
display_names += list(initial(A.name) = A)
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
- if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || SSreligion.holy_armor_type)
+ if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !(M.mobility_flags & MOBILITY_USE) || SSreligion.holy_armor_type)
return
var/index = display_names.Find(choice)
@@ -207,7 +209,7 @@
display_names[initial(rodtype.name)] = rodtype
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
- if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
+ if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.incapacitated() || reskinned)
return
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
diff --git a/code/game/objects/items/hot_potato.dm b/code/game/objects/items/hot_potato.dm
index 4a6c37277f5f..4077105a5c79 100644
--- a/code/game/objects/items/hot_potato.dm
+++ b/code/game/objects/items/hot_potato.dm
@@ -74,6 +74,8 @@
L.SetStun(0)
L.SetKnockdown(0)
L.SetSleeping(0)
+ L.SetImmobilized(0)
+ L.SetParalyzed(0)
L.SetUnconscious(0)
L.reagents.add_reagent("muscle_stimulant", CLAMP(5 - L.reagents.get_reagent_amount("muscle_stimulant"), 0, 5)) //If you don't have legs or get bola'd, tough luck!
colorize(L)
diff --git a/code/game/objects/items/implants/implant_explosive.dm b/code/game/objects/items/implants/implant_explosive.dm
index 9556addc630c..2ec1e94a3fc9 100644
--- a/code/game/objects/items/implants/implant_explosive.dm
+++ b/code/game/objects/items/implants/implant_explosive.dm
@@ -71,7 +71,7 @@
sleep(delay*0.25)
if(imp_in && !imp_in.stat)
imp_in.visible_message("[imp_in] doubles over in pain!")
- imp_in.Knockdown(140)
+ imp_in.Paralyze(140)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay*0.25)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
diff --git a/code/game/objects/items/implants/implant_misc.dm b/code/game/objects/items/implants/implant_misc.dm
index 24ee6d09666a..6835461b1052 100644
--- a/code/game/objects/items/implants/implant_misc.dm
+++ b/code/game/objects/items/implants/implant_misc.dm
@@ -37,9 +37,11 @@
imp_in.SetStun(0)
imp_in.SetKnockdown(0)
imp_in.SetUnconscious(0)
+ imp_in.SetParalyzed(0)
+ imp_in.SetImmobilized(0)
imp_in.adjustStaminaLoss(-75)
- imp_in.lying = 0
- imp_in.update_canmove()
+ imp_in.set_resting(FALSE)
+ imp_in.update_mobility()
imp_in.reagents.add_reagent("synaptizine", 10)
imp_in.reagents.add_reagent("omnizine", 10)
diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm
index 36c79bd454c3..7b30e5d7b464 100644
--- a/code/game/objects/items/implants/implantchair.dm
+++ b/code/game/objects/items/implants/implantchair.dm
@@ -138,8 +138,12 @@
to_chat(user, "[src]'s door won't budge!")
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
+ if(user.stat || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_STAND))
+ return
close_machine(target)
/obj/machinery/implantchair/close_machine(mob/living/user)
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 1565c2f0968d..da8107f0d3f8 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -154,7 +154,7 @@
add_fingerprint(user)
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
to_chat(user, "You club yourself over the head.")
- user.Knockdown(60 * force)
+ user.Paralyze(60 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
@@ -180,7 +180,7 @@
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
- target.Knockdown(60)
+ target.Paralyze(60)
log_combat(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("[user] has knocked down [target] with [src]!", \
diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm
index dd36131d722c..d6f3a3394a6f 100644
--- a/code/game/objects/items/pneumaticCannon.dm
+++ b/code/game/objects/items/pneumaticCannon.dm
@@ -170,7 +170,7 @@
if(pressureSetting >= 3 && iscarbon(user))
var/mob/living/carbon/C = user
C.visible_message("[C] is thrown down by the force of the cannon!", "[src] slams into your shoulder, knocking you down!")
- C.Knockdown(60)
+ C.Paralyze(60)
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
if(fire_mode == PCANNON_FIREALL)
diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm
index a80aa1be602a..b6781eb3ad9d 100644
--- a/code/game/objects/items/religion.dm
+++ b/code/game/objects/items/religion.dm
@@ -66,6 +66,8 @@
H.adjustFireLoss(-15)
H.AdjustStun(-40)
H.AdjustKnockdown(-40)
+ H.AdjustImmobilized(-40)
+ H.AdjustParalyzed(-40)
H.AdjustUnconscious(-40)
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index d7f0b03837bd..c2651e786509 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -22,7 +22,7 @@
return
user.do_attack_animation(M)
- M.Knockdown(100)
+ M.Paralyze(100)
M.apply_effect(EFFECT_STUTTER, 5)
M.visible_message("[user] has prodded [M] with [src]!", \
@@ -76,15 +76,14 @@
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
else if(ishuman(M))
- if(M.lying)
+ if(!(user.mobility_flags & MOBILITY_STAND))
user.visible_message("[user] shakes [M] trying to get [M.p_them()] up!", \
"You shake [M] trying to get [M.p_them()] up!")
else
user.visible_message("[user] hugs [M] to make [M.p_them()] feel better!", \
"You hug [M] to make [M.p_them()] feel better!")
if(M.resting)
- M.resting = FALSE
- M.update_canmove()
+ M.set_resting(FALSE, TRUE)
else
user.visible_message("[user] pets [M]!", \
"You pet [M]!")
@@ -92,7 +91,7 @@
if(1)
if(M.health >= 0)
if(ishuman(M))
- if(M.lying)
+ if(!(M.mobility_flags & MOBILITY_STAND))
user.visible_message("[user] shakes [M] trying to get [M.p_them()] up!", \
"You shake [M] trying to get [M.p_them()] up!")
else if(user.zone_selected == BODY_ZONE_HEAD)
@@ -103,8 +102,7 @@
user.visible_message("[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...", \
"You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...")
if(M.resting)
- M.resting = FALSE
- M.update_canmove()
+ M.set_resting(FALSE, TRUE)
else
user.visible_message("[user] bops [M] on the head!", \
"You bop [M] on the head!")
@@ -116,7 +114,7 @@
M.electrocute_act(5, "[user]", safety = 1)
user.visible_message("[user] electrocutes [M] with [user.p_their()] touch!", \
"You electrocute [M] with your touch!")
- M.update_canmove()
+ M.update_mobility()
else
if(!iscyborg(M))
M.adjustFireLoss(10)
@@ -330,7 +328,7 @@
C.stuttering += 10
C.Jitter(10)
if(2)
- C.Knockdown(40)
+ C.Paralyze(40)
C.confused += 10
C.stuttering += 15
C.Jitter(25)
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 63ac8009a226..0e11522b6b3b 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -317,8 +317,8 @@
O.robot_suit = src
if(!locomotion)
- O.lockcharge = 1
- O.update_canmove()
+ O.lockcharge = TRUE
+ O.update_mobility()
to_chat(O, "Error: Servo motors unresponsive.")
else
@@ -357,7 +357,7 @@
O.robot_suit = src
if(!locomotion)
O.lockcharge = TRUE
- O.update_canmove()
+ O.update_mobility()
else if(istype(W, /obj/item/pen))
to_chat(user, "You need to use a multitool to name [src]!")
diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm
index 5372efcb5fe9..262d3a486e27 100644
--- a/code/game/objects/items/storage/bags.dm
+++ b/code/game/objects/items/storage/bags.dm
@@ -204,7 +204,7 @@
set name = "Activate Seed Extraction"
set category = "Object"
set desc = "Activate to convert your plants into plantable seeds."
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.incapacitated())
return
for(var/obj/item/O in contents)
seedify(O, 1)
@@ -310,7 +310,7 @@
if(ishuman(M) || ismonkey(M))
if(prob(10))
- M.Knockdown(40)
+ M.Paralyze(40)
update_icon()
/obj/item/storage/bag/tray/update_icon()
diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm
index 6bb7a87b29ba..3e57b2d51b3a 100644
--- a/code/game/objects/items/stunbaton.dm
+++ b/code/game/objects/items/stunbaton.dm
@@ -115,7 +115,7 @@
if(status && user.has_trait(TRAIT_CLUMSY) && prob(50))
user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \
"You accidentally hit yourself with [src]!")
- user.Knockdown(stunforce*3)
+ user.Paralyze(stunforce*3)
deductcharge(hitcost)
return
@@ -157,7 +157,7 @@
if(!deductcharge(hitcost))
return 0
- L.Knockdown(stunforce)
+ L.Paralyze(stunforce)
L.apply_effect(EFFECT_STUTTER, stunforce)
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
if(user)
diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm
index fd9972f42745..b218777cd2ba 100644
--- a/code/game/objects/items/teleprod.dm
+++ b/code/game/objects/items/teleprod.dm
@@ -13,11 +13,11 @@
"You accidentally hit yourself with [src]!")
if(do_teleport(user, get_turf(user), 50))//honk honk
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
- user.Knockdown(stunforce*3)
+ user.Paralyze(stunforce*3)
deductcharge(hitcost)
else
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
- user.Knockdown(stunforce*3)
+ user.Paralyze(stunforce*3)
deductcharge(hitcost/4)
return
else
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index be3e6bd0e231..2f8dabffe501 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -677,8 +677,10 @@
//ATTACK HAND IGNORING PARENT RETURN VALUE
//ATTACK HAND NOT CALLING PARENT
/obj/item/toy/cards/deck/attack_hand(mob/user)
- if(user.lying)
- return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_PICKUP))
+ return
var/choice = null
if(cards.len == 0)
to_chat(user, "There are no more cards to draw!")
@@ -745,7 +747,7 @@
/obj/item/toy/cards/deck/MouseDrop(atom/over_object)
. = ..()
var/mob/living/M = usr
- if(!istype(M) || usr.incapacitated() || usr.lying)
+ if(!istype(M) || !(M.mobility_flags & MOBILITY_PICKUP))
return
if(Adjacent(usr))
if(over_object == M && loc != M)
@@ -791,9 +793,11 @@
/obj/item/toy/cards/cardhand/Topic(href, href_list)
if(..())
return
- if(usr.stat || !ishuman(usr) || !usr.canmove)
+ if(usr.stat || !ishuman(usr))
return
var/mob/living/carbon/human/cardUser = usr
+ if(!(cardUser.mobility_flags & MOBILITY_USE))
+ return
var/O = src
if(href_list["pick"])
if (cardUser.is_holding(src))
@@ -932,8 +936,8 @@
else
return ..()
-/obj/item/toy/cards/singlecard/attack_self(mob/user)
- if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
+/obj/item/toy/cards/singlecard/attack_self(mob/living/carbon/human/user)
+ if(!ishuman(user) || !(user.mobility_flags & MOBILITY_USE))
return
Flip()
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 68c4ffeee877..e3c855db539e 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -32,7 +32,7 @@
if(structureclimber && structureclimber != user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
- structureclimber.Knockdown(40)
+ structureclimber.Paralyze(40)
structureclimber.visible_message("[structureclimber] has been knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].")
/obj/structure/ui_act(action, params)
@@ -44,7 +44,8 @@
if(!climbable)
return
if(user == O && iscarbon(O))
- if(user.canmove)
+ var/mob/living/carbon/C = O
+ if(C.mobility_flags & MOBILITY_MOVE)
climb_structure(user)
return
if(!istype(O, /obj/item) || user.get_active_held_item() != O)
diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm
index 8f82140233b8..a3b8fd0551e1 100644
--- a/code/game/objects/structures/beds_chairs/chair.dm
+++ b/code/game/objects/structures/beds_chairs/chair.dm
@@ -324,7 +324,7 @@
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.health < C.maxHealth*0.5)
- C.Knockdown(20)
+ C.Paralyze(20)
smash(user)
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 8b6f518f3e9a..a23ce32842d4 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -337,8 +337,10 @@ LINEN BINS
. = ..()
if(.)
return
- if(user.lying)
- return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_PICKUP))
+ return
if(amount >= 1)
amount--
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index c3cdd98d2772..ce4edd85a684 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -280,7 +280,7 @@
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
if(!istype(O) || O.anchored || istype(O, /obj/screen))
return
- if(!istype(user) || user.incapacitated() || user.lying)
+ if(!istype(user) || user.incapacitated() || !(user.mobility_flags & MOBILITY_STAND))
return
if(!Adjacent(user) || !user.Adjacent(O))
return
@@ -309,7 +309,7 @@
"You hear a loud metal bang.")
var/mob/living/L = O
if(!issilicon(L))
- L.Knockdown(40)
+ L.Paralyze(40)
O.forceMove(T)
close()
else
@@ -326,11 +326,11 @@
return
container_resist(user)
-/obj/structure/closet/attack_hand(mob/user)
+/obj/structure/closet/attack_hand(mob/living/user)
. = ..()
if(.)
return
- if(user.lying && get_dist(src, user) > 0)
+ if(!(user.mobility_flags & MOBILITY_STAND) && get_dist(src, user) > 0)
return
if(!toggle(user))
@@ -352,7 +352,7 @@
set category = "Object"
set name = "Toggle Open"
- if(!usr.canmove || usr.stat || usr.restrained())
+ if(!usr.incapacitated())
return
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
index 4726707996ab..d4b64c86d63f 100644
--- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
+++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
@@ -17,8 +17,8 @@
var/move_delay = FALSE
var/egged = 0
-/obj/structure/closet/cardboard/relaymove(mob/user, direction)
- if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc))
+/obj/structure/closet/cardboard/relaymove(mob/living/user, direction)
+ if(!istype(user) || opened || move_delay || user.incapacitated() || !isturf(loc) || !has_gravity(loc))
return
move_delay = TRUE
if(step(src, direction))
diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm
index bb56b6313645..e4573320785c 100644
--- a/code/game/objects/structures/kitchen_spike.dm
+++ b/code/game/objects/structures/kitchen_spike.dm
@@ -132,7 +132,7 @@
src.visible_message(text("[M] falls free of [src]!"))
unbuckle_mob(M,force=1)
M.emote("scream")
- M.AdjustKnockdown(20)
+ M.AdjustParalyzed(20)
/obj/structure/kitchenspike/Destroy()
if(has_buckled_mobs())
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 5ff3e91d6c99..ac82c101f75b 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -343,8 +343,12 @@ GLOBAL_LIST_EMPTY(crematoriums)
var/mob/M = O
if(M.buckled)
return
- if(!ismob(user) || user.lying || user.incapacitated())
+ if(!ismob(user) || user.incapacitated())
return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_STAND))
+ return
O.forceMove(src.loc)
if (user != O)
visible_message("[user] stuffs [O] into [src].")
diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm
index 815dd9de6d16..1db20b8c95be 100644
--- a/code/game/objects/structures/petrified_statue.dm
+++ b/code/game/objects/structures/petrified_statue.dm
@@ -49,7 +49,7 @@
if(S.mind)
if(petrified_mob)
S.mind.transfer_to(petrified_mob)
- petrified_mob.Knockdown(100)
+ petrified_mob.Paralyze(100)
to_chat(petrified_mob, "You slowly come back to your senses. You are in control of yourself again!")
qdel(S)
diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm
index e3862ed92466..d4dbe82acdab 100644
--- a/code/game/objects/structures/plasticflaps.dm
+++ b/code/game/objects/structures/plasticflaps.dm
@@ -87,7 +87,7 @@
return 1
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return 1
- if(!M.lying && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
+ if((M.mobility_flags & MOBILITY_STAND) && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
return 0
return ..()
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 192e0265df37..3073f0e3b767 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -117,9 +117,8 @@
. = . || (mover.pass_flags & PASSTABLE)
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
- pushed_mob.forceMove(src.loc)
- pushed_mob.resting = TRUE
- pushed_mob.update_canmove()
+ pushed_mob.forceMove(loc)
+ pushed_mob.set_resting(TRUE, TRUE)
pushed_mob.visible_message("[user] places [pushed_mob] onto [src].", \
"[user] places [pushed_mob] onto [src].")
log_combat(user, pushed_mob, "placed")
@@ -134,7 +133,7 @@
pushed_mob.pass_flags &= ~PASSTABLE
if(pushed_mob.loc != loc) //Something prevented the tabling
return
- pushed_mob.Knockdown(40)
+ pushed_mob.Paralyze(40)
pushed_mob.visible_message("[user] pushes [pushed_mob] onto [src].", \
"[user] pushes [pushed_mob] onto [src].")
log_combat(user, pushed_mob, "pushed")
@@ -246,7 +245,7 @@
debris -= AM
if(istype(AM, /obj/item/shard))
AM.throw_impact(L)
- L.Knockdown(100)
+ L.Paralyze(100)
qdel(src)
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
@@ -443,23 +442,20 @@
break
/obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob)
- pushed_mob.forceMove(src.loc)
- pushed_mob.resting = 1
- pushed_mob.update_canmove()
+ pushed_mob.forceMove(loc)
+ pushed_mob.set_resting(TRUE, TRUE)
visible_message("[user] has laid [pushed_mob] on [src].")
check_patient()
/obj/structure/table/optable/proc/check_patient()
- var/mob/M = locate(/mob/living/carbon/human, loc)
+ var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, loc)
if(M)
if(M.resting)
patient = M
- return 1
+ return TRUE
else
patient = null
- return 0
-
-
+ return FALSE
/*
* Racks
@@ -519,7 +515,7 @@
. = ..()
if(.)
return
- if(user.IsKnockdown() || user.resting || user.lying || user.get_num_legs() < 2)
+ if(!(user.mobility_flags & MOBILITY_STAND) || user.get_num_legs() < 2)
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm
index 99070fc86765..e6f4bf7c2c90 100644
--- a/code/game/objects/structures/transit_tubes/station.dm
+++ b/code/game/objects/structures/transit_tubes/station.dm
@@ -44,8 +44,10 @@
//pod insertion
/obj/structure/transit_tube/station/MouseDrop_T(obj/structure/c_transit_tube_pod/R, mob/user)
- if(!user.canmove || user.stat || user.restrained())
- return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(L.incapacitated())
+ return
if (!istype(R) || get_dist(user, src) > 1 || get_dist(src,R) > 1)
return
for(var/obj/structure/transit_tube_pod/pod in loc)
@@ -74,7 +76,7 @@
pod.visible_message("[user] starts putting [GM] into the [pod]!")
if(do_after(user, 15, target = src))
if(open_status == STATION_TUBE_OPEN && GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
- GM.Knockdown(100)
+ GM.Paralyze(100)
src.Bumped(GM)
break
else
diff --git a/code/game/objects/structures/traps.dm b/code/game/objects/structures/traps.dm
index 34f8c05c4f4b..414f7efeef03 100644
--- a/code/game/objects/structures/traps.dm
+++ b/code/game/objects/structures/traps.dm
@@ -81,7 +81,7 @@
/obj/structure/trap/stun/trap_effect(mob/living/L)
L.electrocute_act(30, src, safety=1) // electrocute act does a message.
- L.Knockdown(100)
+ L.Paralyze(100)
/obj/structure/trap/fire
name = "flame trap"
@@ -90,7 +90,7 @@
/obj/structure/trap/fire/trap_effect(mob/living/L)
to_chat(L, "Spontaneous combustion!")
- L.Knockdown(20)
+ L.Paralyze(20)
/obj/structure/trap/fire/flare()
..()
@@ -104,7 +104,7 @@
/obj/structure/trap/chill/trap_effect(mob/living/L)
to_chat(L, "You're frozen solid!")
- L.Knockdown(20)
+ L.Paralyze(20)
L.adjust_bodytemperature(-300)
L.apply_status_effect(/datum/status_effect/freon)
@@ -117,7 +117,7 @@
/obj/structure/trap/damage/trap_effect(mob/living/L)
to_chat(L, "The ground quakes beneath your feet!")
- L.Knockdown(100)
+ L.Paralyze(100)
L.adjustBruteLoss(35)
/obj/structure/trap/damage/flare()
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 851e00547e79..19c477b86ef2 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -521,7 +521,7 @@
if(B.cell.charge > 0 && B.status == 1)
flick("baton_active", src)
var/stunforce = B.stunforce
- user.Knockdown(stunforce)
+ user.Paralyze(stunforce)
user.stuttering = stunforce/20
B.deductcharge(B.hitcost)
user.visible_message("[user] shocks [user.p_them()]self while attempting to wash the active [B.name]!", \
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index a957866ebc12..bd5688038444 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -343,9 +343,14 @@
set name = "Flip Windoor Assembly"
set category = "Object"
set src in oview(1)
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.stat || usr.restrained())
return
+ if(isliving(usr))
+ var/mob/living/L = usr
+ if(!(L.mobility_flags & MOBILITY_USE))
+ return
+
if(facing == "l")
to_chat(usr, "The windoor will now slide to the right.")
facing = "r"
diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm
index d149079995e6..cd6ab03a660e 100644
--- a/code/game/turfs/open.dm
+++ b/code/game/turfs/open.dm
@@ -218,7 +218,7 @@
if(!(lube&GALOSHES_DONT_HELP)) //can't slip while buckled unless it's lube.
return 0
else
- if(C.lying || !(C.status_flags & CANKNOCKDOWN)) // can't slip unbuckled mob if they're lying or can't fall.
+ if(!(C.mobility_flags & MOBILITY_STAND) || !(C.status_flags & CANKNOCKDOWN)) // can't slip unbuckled mob if they're lying or can't fall.
return 0
if(C.m_intent == MOVE_INTENT_WALK && (lube&NO_SLIP_WHEN_WALKING))
return 0
@@ -233,7 +233,7 @@
var/olddir = C.dir
C.moving_diagonally = 0 //If this was part of diagonal move slipping will stop it.
if(!(lube & SLIDE_ICE))
- C.Knockdown(knockdown_amount)
+ C.Paralyze(knockdown_amount)
C.stop_pulling()
else
C.Stun(20)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index afe275f9b9fd..673125593c71 100755
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -426,7 +426,9 @@
return
/turf/handle_fall(mob/faller, forced)
- faller.lying = pick(90, 270)
+ if(isliving(faller))
+ var/mob/living/L = faller
+ L.lying = pick(90, 270)
if(!forced)
return
if(has_gravity(src))
diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm
index eed6f9b3ae26..dbb446b46a62 100644
--- a/code/modules/VR/vr_sleeper.dm
+++ b/code/modules/VR/vr_sleeper.dm
@@ -72,9 +72,15 @@
SStgui.close_user_uis(occupant, src)
..()
-/obj/machinery/vr_sleeper/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+/obj/machinery/vr_sleeper/MouseDrop_T(mob/target, mob/living/user)
+ if(!istype(user))
return
+ if(user.stat || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_STAND))
+ return
close_machine(target)
/obj/machinery/vr_sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
diff --git a/code/modules/admin/verbs/bluespacearty.dm b/code/modules/admin/verbs/bluespacearty.dm
index 97248b572b69..5b4b7db663e8 100644
--- a/code/modules/admin/verbs/bluespacearty.dm
+++ b/code/modules/admin/verbs/bluespacearty.dm
@@ -21,6 +21,6 @@
target.gib(1, 1)
else
target.adjustBruteLoss(min(99,(target.health - 1)))
- target.Knockdown(400)
+ target.Paralyze(400)
target.stuttering = 20
diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
index 9ac618436e0f..2d2fdbb8f937 100644
--- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm
+++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
@@ -112,6 +112,8 @@
M.SetUnconscious(0)
M.SetStun(0)
M.SetKnockdown(0)
+ M.SetImmobilized(0)
+ M.SetParalyzed(0)
combat_cooldown = 0
START_PROCESSING(SSobj, src)
@@ -503,7 +505,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
L.lastattacker = user.real_name
L.lastattackerckey = user.ckey
- L.Knockdown(140)
+ L.Paralyze(140)
L.apply_effect(EFFECT_STUTTER, 7)
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm
index 10581e7bbb1a..e6c69d27ed42 100644
--- a/code/modules/antagonists/abductor/machinery/experiment.dm
+++ b/code/modules/antagonists/abductor/machinery/experiment.dm
@@ -15,7 +15,8 @@
var/breakout_time = 450
/obj/machinery/abductor/experiment/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !ishuman(target))
+ var/mob/living/L = user
+ if(user.stat || (isliving(user) && (!(L.mobility_flags & MOBILITY_STAND) || !(L.mobility_flags & MOBILITY_UI))) || !Adjacent(user) || !target.Adjacent(user) || !ishuman(target))
return
if(isabductor(target))
return
diff --git a/code/modules/antagonists/changeling/powers/adrenaline.dm b/code/modules/antagonists/changeling/powers/adrenaline.dm
index 5c8172ac6320..a9e7269a87e9 100644
--- a/code/modules/antagonists/changeling/powers/adrenaline.dm
+++ b/code/modules/antagonists/changeling/powers/adrenaline.dm
@@ -9,11 +9,13 @@
//Recover from stuns.
/obj/effect/proc_holder/changeling/adrenaline/sting_action(mob/living/user)
- to_chat(user, "Energy rushes through us.[user.lying ? " We arise." : ""]")
+ to_chat(user, "Energy rushes through us.[(!(user.mobility_flags & MOBILITY_STAND)) ? " We arise." : ""]")
user.SetSleeping(0)
user.SetUnconscious(0)
user.SetStun(0)
user.SetKnockdown(0)
+ user.SetImmobilized(0)
+ user.SetParalyzed(0)
//user.reagents.add_reagent("changelingadrenaline", 10) //yogs - lings no longer get prolonged anti-stun reagents
user.reagents.add_reagent("changelinghaste", 2) //For a really quick burst of speed
user.adjustStaminaLoss(-75)
diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm
index 753d858cef89..ee4dd3bcaad9 100644
--- a/code/modules/antagonists/changeling/powers/fakedeath.dm
+++ b/code/modules/antagonists/changeling/powers/fakedeath.dm
@@ -15,7 +15,7 @@
user.tod = station_time_timestamp()
user.fakedeath("changeling") //play dead
user.update_stat()
- user.update_canmove()
+ user.update_mobility()
addtimer(CALLBACK(src, .proc/ready_to_regenerate, user), LING_FAKEDEATH_TIME, TIMER_UNIQUE)
return TRUE
diff --git a/code/modules/antagonists/changeling/powers/headcrab.dm b/code/modules/antagonists/changeling/powers/headcrab.dm
index 70edf1e78858..67818b77da8c 100644
--- a/code/modules/antagonists/changeling/powers/headcrab.dm
+++ b/code/modules/antagonists/changeling/powers/headcrab.dm
@@ -25,7 +25,7 @@
H.confused += 3
for(var/mob/living/silicon/S in range(2,user))
to_chat(S, "Your sensors are disabled by a shower of blood!")
- S.Knockdown(60)
+ S.Paralyze(60)
var/turf = get_turf(user)
user.gib()
. = TRUE
diff --git a/code/modules/antagonists/changeling/powers/shriek.dm b/code/modules/antagonists/changeling/powers/shriek.dm
index 667dc06daf13..51671ff007ac 100644
--- a/code/modules/antagonists/changeling/powers/shriek.dm
+++ b/code/modules/antagonists/changeling/powers/shriek.dm
@@ -20,7 +20,7 @@
if(issilicon(M))
SEND_SOUND(M, sound('sound/weapons/flash.ogg'))
- M.Knockdown(rand(100,200))
+ M.Paralyze(rand(100,200))
for(var/obj/machinery/light/L in range(4, user))
L.on = 1
diff --git a/code/modules/antagonists/changeling/powers/strained_muscles.dm b/code/modules/antagonists/changeling/powers/strained_muscles.dm
index 832f6073b609..1e10a011e716 100644
--- a/code/modules/antagonists/changeling/powers/strained_muscles.dm
+++ b/code/modules/antagonists/changeling/powers/strained_muscles.dm
@@ -20,7 +20,7 @@
to_chat(user, "Our muscles relax.")
if(stacks >= 10)
to_chat(user, "We collapse in exhaustion.")
- user.Knockdown(60)
+ user.Paralyze(60)
user.emote("gasp")
INVOKE_ASYNC(src, .proc/muscle_loop, user)
@@ -33,7 +33,7 @@
if(user.stat != CONSCIOUS || user.staminaloss >= 90)
active = !active
to_chat(user, "Our muscles relax without the energy to strengthen them.")
- user.Knockdown(40)
+ user.Paralyze(40)
user.remove_trait(TRAIT_GOTTAGOFAST, "changeling_muscles")
break
diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
index 99f20ceaa7ee..9b221f407a7c 100644
--- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
@@ -80,7 +80,7 @@
if(iscultist(L))
to_chat(L, "\"Watch your step, wretch.\"")
L.adjustBruteLoss(10)
- L.Knockdown(80, FALSE)
+ L.Paralyze(80, FALSE)
L.visible_message("[src] appears around [L] in a burst of light!", \
"[target_flashed ? "An unseen force":"The glowing sigil around you"] holds you in place!")
L.Stun(40)
@@ -147,7 +147,7 @@
if(iscarbon(L))
var/mob/living/carbon/M = L
M.uncuff()
- L.Knockdown(50) //Completely defenseless for five seconds - mainly to give them time to read over the information they've just been presented with
+ L.Paralyze(50) //Completely defenseless for five seconds - mainly to give them time to read over the information they've just been presented with
if(iscarbon(L))
var/mob/living/carbon/C = L
C.silent += 5
diff --git a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
index ad83d5f4d202..f079877505ee 100644
--- a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
+++ b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
@@ -194,7 +194,7 @@
else
L.visible_message("[L]'s eyes blaze with brilliant light!", \
"Your vision suddenly screams with white-hot light!")
- L.Knockdown(15)
+ L.Paralyze(15)
L.apply_status_effect(STATUS_EFFECT_KINDLE)
L.flash_act(1, 1)
if(iscultist(L))
diff --git a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
index 3ad668472520..06529f690d77 100644
--- a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
+++ b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
@@ -57,9 +57,9 @@
else if(!..())
if(!L.anti_magic_check())
if(issilicon(L) || iscultist(L))
- L.Knockdown(100)
+ L.Paralyze(100)
else
- L.Knockdown(40)
+ L.Paralyze(40)
GLOB.clockwork_vitality += L.adjustFireLoss(bonus_burn * 3) //normally a total of 40 damage, 70 with ratvar
break_spear(T)
else
diff --git a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm
index f44f67e9cb60..554384b3d30e 100644
--- a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm
+++ b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm
@@ -176,7 +176,7 @@
var/datum/status_effect/belligerent/B = C.apply_status_effect(STATUS_EFFECT_BELLIGERENT)
if(!QDELETED(B))
B.duration = world.time + 30
- C.Knockdown(5) //knocks down for half a second if affected
+ C.Paralyze(5) //knocks down for half a second if affected
sleep(!GLOB.ratvar_approaches ? 16 : 10)
name = "judicial blast"
layer = ABOVE_ALL_MOB_LAYER
@@ -196,7 +196,7 @@
L.visible_message("Strange energy flows into [L]'s [I.name]!", \
"Your [I.name] shields you from [src]!")
continue
- L.Knockdown(15) //knocks down briefly when exploding
+ L.Paralyze(15) //knocks down briefly when exploding
if(!iscultist(L))
L.visible_message("[L] is struck by a judicial explosion!", \
"[!issilicon(L) ? "An unseen force slams you into the ground!" : "ERROR: Motor servos disabled by external source!"]")
diff --git a/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm b/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm
index f6df9efbbe30..1772de0c856e 100644
--- a/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm
@@ -112,7 +112,7 @@
continue
if(is_servant_of_ratvar(L) || (L.has_trait(TRAIT_BLIND)) || L.anti_magic_check(TRUE, TRUE))
continue
- if(L.stat || L.lying)
+ if(L.stat || !(L.mobility_flags & MOBILITY_STAND))
continue
if (iscarbon(L))
var/mob/living/carbon/c = L
diff --git a/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm b/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm
index 10c68b606f2b..5c323b2dda55 100644
--- a/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm
@@ -57,5 +57,5 @@
L.confused = min(L.confused + 15, 50)
L.dizziness = min(L.dizziness + 15, 50)
if(L.confused >= 25)
- L.Knockdown(FLOOR(L.confused * 0.8, 1))
+ L.Paralyze(FLOOR(L.confused * 0.8, 1))
take_damage(max_integrity)
diff --git a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm
index 94f0ba711215..0190ed52c602 100644
--- a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm
@@ -18,7 +18,7 @@
/obj/structure/destructible/clockwork/trap/trigger/pressure_sensor/Crossed(atom/movable/AM)
if(isliving(AM) && !is_servant_of_ratvar(AM))
var/mob/living/L = AM
- if(L.stat || L.m_intent == MOVE_INTENT_WALK || L.lying)
+ if(L.stat || L.m_intent == MOVE_INTENT_WALK || !(L.mobility_flags & MOBILITY_STAND))
return
audible_message("*click*")
playsound(src, 'sound/items/screwdriver2.ogg', 50, TRUE)
diff --git a/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm b/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm
index 631222844749..4ae8f52fe512 100644
--- a/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm
@@ -22,7 +22,7 @@
if(buckled_mobs && LAZYLEN(buckled_mobs))
var/mob/living/L = buckled_mobs[1]
if(iscarbon(L))
- L.Knockdown(100)
+ L.Paralyze(100)
L.visible_message("[L] is maimed as the skewer shatters while still in [L.p_their()] body!")
L.adjustBruteLoss(15)
unbuckle_mob(L)
@@ -110,6 +110,6 @@
return
skewee.visible_message("[skewee] comes free of [src] with a squelching pop!", \
"You come free of [src]!")
- skewee.Knockdown(30)
+ skewee.Paralyze(30)
playsound(skewee, 'sound/misc/desceration-03.ogg', 50, TRUE)
unbuckle_mob(skewee)
diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm
index 50e61f3909c6..63e1e49c02a7 100644
--- a/code/modules/antagonists/cult/blood_magic.dm
+++ b/code/modules/antagonists/cult/blood_magic.dm
@@ -433,7 +433,7 @@
"A feeling of warmth washes over you, rays of holy light surround your body and protect you from the flash of light!")
else
to_chat(user, "In an brilliant flash of red, [L] falls to the ground!")
- L.Knockdown(160)
+ L.Paralyze(160)
L.flash_act(1,1)
if(issilicon(target))
var/mob/living/silicon/S = L
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index 97604ccfdbf2..6bf9129b59b9 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -49,7 +49,7 @@
/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user)
if(!iscultist(user))
- user.Knockdown(100)
+ user.Paralyze(100)
user.dropItemToGround(src, TRUE)
user.visible_message("A powerful force shoves [user] away from [target]!", \
"\"You shouldn't play with sharp things. You'll poke someone's eye out.\"")
@@ -143,7 +143,7 @@
user.emote("scream")
user.apply_damage(30, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
user.dropItemToGround(src, TRUE)
- user.Knockdown(50)
+ user.Paralyze(50)
return
force = initial(force)
jaunt.Grant(user, src)
@@ -395,7 +395,7 @@
to_chat(user, "An overwhelming sense of nausea overpowers you!")
user.dropItemToGround(src, TRUE)
user.Dizzy(30)
- user.Knockdown(100)
+ user.Paralyze(100)
else
to_chat(user, "\"Trying to use things you don't own is bad, you know.\"")
to_chat(user, "The armor squeezes at your body!")
@@ -447,7 +447,7 @@
to_chat(user, "An overwhelming sense of nausea overpowers you!")
user.dropItemToGround(src, TRUE)
user.Dizzy(30)
- user.Knockdown(100)
+ user.Paralyze(100)
else
to_chat(user, "\"Trying to use things you don't own is bad, you know.\"")
to_chat(user, "The robes squeeze at your body!")
@@ -468,7 +468,7 @@
to_chat(user, "\"You want to be blind, do you?\"")
user.dropItemToGround(src, TRUE)
user.Dizzy(30)
- user.Knockdown(100)
+ user.Paralyze(100)
user.blind_eyes(30)
/obj/item/reagent_containers/glass/beaker/unholywater
@@ -489,7 +489,7 @@
/obj/item/shuttle_curse/attack_self(mob/living/user)
if(!iscultist(user))
user.dropItemToGround(src, TRUE)
- user.Knockdown(100)
+ user.Paralyze(100)
to_chat(user, "A powerful force shoves you away from [src]!")
return
if(curselimit > 1)
@@ -686,9 +686,9 @@
else if(!..())
if(!L.anti_magic_check())
if(is_servant_of_ratvar(L))
- L.Knockdown(100)
+ L.Paralyze(100)
else
- L.Knockdown(50)
+ L.Paralyze(50)
break_spear(T)
else
..()
@@ -820,7 +820,7 @@
INVOKE_ASYNC(src, .proc/pewpew, user, params)
var/obj/structure/emergency_shield/invoker/N = new(user.loc)
if(do_after(user, 90, target = user))
- user.Knockdown(40)
+ user.Paralyze(40)
to_chat(user, "You have exhausted the power of this spell!")
firing = FALSE
if(N)
@@ -885,7 +885,7 @@
else
var/mob/living/L = target
if(L.density)
- L.Knockdown(20)
+ L.Paralyze(20)
L.adjustBruteLoss(45)
playsound(L, 'sound/hallucinations/wail.ogg', 50, 1)
L.emote("scream")
@@ -921,7 +921,7 @@
T.visible_message("The sheer force from [P] shatters the mirror shield!")
new /obj/effect/temp_visual/cult/sparks(T)
playsound(T, 'sound/effects/glassbr3.ogg', 100)
- owner.Knockdown(25)
+ owner.Paralyze(25)
qdel(src)
return FALSE
if(P.is_reflectable)
@@ -978,9 +978,9 @@
else if(!..())
if(!L.anti_magic_check())
if(is_servant_of_ratvar(L))
- L.Knockdown(60)
+ L.Paralyze(60)
else
- L.Knockdown(30)
+ L.Paralyze(30)
if(D?.thrower)
for(var/mob/living/Next in orange(2, T))
if(!Next.density || iscultist(Next))
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index 8433c591ebbd..b546778f49ae 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -219,7 +219,7 @@ structure_check() searches for nearby cultist structures required for the invoca
L.visible_message("[L]'s eyes glow a defiant yellow!", \
"\"Stop resisting. You will be mi-\"\n\
\"Give up and you will feel pain unlike anything you've ever felt!\"")
- L.Knockdown(80)
+ L.Paralyze(80)
else if(is_convertable)
do_convert(L, invokers)
else
@@ -898,7 +898,7 @@ structure_check() searches for nearby cultist structures required for the invoca
if(affecting.key)
affecting.visible_message("[affecting] slowly relaxes, the glow around [affecting.p_them()] dimming.", \
"You are re-united with your physical form. [src] releases its hold over you.")
- affecting.Knockdown(40)
+ affecting.Paralyze(40)
break
if(affecting.health <= 10)
to_chat(G, "Your body can no longer sustain the connection!")
@@ -960,7 +960,7 @@ structure_check() searches for nearby cultist structures required for the invoca
playsound(T, 'sound/magic/enter_blood.ogg', 100, 1)
visible_message("A colossal shockwave of energy bursts from the rune, disintegrating it in the process!")
for(var/mob/living/L in range(src, 3))
- L.Knockdown(30)
+ L.Paralyze(30)
empulse(T, 0.42*(intensity), 1)
var/list/images = list()
var/zmatch = T.z
diff --git a/code/modules/antagonists/devil/devil_helpers.dm b/code/modules/antagonists/devil/devil_helpers.dm
index 4d0a781570c2..50e84213f4ad 100644
--- a/code/modules/antagonists/devil/devil_helpers.dm
+++ b/code/modules/antagonists/devil/devil_helpers.dm
@@ -32,7 +32,7 @@
if(BANE_HARVEST)
if(istype(weapon, /obj/item/reagent_containers/food/snacks/grown/))
visible_message("The spirits of the harvest aid in the exorcism.", "The harvest spirits are harming you.")
- Knockdown(40)
+ Paralyze(40)
qdel(weapon)
return 2
return 1
\ No newline at end of file
diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm
index 70ccc46e5f92..3d94af05c039 100644
--- a/code/modules/antagonists/devil/true_devil/_true_devil.dm
+++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm
@@ -172,7 +172,7 @@
log_combat(M, src, "attacked")
updatehealth()
if ("disarm")
- if (!lying && !ascended) //No stealing the arch devil's pitchfork.
+ if (!(mobility_flags & MOBILITY_STAND) && !ascended) //No stealing the arch devil's pitchfork.
if (prob(5))
Unconscious(40)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
diff --git a/code/modules/antagonists/revenant/revenant_blight.dm b/code/modules/antagonists/revenant/revenant_blight.dm
index 7037ecae8675..5b89da2e875d 100644
--- a/code/modules/antagonists/revenant/revenant_blight.dm
+++ b/code/modules/antagonists/revenant/revenant_blight.dm
@@ -26,7 +26,7 @@
/datum/disease/revblight/stage_act()
if(!finalstage)
- if(affected_mob.lying && prob(stage*6))
+ if(!(affected_mob.mobility_flags & MOBILITY_STAND) && prob(stage*6))
cure()
return
if(prob(stage*3))
diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm
index 19515ab4f146..b42eb3c4e1f3 100644
--- a/code/modules/antagonists/swarmer/swarmer.dm
+++ b/code/modules/antagonists/swarmer/swarmer.dm
@@ -585,7 +585,7 @@
playsound(loc,'sound/effects/snap.ogg',50, 1, -1)
L.electrocute_act(0, src, 1, 1, 1)
if(iscyborg(L))
- L.Knockdown(100)
+ L.Paralyze(100)
qdel(src)
..()
diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm
index 7cfefd5413c0..907bc7f9aee1 100644
--- a/code/modules/antagonists/wizard/equipment/artefact.dm
+++ b/code/modules/antagonists/wizard/equipment/artefact.dm
@@ -261,7 +261,7 @@
GiveHint(target)
else if(is_pointed(I))
to_chat(target, "You feel a stabbing pain in [parse_zone(user.zone_selected)]!")
- target.Knockdown(40)
+ target.Paralyze(40)
GiveHint(target)
else if(istype(I, /obj/item/bikehorn))
to_chat(target, "HONK")
@@ -380,7 +380,7 @@
/obj/item/warpwhistle/proc/end_effect(mob/living/carbon/user)
user.invisibility = initial(user.invisibility)
user.status_flags &= ~GODMODE
- user.canmove = TRUE
+ user.update_mobility()
/obj/item/warpwhistle/attack_self(mob/living/carbon/user)
if(!istype(user) || on_cooldown)
@@ -389,7 +389,7 @@
last_user = user
var/turf/T = get_turf(user)
playsound(T,'sound/magic/warpwhistle.ogg', 200, 1)
- user.canmove = FALSE
+ user.mobility_flags &= ~MOBILITY_MOVE
new /obj/effect/temp_visual/tornado(T)
sleep(20)
if(interrupted(user))
@@ -405,7 +405,7 @@
var/turf/potential_T = find_safe_turf()
if(T.z != potential_T.z || abs(get_dist_euclidian(potential_T,T)) > 50 - breakout)
user.forceMove(potential_T)
- user.canmove = 0
+ user.mobility_flags &= ~MOBILITY_MOVE
T = potential_T
break
breakout += 1
diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm
index 40551ae2fc78..1178d4ba3d0d 100644
--- a/code/modules/antagonists/wizard/equipment/soulstone.dm
+++ b/code/modules/antagonists/wizard/equipment/soulstone.dm
@@ -83,7 +83,7 @@
/obj/item/soulstone/proc/release_shades(mob/user)
for(var/mob/living/simple_animal/shade/A in src)
A.status_flags &= ~GODMODE
- A.canmove = TRUE
+ A.mobility_flags = MOBILITY_FLAGS_DEFAULT
A.forceMove(get_turf(user))
A.cancel_camera()
icon_state = "soulstone"
@@ -173,7 +173,7 @@
else
T.forceMove(src) //put shade in stone
T.status_flags |= GODMODE
- T.canmove = FALSE
+ T.mobility_flags = NONE
T.health = T.maxHealth
icon_state = "soulstone2"
name = "soulstone: Shade of [T.real_name]"
@@ -240,7 +240,7 @@
T.dust_animation()
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade(src)
S.status_flags |= GODMODE //So they won't die inside the stone somehow
- S.canmove = FALSE//Can't move out of the soul stone
+ S.mobility_flags = NONE //Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
S.key = T.key
diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm
index b653c3de7fde..f83d4a736700 100644
--- a/code/modules/assembly/flash.dm
+++ b/code/modules/assembly/flash.dm
@@ -125,7 +125,7 @@
to_chat(M, "[user] blinds you with the flash!")
else
to_chat(M, "You are blinded by [src]!")
- M.Knockdown(rand(80,120))
+ M.Paralyze(rand(80,120))
else if(user)
visible_message("[user] fails to blind [M] with the flash!")
to_chat(user, "You fail to blind [M] with the flash!")
@@ -147,7 +147,7 @@
var/mob/living/silicon/robot/R = M
log_combat(user, R, "flashed", src)
update_icon(1)
- R.Knockdown(rand(80,120))
+ R.Paralyze(rand(80,120))
var/diff = 5 * CONFUSION_STACK_MAX_MULTIPLIER - M.confused
R.confused += min(5, diff)
R.flash_act(affect_silicon = 1)
diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm
index 58a3a5349a1e..81f4e24142d3 100644
--- a/code/modules/assembly/mousetrap.dm
+++ b/code/modules/assembly/mousetrap.dm
@@ -48,7 +48,7 @@
if("feet")
if(!H.shoes)
affecting = H.get_bodypart(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
- H.Knockdown(60)
+ H.Paralyze(60)
if(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)
if(!H.gloves)
affecting = H.get_bodypart(type)
diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm
index 677beb7257d3..192b74b7b6ff 100644
--- a/code/modules/atmospherics/machinery/atmosmachinery.dm
+++ b/code/modules/atmospherics/machinery/atmosmachinery.dm
@@ -334,9 +334,7 @@ Pipelines + Other Objects -> Pipe network
user.forceMove(loc)
user.visible_message("You hear something squeezing through the ducts...","You climb out the ventilation system.")
- user.canmove = FALSE
- addtimer(VARSET_CALLBACK(user, canmove, TRUE), 1)
-
+ //PLACEHOLDER COMMENT FOR ME TO READD THE 1 (?) DS DELAY THAT WAS IMPLEMENTED WITH A... TIMER?
/obj/machinery/atmospherics/AltClick(mob/living/L)
if(istype(L) && is_type_in_list(src, GLOB.ventcrawl_machinery))
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index 3bcd4c20b2af..4d4fad8703ee 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -239,7 +239,7 @@
message_cooldown = world.time + 50
to_chat(user, "[src]'s door won't budge!")
-/obj/machinery/atmospherics/components/unary/cryo_cell/open_machine(drop = 0)
+/obj/machinery/atmospherics/components/unary/cryo_cell/open_machine(drop = FALSE)
if(!state_open && !panel_open)
on = FALSE
..()
@@ -247,7 +247,7 @@
M.forceMove(get_turf(src))
if(isliving(M))
var/mob/living/L = M
- L.update_canmove()
+ L.update_mobility()
occupant = null
update_icon()
@@ -280,10 +280,12 @@
to_chat(user, "[src] seems empty.")
/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user)
- if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ if(user.incapacitated() || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
return
- if (target.IsKnockdown() || target.IsStun() || target.IsSleeping() || target.IsUnconscious())
- close_machine(target)
+ if(isliving(target))
+ var/mob/living/L = target
+ if(L.incapacitated())
+ close_machine(target)
else
user.visible_message("[user] starts shoving [target] inside [src].", "You start shoving [target] inside [src].")
if (do_after(user, 25, target=target))
diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm
index 64d58cd40b58..14f6f3720311 100644
--- a/code/modules/client/verbs/suicide.dm
+++ b/code/modules/client/verbs/suicide.dm
@@ -219,10 +219,7 @@
/mob/living/carbon/canSuicide()
if(!..())
return
- if(IsStun() || IsKnockdown()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
- to_chat(src, "You can't commit suicide while stunned! ((You can type Ghost instead however.))")
- return
- if(restrained())
- to_chat(src, "You can't commit suicide while restrained! ((You can type Ghost instead however.))")
+ if(!(mobility_flags & MOBILITY_USE)) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
+ to_chat(src, "You can't commit suicide whilst immobile! ((You can type Ghost instead however.))")
return
return TRUE
diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm
index d0820304fef8..2298b01f0039 100644
--- a/code/modules/clothing/spacesuits/chronosuit.dm
+++ b/code/modules/clothing/spacesuits/chronosuit.dm
@@ -225,7 +225,7 @@
if(user.wear_suit == src)
if(hard_landing)
user.electrocute_act(35, src, safety = 1)
- user.Knockdown(200)
+ user.Paralyze(200)
if(!silent)
to_chat(user, "\nroot@ChronosuitMK4# chronowalk4 --stop\n")
if(camera)
diff --git a/code/modules/clothing/suits/reactive_armour.dm b/code/modules/clothing/suits/reactive_armour.dm
index 2bd24e21a2fc..5a15cd1089e0 100644
--- a/code/modules/clothing/suits/reactive_armour.dm
+++ b/code/modules/clothing/suits/reactive_armour.dm
@@ -224,7 +224,7 @@
return
owner.visible_message("The reactive teleport system flings [H] clear of [attack_text] and slams [H.p_them()] into a fabricated table!")
owner.visible_message("[H] GOES ON THE TABLE!!!")
- owner.Knockdown(40)
+ owner.Paralyze(40)
var/list/turfs = new/list()
for(var/turf/T in orange(tele_range, H))
if(T.density)
diff --git a/code/modules/fields/peaceborg_dampener.dm b/code/modules/fields/peaceborg_dampener.dm
index 79bd866fca20..47d7f096c968 100644
--- a/code/modules/fields/peaceborg_dampener.dm
+++ b/code/modules/fields/peaceborg_dampener.dm
@@ -42,7 +42,7 @@
if(R.has_buckled_mobs())
for(var/mob/living/L in R.buckled_mobs)
L.visible_message("[L] is knocked off of [R] by the charge in [R]'s chassis induced by [name]!") //I know it's bad.
- L.Knockdown(10)
+ L.Paralyze(10)
R.unbuckle_mob(L)
do_sparks(5, 0, L)
..()
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index e30bac4f4152..668f573f4bb3 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -216,7 +216,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
/obj/effect/hallucination/simple/xeno/throw_impact(A)
update_icon("alienh_pounce")
if(A == target && target.stat!=DEAD)
- target.Knockdown(100)
+ target.Paralyze(100)
target.visible_message("[target] flails around wildly.","[name] pounces on you!")
/datum/hallucination/xeno_attack
@@ -303,7 +303,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
shake_camera(target, 2, 1)
if(bubblegum.Adjacent(target) && !charged)
charged = TRUE
- target.Knockdown(80)
+ target.Paralyze(80)
target.adjustStaminaLoss(40)
step_away(target, bubblegum)
shake_camera(target, 4, 3)
@@ -1097,7 +1097,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
/obj/effect/hallucination/danger/chasm/Crossed(atom/movable/AM)
if(AM == target)
to_chat(target, "You fall into the chasm!")
- target.Knockdown(40)
+ target.Paralyze(40)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, target, "It's surprisingly shallow."), 15)
QDEL_IN(src, 30)
@@ -1131,7 +1131,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
set waitfor = FALSE
..()
target.set_screwyhud(SCREWYHUD_DEAD)
- target.Knockdown(300)
+ target.Paralyze(300)
target.silent += 10
to_chat(target, "[target.real_name] has died at [get_area_name(target)].")
if(prob(50))
@@ -1149,7 +1149,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
"i[prob(50)?" fucking":""] hate [pick("blood cult", "clock cult", "revenants", "this round","this","myself","admins","you")]")]\"")
sleep(rand(70,90))
target.set_screwyhud(SCREWYHUD_NONE)
- target.SetKnockdown(0)
+ target.SetParalyzed(0)
target.silent = FALSE
qdel(src)
@@ -1236,7 +1236,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
/datum/hallucination/shock/proc/shock_drop()
target.jitteriness = max(target.jitteriness - 990, 10) //Still jittery, but vastly less
- target.Knockdown(60)
+ target.Paralyze(60)
/datum/hallucination/husks
diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
index 878296f9bc75..b1c5f8b9707a 100644
--- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm
+++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
@@ -94,7 +94,7 @@
var/head_attack_message = ""
if(affecting == BODY_ZONE_HEAD && istype(target, /mob/living/carbon/))
head_attack_message = " on the head"
- //Knockdown the target for the duration that we calculated and divide it by 5.
+ //Paralyze the target for the duration that we calculated and divide it by 5.
if(armor_duration)
target.apply_effect(min(armor_duration, 200) , EFFECT_KNOCKDOWN) // Never knockdown more than a flash!
diff --git a/code/modules/food_and_drinks/food/snacks_pie.dm b/code/modules/food_and_drinks/food/snacks_pie.dm
index 04177783e62d..911fda1aafce 100644
--- a/code/modules/food_and_drinks/food/snacks_pie.dm
+++ b/code/modules/food_and_drinks/food/snacks_pie.dm
@@ -49,7 +49,7 @@
else
creamoverlay.icon_state = "creampie_human"
if(stunning)
- H.Knockdown(20) //splat!
+ H.Paralyze(20) //splat!
H.adjust_blurriness(1)
H.visible_message("[H] is creamed by [src]!", "You've been creamed by [src]!")
playsound(H, "desceration", 50, TRUE)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
index b4cec279c69f..5b30a4cf5d8f 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
@@ -149,6 +149,6 @@ God bless America.
reagents.reaction(C, TOUCH)
C.apply_damage(min(30, reagents.total_volume), BURN, BODY_ZONE_HEAD)
reagents.remove_any((reagents.total_volume/2))
- C.Knockdown(60)
+ C.Paralyze(60)
user.changeNext_move(CLICK_CD_MELEE)
return ..()
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index 3f917273b44c..9735c6873ebd 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -126,9 +126,12 @@
set category = "Object"
set name = "Eject Contents"
set src in oview(1)
-
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.stat || usr.restrained())
return
+ if(isliving(usr))
+ var/mob/living/L = usr
+ if(!(L.mobility_flags & MOBILITY_UI))
+ return
empty()
add_fingerprint(usr)
diff --git a/code/modules/games/cas.dm b/code/modules/games/cas.dm
index 9197e3d04453..df47998cb2bd 100644
--- a/code/modules/games/cas.dm
+++ b/code/modules/games/cas.dm
@@ -62,8 +62,10 @@
. = ..()
if(.)
return
- if(user.lying)
- return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_PICKUP))
+ return
if(cards.len == 0)
to_chat(user, "There are no more cards to draw!")
return
diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm
index 5c143f7a250d..29705b457fbf 100644
--- a/code/modules/holodeck/items.dm
+++ b/code/modules/holodeck/items.dm
@@ -87,7 +87,7 @@
playsound(src, 'sound/items/dodgeball.ogg', 50, 1)
M.apply_damage(10, STAMINA)
if(prob(5))
- M.Knockdown(60)
+ M.Paralyze(60)
visible_message("[M] is knocked right off [M.p_their()] feet!")
//
@@ -117,7 +117,7 @@
to_chat(user, "You need a better grip to do that!")
return
L.forceMove(loc)
- L.Knockdown(100)
+ L.Paralyze(100)
visible_message("[user] dunks [L] into \the [src]!")
user.stop_pulling()
else
diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm
index e3f8c254ac1d..f3f2736e29d8 100644
--- a/code/modules/hydroponics/grown/nettle.dm
+++ b/code/modules/hydroponics/grown/nettle.dm
@@ -98,7 +98,7 @@
/obj/item/reagent_containers/food/snacks/grown/nettle/death/pickup(mob/living/carbon/user)
if(..())
if(prob(50))
- user.Knockdown(100)
+ user.Paralyze(100)
to_chat(user, "You are stunned by the Deathnettle as you try picking it up!")
/obj/item/reagent_containers/food/snacks/grown/nettle/death/attack(mob/living/carbon/M, mob/user)
@@ -111,5 +111,5 @@
M.adjust_blurriness(force/7)
if(prob(20))
M.Unconscious(force / 0.3)
- M.Knockdown(force / 0.75)
+ M.Paralyze(force / 0.75)
M.drop_all_held_items()
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 2159ebbfa855..0b7e4176eaef 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -113,14 +113,16 @@
return ..()
-/obj/structure/bookcase/attack_hand(mob/user)
+/obj/structure/bookcase/attack_hand(mob/living/user)
. = ..()
if(.)
return
+ if(!istype(user))
+ return
if(contents.len)
- var/obj/item/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
+ var/obj/item/book/choice = input(user, "Which book would you like to remove from the shelf?") as null|obj in contents
if(choice)
- if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
+ if(!(user.mobility_flags & MOBILITY_USE) || user.stat || user.restrained() || !in_range(loc, user))
return
if(ishuman(user))
if(!user.get_active_held_item())
diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm
index 158f07888907..1d769fa83cf3 100644
--- a/code/modules/mining/equipment/wormhole_jaunter.dm
+++ b/code/modules/mining/equipment/wormhole_jaunter.dm
@@ -93,7 +93,7 @@
playsound(M,'sound/weapons/resonator_blast.ogg',50,1)
if(iscarbon(M))
var/mob/living/carbon/L = M
- L.Knockdown(60)
+ L.Paralyze(60)
if(ishuman(L))
shake_camera(L, 20, 1)
addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index af8860c02be8..f2b81fd63b59 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -74,7 +74,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
var/mutable_appearance/balloon3
if(isliving(A))
var/mob/living/M = A
- M.Knockdown(320) // Keep them from moving during the duration of the extraction
+ M.Paralyze(320) // Keep them from moving during the duration of the extraction
M.buckled = 0 // Unbuckle them to prevent anchoring problems
else
A.anchored = TRUE
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 5e6d826b557e..af86f5ac17bf 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -415,7 +415,7 @@
armour_penetration = 100
damage_type = BRUTE
hitsound = 'sound/effects/splat.ogg'
- knockdown = 30
+ paralyze = 30
var/chain
/obj/item/projectile/hook/fire(setAngle)
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index 77d73da167d4..5e4963f8564d 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -10,7 +10,6 @@
density = FALSE
stat = DEAD
- canmove = FALSE
var/mob/living/new_character //for instant transfer once the round is set up
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 9fb7c29a7ce9..8582ea26170d 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -11,7 +11,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
layer = GHOST_LAYER
stat = DEAD
density = FALSE
- canmove = 0
see_invisible = SEE_INVISIBLE_OBSERVER
see_in_dark = 100
invisibility = INVISIBILITY_OBSERVER
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index f7aa8489491b..8a2baa276d50 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -195,20 +195,18 @@
/mob/proc/put_in_l_hand(obj/item/I)
return put_in_hand(I, get_empty_held_index_for_side("l"))
-
//Puts the item into the first available right hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_r_hand(obj/item/I)
return put_in_hand(I, get_empty_held_index_for_side("r"))
-
/mob/proc/put_in_hand_check(obj/item/I)
- if(lying && !(I.item_flags & ABSTRACT))
- return FALSE
- if(!istype(I))
+ return FALSE //nonliving mobs don't have hands
+
+/mob/living/put_in_hand_check(obj/item/I)
+ if(!(mobility_flags & MOBILITY_PICKUP) || !istype(I))
return FALSE
return TRUE
-
//Puts the item into our active hand if possible. returns TRUE on success.
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE, ignore_animation = TRUE)
return put_in_hand(I, active_hand_index, forced, ignore_animation)
diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm
index e8a15d70aef6..1ca584f40476 100644
--- a/code/modules/mob/living/brain/brain.dm
+++ b/code/modules/mob/living/brain/brain.dm
@@ -32,12 +32,11 @@
container = null
return ..()
-/mob/living/brain/update_canmove()
+/mob/living/brain/update_mobility()
if(in_contents_of(/obj/mecha))
- canmove = 1
+ mobility_flags = MOBILITY_FLAGS_DEFAULT
else
- canmove = 0
- return canmove
+ mobility_flags = NONE
/mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
return
diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm
index 6d59bc052a57..1282943e8192 100644
--- a/code/modules/mob/living/carbon/alien/alien_defense.dm
+++ b/code/modules/mob/living/carbon/alien/alien_defense.dm
@@ -21,9 +21,11 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if ("help")
- resting = 0
+ set_resting(FALSE)
AdjustStun(-60)
AdjustKnockdown(-60)
+ AdjustImmobilized(-60)
+ AdjustParalyzed(-60)
AdjustUnconscious(-60)
AdjustSleeping(-100)
visible_message("[M.name] nuzzles [src] trying to wake [p_them()] up!")
diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
index 323bd408cf55..be7402d3b3ea 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
@@ -205,7 +205,7 @@ Doesn't work on other aliens/AI.*/
if(..())
return
var/p_cost = 50
- if(!iscarbon(ranged_ability_user) || ranged_ability_user.lying || ranged_ability_user.stat)
+ if(!iscarbon(ranged_ability_user) || ranged_ability_user.stat)
remove_ranged_ability()
return
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
index fe682b5c99dd..9127bf6c294a 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
@@ -31,7 +31,7 @@
#define MAX_ALIEN_LEAP_DIST 7
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(atom/A)
- if(!canmove || leaping)
+ if((mobility_flags & (MOBILITY_MOVE | MOBILITY_STAND)) != (MOBILITY_MOVE | MOBILITY_STAND) || leaping)
return
if(pounce_cooldown > world.time)
@@ -70,21 +70,21 @@
blocked = TRUE
if(!blocked)
L.visible_message("[src] pounces on [L]!", "[src] pounces on you!")
- L.Knockdown(100)
+ L.Paralyze(100)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
else
- Knockdown(40, 1, 1)
+ Paralyze(40, 1, 1)
toggle_leap(0)
else if(A.density && !A.CanPass(src))
visible_message("[src] smashes into [A]!", "[src] smashes into [A]!")
- Knockdown(40, 1, 1)
+ Paralyze(40, 1, 1)
if(leaping)
- leaping = 0
+ leaping = FALSE
update_icons()
- update_canmove()
+ update_mobility()
/mob/living/carbon/alien/humanoid/float(on)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/death.dm b/code/modules/mob/living/carbon/alien/humanoid/death.dm
index c6c675ead940..ad0d8bbb9d58 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/death.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/death.dm
@@ -4,7 +4,6 @@
. = ..()
- update_canmove()
update_icons()
status_flags |= CANPUSH
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
index b3839a6033fd..4d2a7d68ad13 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
@@ -42,7 +42,7 @@
"[M] has attempted to punch [src]!", null, COMBAT_MESSAGE_RANGE)
if ("disarm")
- if (!lying)
+ if (!(mobility_flags & MOBILITY_STAND))
if (prob(5))
Unconscious(40)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
index e1a7752e9d89..3aabbd2e81d7 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
@@ -12,12 +12,12 @@
else
icon_state = "alien[caste]_dead"
- else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || IsKnockdown())
+ else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || IsParalyzed())
icon_state = "alien[caste]_unconscious"
else if(leap_on_click)
icon_state = "alien[caste]_pounce"
- else if(lying || resting || asleep)
+ else if(!(mobility_flags & MOBILITY_STAND))
icon_state = "alien[caste]_sleep"
else if(mob_size == MOB_SIZE_LARGE)
icon_state = "alien[caste]"
@@ -41,8 +41,8 @@
var/old_icon = icon
icon = alt_icon
alt_icon = old_icon
- pixel_x = get_standard_pixel_x_offset(lying)
- pixel_y = get_standard_pixel_y_offset(lying)
+ pixel_x = get_standard_pixel_x_offset(mobility_flags & MOBILITY_STAND)
+ pixel_y = get_standard_pixel_y_offset(mobility_flags & MOBILITY_STAND)
update_inv_hands()
update_inv_handcuffed()
@@ -52,7 +52,7 @@
update_transform()
/mob/living/carbon/alien/humanoid/update_transform() //The old method of updating lying/standing was update_icons(). Aliens still expect that.
- if(lying > 0)
+ if(lying)
lying = 90 //Anything else looks retarded
..()
update_icons()
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index b10a9df6a8ce..c2a26fa1129c 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -22,12 +22,11 @@
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
- update_canmove()
+ update_mobility()
else
if(stat == UNCONSCIOUS)
stat = CONSCIOUS
- resting = 0
+ set_resting(FALSE)
adjust_blindness(-1)
- update_canmove()
update_damage_hud()
update_health_hud()
diff --git a/code/modules/mob/living/carbon/alien/larva/update_icons.dm b/code/modules/mob/living/carbon/alien/larva/update_icons.dm
index 7897cbf9693a..e1af00c174c7 100644
--- a/code/modules/mob/living/carbon/alien/larva/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/larva/update_icons.dm
@@ -14,7 +14,7 @@
icon_state = "larva[state]_dead"
else if(handcuffed || legcuffed) //This should be an overlay. Who made this an icon_state?
icon_state = "larva[state]_cuff"
- else if(stat == UNCONSCIOUS || lying || resting)
+ else if(!(mobility_flags & MOBILITY_STAND))
icon_state = "larva[state]_sleep"
else if(IsStun())
icon_state = "larva[state]_stun"
diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm
index 155f20370859..feeb66a9be71 100644
--- a/code/modules/mob/living/carbon/alien/organs.dm
+++ b/code/modules/mob/living/carbon/alien/organs.dm
@@ -135,7 +135,7 @@
else if(ishuman(owner)) //Humans, being more fragile, are more overwhelmed by the mental backlash.
to_chat(owner, "You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!")
owner.emote("scream")
- owner.Knockdown(100)
+ owner.Paralyze(100)
owner.jitteriness += 30
owner.confused += 30
diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
index b4739f943eab..9023a2d8ced3 100644
--- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
@@ -88,7 +88,7 @@
var/mob/living/carbon/alien/larva/new_xeno = new(xeno_loc)
new_xeno.key = ghost.key
SEND_SOUND(new_xeno, sound('sound/voice/hiss5.ogg',0,0,0,100)) //To get the player's attention
- new_xeno.canmove = 0 //so we don't move during the bursting animation
+ new_xeno.mobility_flags = NONE //so we don't move during the bursting animation
new_xeno.notransform = 1
new_xeno.invisibility = INVISIBILITY_MAXIMUM
@@ -98,7 +98,7 @@
return
if(new_xeno)
- new_xeno.canmove = 1
+ new_xeno.mobility_flags = MOBILITY_FLAGS_DEFAULT
new_xeno.notransform = 0
new_xeno.invisibility = 0
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 21bfb32e7d77..51163ee423ef 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -86,7 +86,7 @@
mode() // Activate held item
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
- if(lying && surgeries.len)
+ if(!(mobility_flags & MOBILITY_STAND) && surgeries.len)
if(user != src && (user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM))
for(var/datum/surgery/S in surgeries)
if(S.next_step(user,user.a_intent))
@@ -104,7 +104,7 @@
hurt = FALSE
if(hit_atom.density && isturf(hit_atom))
if(hurt)
- Knockdown(20)
+ Paralyze(20)
take_bodypart_damage(10)
if(iscarbon(hit_atom) && hit_atom != src)
var/mob/living/carbon/victim = hit_atom
@@ -113,8 +113,8 @@
if(hurt)
victim.take_bodypart_damage(10)
take_bodypart_damage(10)
- victim.Knockdown(20)
- Knockdown(20)
+ victim.Paralyze(20)
+ Paralyze(20)
visible_message("[src] crashes into [victim], knocking them both over!",\
"You violently crash into [victim]!")
playsound(src,'sound/weapons/punch1.ogg',50,1)
@@ -274,7 +274,7 @@
/mob/living/carbon/resist_fire()
fire_stacks -= 5
- Knockdown(60, TRUE, TRUE)
+ Paralyze(60, TRUE, TRUE)
spin(32,2)
visible_message("[src] rolls on the floor, trying to put [p_them()]self out!", \
"You stop, drop, and roll!")
@@ -451,7 +451,7 @@
visible_message("[src] dry heaves!", \
"You try to throw up, but there's nothing in your stomach!")
if(stun)
- Knockdown(200)
+ Paralyze(200)
return 1
if(is_mouth_covered()) //make this add a blood/vomit overlay later it'll be hilarious
@@ -464,7 +464,7 @@
visible_message("[src] throws up!", "You throw up!")
if(stun)
- Stun(80)
+ Paralyze(80)
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
var/turf/T = get_turf(src)
@@ -502,6 +502,13 @@
if(dna)
dna.real_name = real_name
+/mob/living/carbon/update_mobility()
+ . = ..()
+ if(!(mobility_flags & MOBILITY_STAND))
+ add_movespeed_modifier(MOVESPEED_ID_CARBON_CRAWLING, TRUE, multiplicative_slowdown = CRAWLING_ADD_SLOWDOWN)
+ else
+ remove_movespeed_modifier(MOVESPEED_ID_CARBON_CRAWLING, TRUE)
+
//Updates the mob's health from bodyparts and mob damage variables
/mob/living/carbon/updatehealth()
if(status_flags & GODMODE)
@@ -517,6 +524,7 @@
health = round(maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute, DAMAGE_PRECISION)
staminaloss = round(total_stamina, DAMAGE_PRECISION)
update_stat()
+ update_mobility()
if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD )
become_husk("burn")
med_hud_set_health()
@@ -530,9 +538,9 @@
if(stam > DAMAGE_PRECISION)
var/total_health = (health - stam)
if(total_health <= crit_threshold && !stat)
- if(!IsKnockdown())
+ if(!IsParalyzed())
to_chat(src, "You're too exhausted to keep going...")
- Knockdown(100)
+ Paralyze(100)
update_health_hud()
/mob/living/carbon/update_sight()
@@ -752,7 +760,7 @@
else
stat = CONSCIOUS
adjust_blindness(-1)
- update_canmove()
+ update_mobility()
update_damage_hud()
update_health_hud()
med_hud_set_status()
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index f18d6d363df0..658982749d19 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -51,7 +51,7 @@
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE)
if(!skipcatch) //ugly, but easy
if(in_throw_mode && !get_active_held_item()) //empty active hand and we're in throw mode
- if(canmove && !restrained())
+ if((mobility_flags & MOBILITY_MOVE) && !restrained())
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(isturf(I.loc))
@@ -118,7 +118,7 @@
if(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN)
ContactContractDisease(D)
- if(lying && surgeries.len)
+ if(!(mobility_flags & MOBILITY_STAND) && surgeries.len)
if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, user.a_intent))
@@ -164,7 +164,7 @@
do_sparks(5, TRUE, src)
var/power = M.powerlevel + rand(0,3)
- Knockdown(power*20)
+ Paralyze(power*20)
if(stuttering < power)
stuttering = power
if (prob(stunprob) && M.powerlevel >= 8)
@@ -235,11 +235,11 @@
do_jitter_animation(jitteriness)
stuttering += 2
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
- Stun(40)
+ Paralyze(40)
spawn(20)
jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
- Knockdown(60)
+ Paralyze(60)
if(override)
return override
else
@@ -252,7 +252,7 @@
if(health >= 0 && !(has_trait(TRAIT_FAKEDEATH)))
- if(lying)
+ if(!(mobility_flags & MOBILITY_STAND))
if(buckled)
to_chat(M, "You need to unbuckle [src] first to do that!")
return
@@ -266,9 +266,9 @@
AdjustKnockdown(-60)
AdjustUnconscious(-60)
AdjustSleeping(-100)
- if(resting)
- resting = 0
- update_canmove()
+ AdjustParalyzed(-60)
+ AdjustImmobilized(-60)
+ set_resting(FALSE)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
@@ -333,7 +333,7 @@
var/effect_amount = intensity - ear_safety
if(effect_amount > 0)
if(stun_pwr)
- Knockdown(stun_pwr*effect_amount)
+ Paralyze(stun_pwr*effect_amount)
if(istype(ears) && (deafen_pwr || damage_pwr))
var/ear_damage = damage_pwr * effect_amount
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 301d2dbbb2e4..89de674565f0 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -493,7 +493,7 @@
to_chat(usr, "Unable to locate a data core entry for this person.")
/mob/living/carbon/human/proc/canUseHUD()
- return !(src.stat || IsKnockdown() || IsStun() || src.restrained())
+ return (mobility_flags & MOBILITY_USE)
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, var/penetrate_thick = 0)
. = 1 // Default to returning true.
@@ -728,7 +728,7 @@
cut_overlay(MA)
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
- if(incapacitated() || lying )
+ if(!(mobility_flags & MOBILITY_UI))
to_chat(src, "You can't do that right now!")
return FALSE
if(!Adjacent(M) && (M.loc != src))
@@ -837,7 +837,7 @@
visible_message("[src] dry heaves!", \
"You try to throw up, but there's nothing in your stomach!")
if(stun)
- Knockdown(200)
+ Paralyze(200)
return 1
..()
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 4fb7d98b3219..79f8920435a2 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -46,7 +46,7 @@
if(mind)
if(mind.martial_art && !incapacitated(FALSE, TRUE) && mind.martial_art.can_use(src) && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
if(prob(mind.martial_art.deflection_chance))
- if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it
+ if((mobility_flags & MOBILITY_USE) && dna && !dna.check_mutation(HULK)) //But only if they're otherwise able to use items, and hulks can't do it
if(mind.martial_art.deflection_chance >= 100) //if they can NEVER be hit, lets clue sec in ;)
visible_message("[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!", "You deflect the projectile!")
else
@@ -221,7 +221,7 @@
"[M] disarmed [src]!")
else if(!M.client || prob(5)) // only natural monkeys get to stun reliably, (they only do it occasionaly)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
- Knockdown(100)
+ Paralyze(100)
log_combat(M, src, "tackled")
visible_message("[M] has tackled down [src]!", \
"[M] has tackled down [src]!")
@@ -283,9 +283,9 @@
return
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
if(armour > 0)
- Knockdown(50 + armour)
+ Paralyze(50 + armour)
else
- Knockdown(50)
+ Paralyze(50)
//yogs end
log_combat(M, src, "tackled")
visible_message("[M] has tackled down [src]!", \
@@ -495,10 +495,10 @@
switch(severity)
if(1)
L.receive_damage(0,10)
- Stun(200)
+ Paralyze(200)
if(2)
L.receive_damage(0,5)
- Stun(100)
+ Paralyze(100)
/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit)
var/list/damaged = list()
diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm
index 1addb3615c34..22c58b2e0d07 100644
--- a/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/code/modules/mob/living/carbon/human/human_movement.dm
@@ -47,7 +47,7 @@
HM.on_move(src, NewLoc)
if(shoes)
- if(!lying && !buckled)
+ if(mobility_flags & MOBILITY_STAND)
if(loc == NewLoc)
if(!has_gravity(loc))
return
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index dde61282a4f0..b6dcb8a59c8d 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1026,9 +1026,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return TRUE
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
- if(!H.IsKnockdown())
+ if(!H.IsParalyzed())
H.emote("collapse")
- H.Knockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
+ H.Paralyze(RAD_MOB_KNOCKDOWN_AMOUNT)
to_chat(H, "You feel weak.")
if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB))
@@ -1182,7 +1182,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else
var/atk_verb = user.dna.species.attack_verb
- if(target.lying)
+ if(!(target.mobility_flags & MOBILITY_STAND))
atk_verb = "kick"
switch(atk_verb)
@@ -1225,7 +1225,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
"[user] has knocked [target] down!", null, COMBAT_MESSAGE_RANGE)
target.apply_effect(80, EFFECT_KNOCKDOWN, armor_block)
target.forcesay(GLOB.hit_appends)
- else if(target.lying)
+ else if(!(target.mobility_flags & MOBILITY_STAND))
target.forcesay(GLOB.hit_appends)
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
diff --git a/code/modules/mob/living/carbon/human/species_types/angel.dm b/code/modules/mob/living/carbon/human/species_types/angel.dm
index 51222949560a..588751b70fb7 100644
--- a/code/modules/mob/living/carbon/human/species_types/angel.dm
+++ b/code/modules/mob/living/carbon/human/species_types/angel.dm
@@ -52,7 +52,7 @@
return 0
/datum/species/angel/proc/CanFly(mob/living/carbon/human/H)
- if(H.stat || H.IsStun() || H.IsKnockdown())
+ if(H.stat || !(H.mobility_flags & MOBILITY_STAND))
return 0
if(H.wear_suit && ((H.wear_suit.flags_inv & HIDEJUMPSUIT) && (!H.wear_suit.species_exception || !is_type_in_list(src, H.wear_suit.species_exception)))) //Jumpsuits have tail holes, so it makes sense they have wing holes too
to_chat(H, "Your suit blocks your wings from extending!")
@@ -80,13 +80,12 @@
if(A.CanFly(H))
if(H.movement_type & FLYING)
to_chat(H, "You settle gently back onto the ground...")
- A.ToggleFlight(H,0)
- H.update_canmove()
+ A.ToggleFlight(H,FALSE)
+ H.update_mobility()
else
to_chat(H, "You beat your wings and begin to hover gently above the ground...")
- H.resting = 0
- A.ToggleFlight(H,1)
- H.update_canmove()
+ A.ToggleFlight(H,TRUE)
+ H.set_resting(FALSE, FALSE)
/datum/species/angel/proc/flyslip(mob/living/carbon/human/H)
var/obj/buckled_obj
diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
index 29f1dd44537d..bc33b9cab905 100644
--- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
@@ -53,7 +53,7 @@
if(/obj/item/projectile/energy/floramut)
if(prob(15))
H.rad_act(rand(30,80))
- H.Knockdown(100)
+ H.Paralyze(100)
H.visible_message("[H] writhes in pain as [H.p_their()] vacuoles boil.", "You writhe in pain as your vacuoles boil!", "You hear the crunching of leaves.")
if(prob(80))
H.randmutb()
diff --git a/code/modules/mob/living/carbon/human/status_procs.dm b/code/modules/mob/living/carbon/human/status_procs.dm
index 844545a748bc..b8f2d1cb2d36 100644
--- a/code/modules/mob/living/carbon/human/status_procs.dm
+++ b/code/modules/mob/living/carbon/human/status_procs.dm
@@ -1,12 +1,20 @@
-/mob/living/carbon/human/Stun(amount, updating = 1, ignore_canstun = 0)
+/mob/living/carbon/human/Stun(amount, updating = TRUE, ignore_canstun = FALSE)
amount = dna.species.spec_stun(src,amount)
return ..()
-/mob/living/carbon/human/Knockdown(amount, updating = 1, ignore_canknockdown = 0)
+/mob/living/carbon/human/Knockdown(amount, updating = TRUE, ignore_canstun = FALSE)
amount = dna.species.spec_stun(src,amount)
return ..()
+/mob/living/carbon/human/Paralyze(amount, updating = TRUE, ignore_canstun = FALSE)
+ amount = dna.species.spec_stun(src, amount)
+ return ..()
+
+/mob/living/carbon/human/Immobilize(amount, updating = TRUE, ignore_canstun = FALSE)
+ amount = dna.species.spec_stun(src, amount)
+ return ..()
+
/mob/living/carbon/human/Unconscious(amount, updating = 1, ignore_canunconscious = 0)
amount = dna.species.spec_stun(src,amount)
if(has_trait(TRAIT_HEAVY_SLEEPER))
diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm
index 901fb48b20d0..cb11cb5ec3ab 100644
--- a/code/modules/mob/living/carbon/monkey/combat.dm
+++ b/code/modules/mob/living/carbon/monkey/combat.dm
@@ -50,13 +50,13 @@
// taken from /mob/living/carbon/human/interactive/
/mob/living/carbon/monkey/proc/IsDeadOrIncap(checkDead = TRUE)
- if(!canmove)
+ if(!(mobility_flags & MOBILITY_FLAGS_INTERACTION))
return 1
if(health <= 0 && checkDead)
return 1
if(IsUnconscious())
return 1
- if(IsStun() || IsKnockdown())
+ if(IsStun() || IsParalyzed())
return 1
if(stat)
return 1
@@ -143,7 +143,7 @@
pickupTimer = 0
else
INVOKE_ASYNC(src, .proc/walk2derpless, pickupTarget.loc)
- if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc)) // next to target
+ if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc)) // next to target
drop_all_held_items() // who cares about these items, i want that one!
if(isturf(pickupTarget.loc)) // on floor
equip_item(pickupTarget)
@@ -167,7 +167,7 @@
battle_screech()
retaliate(L)
return TRUE
- else
+ else
bodyDisposal = locate(/obj/machinery/disposal/) in around
if(bodyDisposal)
target = L
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 7836e402af65..0ec83dd2c7b9 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -21,7 +21,7 @@
else if(resisting)
resisting = FALSE
else if((mode == MONKEY_IDLE && !pickupTarget && !prob(MONKEY_SHENANIGAN_PROB)) || !handle_combat())
- if(prob(25) && canmove && isturf(loc) && !pulledby)
+ if(prob(25) && (mobility_flags & MOBILITY_MOVE) && isturf(loc) && !pulledby)
step(src, pick(GLOB.cardinals))
else if(prob(1))
emote(pick("scratch","jump","roll","tail"))
@@ -31,9 +31,9 @@
/mob/living/carbon/monkey/handle_mutations_and_radiation()
if(radiation)
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
- if(!IsKnockdown())
+ if(!IsParalyzed())
emote("collapse")
- Knockdown(RAD_MOB_KNOCKDOWN_AMOUNT)
+ Paralyze(RAD_MOB_KNOCKDOWN_AMOUNT)
to_chat(src, "You feel weak.")
if(radiation > RAD_MOB_MUTATE)
if(prob(1))
diff --git a/code/modules/mob/living/carbon/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm
index df90dd56fd77..5906bcebca3c 100644
--- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm
@@ -64,7 +64,7 @@
if(!IsUnconscious())
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
if (prob(25))
- Knockdown(40)
+ Paralyze(40)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
log_combat(M, src, "pushed")
visible_message("[M] has pushed down [src]!", \
@@ -106,7 +106,7 @@
var/obj/item/I = null
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
if(prob(95))
- Knockdown(20)
+ Paralyze(20)
visible_message("[M] has tackled down [name]!", \
"[M] has tackled down [name]!", null, COMBAT_MESSAGE_RANGE)
else
diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm
index 2c7462243205..812b50d11d9b 100644
--- a/code/modules/mob/living/carbon/update_icons.dm
+++ b/code/modules/mob/living/carbon/update_icons.dm
@@ -6,8 +6,8 @@
var/changed = 0
if(lying != lying_prev && rotate_on_lying)
changed++
- ntransform.TurnTo(lying_prev,lying)
- if(lying == 0) //Lying to standing
+ ntransform.TurnTo(lying_prev , lying)
+ if(!lying) //Lying to standing
final_pixel_y = get_standard_pixel_y_offset()
else //if(lying != 0)
if(lying_prev == 0) //Standing to lying
@@ -23,8 +23,7 @@
if(changed)
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT)
- floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
-
+ floating = FALSE // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
/mob/living/carbon
var/list/overlays_standing[TOTAL_LAYERS]
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index dfc81396e78a..0a75d8c0f322 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -94,6 +94,10 @@
Stun(effect * hit_percent)
if(EFFECT_KNOCKDOWN)
Knockdown(effect * hit_percent)
+ if(EFFECT_PARALYZE)
+ Paralyze(effect * hit_percent)
+ if(EFFECT_IMMOBILIZE)
+ Immobilize(effect * hit_percent)
if(EFFECT_UNCONSCIOUS)
Unconscious(effect * hit_percent)
if(EFFECT_IRRADIATE)
@@ -110,10 +114,14 @@
if(EFFECT_JITTER)
if((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE))
jitteriness = max(jitteriness,(effect * hit_percent))
+ if(EFFECT_PARALYZE)
+ Paralyze(effect * hit_percent)
+ if(EFFECT_IMMOBILIZE)
+ Immobilize(effect * hit_percent)
return 1
-/mob/living/proc/apply_effects(stun = 0, knockdown = 0, unconscious = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = FALSE, stamina = 0, jitter = 0)
+/mob/living/proc/apply_effects(stun = 0, knockdown = 0, unconscious = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = FALSE, stamina = 0, jitter = 0, paralyze = 0, immobilize = 0)
if(blocked >= 100)
return 0
if(stun)
@@ -122,6 +130,10 @@
apply_effect(knockdown, EFFECT_KNOCKDOWN, blocked)
if(unconscious)
apply_effect(unconscious, EFFECT_UNCONSCIOUS, blocked)
+ if(paralyze)
+ apply_effect(paralyze, EFFECT_PARALYZE, blocked)
+ if(immobilize)
+ apply_effect(immobilize, EFFECT_IMMOBILIZE, blocked)
if(irradiate)
apply_effect(irradiate, EFFECT_IRRADIATE, blocked)
if(slur)
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index f6888a21ecb1..ab04184564db 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -1,7 +1,7 @@
/mob/living/gib(no_brain, no_organs, no_bodyparts)
var/prev_lying = lying
if(stat != DEAD)
- death(1)
+ death(TRUE)
if(!prev_lying)
gib_animation()
@@ -71,7 +71,7 @@
update_action_buttons_icon()
update_damage_hud()
update_health_hud()
- update_canmove()
+ update_mobility()
med_hud_set_health()
med_hud_set_status()
if(!gibbed && !QDELETED(src))
diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm
index 61ce1c2bc3a6..bfaf677a79ab 100644
--- a/code/modules/mob/living/emote.dm
+++ b/code/modules/mob/living/emote.dm
@@ -243,7 +243,7 @@
if(H.get_num_arms() == 0)
if(H.get_num_legs() != 0)
message_param = "tries to point at %t with a leg, falling down in the process!"
- H.Knockdown(20)
+ H.Paralyze(20)
else
message_param = "bumps [user.p_their()] head on the ground trying to motion towards %t."
H.adjustBrainLoss(5)
@@ -347,7 +347,7 @@
. = ..()
if(. && isliving(user))
var/mob/living/L = user
- L.Knockdown(200)
+ L.Paralyze(200)
/datum/emote/living/sway
key = "sway"
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index d7b2e3b78569..3308f0fbbd47 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -217,7 +217,7 @@
return FALSE
if(!(AM.can_be_pulled(src, state, force)))
return FALSE
- if(throwing || incapacitated())
+ if(throwing || !(mobility_flags & MOBILITY_PULL))
return FALSE
AM.add_fingerprint(src)
@@ -307,8 +307,8 @@
to_chat(src, "You have given up life and succumbed to death.")
death()
-/mob/living/incapacitated(ignore_restraints, ignore_grab)
- if(stat || IsUnconscious() || IsStun() || IsKnockdown() || (!ignore_restraints && restrained(ignore_grab)))
+/mob/living/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, check_immobilized = FALSE)
+ if(stat || IsUnconscious() || IsStun() || IsParalyzed() || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)))
return TRUE
/mob/living/proc/InCritical()
@@ -361,7 +361,7 @@
else
if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
SetSleeping(400) //Short nap
- update_canmove()
+ update_mobility()
/mob/proc/get_contents()
@@ -370,19 +370,26 @@
set category = "IC"
if(!resting)
- resting = TRUE
- to_chat(src, "You are now resting.")
- update_rest_hud_icon()
- update_canmove()
+ set_resting(TRUE, FALSE)
else
if(do_after(src, 10, target = src))
- to_chat(src, "You get up.")
- resting = FALSE
- update_rest_hud_icon()
- update_canmove()
+ set_resting(FALSE, FALSE)
else
to_chat(src, "You fail to get up.")
+/mob/living/proc/set_resting(rest, silent = TRUE)
+ if(!silent)
+ if(rest)
+ to_chat(src, "You are now resting.")
+ else
+ to_chat(src, "You get up.")
+ resting = rest
+ update_resting()
+
+/mob/living/proc/update_resting()
+ update_rest_hud_icon()
+ update_mobility()
+
//Recursive function to find everything a mob is holding. Really shitty proc tbh.
/mob/living/get_contents()
var/list/ret = list()
@@ -433,7 +440,7 @@
stat = UNCONSCIOUS //the mob starts unconscious,
blind_eyes(1)
updatehealth() //then we check if the mob should wake up.
- update_canmove()
+ update_mobility()
update_sight()
clear_alert("not_enough_oxy")
reload_fullscreen()
@@ -455,6 +462,8 @@
set_disgust(0)
SetStun(0, FALSE)
SetKnockdown(0, FALSE)
+ SetImmobilized(0, FALSE)
+ SetParalyzed(0, FALSE)
SetSleeping(0, FALSE)
radiation = 0
nutrition = NUTRITION_LEVEL_FED + 50
@@ -470,7 +479,7 @@
ExtinguishMob()
fire_stacks = 0
confused = 0
- update_canmove()
+ update_mobility()
GET_COMPONENT(mood, /datum/component/mood)
if (mood)
QDEL_LIST_ASSOC_VAL(mood.mood_events)
@@ -504,7 +513,7 @@
if(active_storage && !(CanReach(active_storage.parent,view_only = TRUE)))
active_storage.close(src)
- if(lying && !buckled && prob(getBruteLoss()*200/maxHealth))
+ if(!(mobility_flags & MOBILITY_STAND) && !buckled && prob(getBruteLoss()*200/maxHealth))
makeTrail(newloc, T, old_direction)
/mob/living/proc/makeTrail(turf/target_turf, turf/start, direction)
@@ -606,7 +615,7 @@
var/obj/C = loc
C.container_resist(src)
- else if(canmove)
+ else if(mobility_flags & MOBILITY_MOVE)
if(on_fire)
resist_fire() //stop, drop, and roll
else if(last_special <= world.time)
@@ -953,7 +962,7 @@
"[C] trips over [src] and falls!", \
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]")
- C.Knockdown(40)
+ C.Paralyze(40)
/mob/living/ConveyorMove()
if((movement_type & FLYING) && !stat)
@@ -965,42 +974,63 @@
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
//Robots, animals and brains have their own version so don't worry about them
-/mob/living/proc/update_canmove()
- var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_DEATHCOMA))
- var/move_and_fall = stat == SOFT_CRIT && !pulledby
+/mob/living/proc/update_mobility()
+ var/stat_softcrit = stat == SOFT_CRIT
+ var/stat_conscious = (stat == CONSCIOUS) || stat_softcrit
+ var/conscious = !IsUnconscious() && stat_conscious && !has_trait(TRAIT_DEATHCOMA)
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
- var/buckle_lying = !(buckled && !buckled.buckle_lying)
var/has_legs = get_num_legs()
var/has_arms = get_num_arms()
+ var/paralyzed = IsParalyzed()
+ var/stun = IsStun()
+ var/knockdown = IsKnockdown()
var/ignore_legs = get_leg_ignore()
- if(ko || resting || move_and_fall || IsStun() || chokehold)
+ var/canmove = !IsImmobilized() && !stun && conscious && !paralyzed && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && (has_arms || ignore_legs || has_legs)
+ if(canmove)
+ mobility_flags |= MOBILITY_MOVE
+ else
+ mobility_flags &= ~MOBILITY_MOVE
+ var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyzed && has_legs && !(buckled && buckled.buckle_lying)
+ var/canstand = canstand_involuntary && !resting
+
+ if(canstand)
+ mobility_flags |= (MOBILITY_STAND | MOBILITY_UI | MOBILITY_PULL)
+ lying = 0
+ else
+ mobility_flags &= ~(MOBILITY_STAND | MOBILITY_UI | MOBILITY_PULL)
+ if(!lying)
+ lying = pick(90, 270)
+ var/canitem = !paralyzed && !stun && conscious && !chokehold && has_arms
+ if(canitem)
+ mobility_flags |= (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE)
+ else
+ mobility_flags &= ~(MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE)
+ if(!(mobility_flags & MOBILITY_USE))
drop_all_held_items()
- unset_machine()
+ if(!(mobility_flags & MOBILITY_PULL))
if(pulling)
stop_pulling()
- else if(has_legs || ignore_legs)
- lying = 0
- if(buckled)
- lying = 90*buckle_lying
- else if(!lying)
- if(resting)
- fall()
- else if(ko || move_and_fall || (!has_legs && !ignore_legs) || chokehold)
- fall(forced = 1)
- canmove = !(ko || resting || IsStun() || IsFrozen() || chokehold || buckled || (!has_legs && !ignore_legs && !has_arms))
+ if(!(mobility_flags & MOBILITY_UI))
+ unset_machine()
density = !lying
+ var/changed = lying == lying_prev
if(lying)
+ if(!lying_prev)
+ fall(!canstand_involuntary)
if(layer == initial(layer)) //to avoid special cases like hiding larvas.
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
else
if(layer == LYING_MOB_LAYER)
layer = initial(layer)
update_transform()
- if(!lying && lying_prev)
+ if(changed)
if(client)
client.move_delay = world.time + movement_delay()
lying_prev = lying
- return canmove
+
+/mob/living/proc/fall(forced)
+ if(!(mobility_flags & MOBILITY_USE))
+ drop_all_held_items()
/mob/living/proc/AddAbility(obj/effect/proc_holder/A)
abilities.Add(A)
@@ -1039,7 +1069,7 @@
if(.)
if(client)
reset_perspective()
- update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
+ update_mobility() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
/mob/living/proc/update_z(new_z) // 1+ to register, null to unregister
if (registered_z != new_z)
@@ -1130,7 +1160,7 @@
. = ..()
switch(var_name)
if("knockdown")
- SetKnockdown(var_value)
+ SetParalyzed(var_value)
if("stun")
SetStun(var_value)
if("unconscious")
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index be5223cc6cdb..4fa2ca7ed482 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -175,14 +175,14 @@
log_combat(user, src, "grabbed", addition="neck grab")
visible_message("[user] has grabbed [src] by the neck!",\
"[user] has grabbed you by the neck!")
- update_canmove() //we fall down
+ update_mobility() //we fall down
if(!buckled && !density)
Move(user.loc)
if(GRAB_KILL)
log_combat(user, src, "strangled", addition="kill grab")
visible_message("[user] is strangling [src]!", \
"[user] is strangling you!")
- update_canmove() //we fall down
+ update_mobility() //we fall down
if(!buckled && !density)
Move(user.loc)
return 1
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index 1e90894fff82..2d9b16c58b27 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -22,6 +22,13 @@
var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are knocked down if it gets too high. Holodeck and hallucinations deal this.
var/crit_threshold = HEALTH_THRESHOLD_CRIT // when the mob goes from "normal" to crit
+ var/mobility_flags = MOBILITY_FLAGS_DEFAULT
+
+ var/resting = FALSE
+
+ var/lying = 0 //number of degrees. DO NOT USE THIS IN CHECKS. CHECK FOR MOBILITY FLAGS INSTEAD!!
+ var/lying_prev = 0 //last value of lying on update_mobility
+
var/confused = 0 //Makes the mob move in random directions.
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 99f75cdd6176..15bee3e087ef 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -18,7 +18,7 @@
icon_state = "ai"
move_resist = MOVE_FORCE_VERY_STRONG
density = TRUE
- canmove = FALSE
+ mobility_flags = NONE
status_flags = CANSTUN|CANPUSH
a_intent = INTENT_HARM //so we always get pushed instead of trying to swap
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
@@ -362,8 +362,8 @@
to_chat(src, "You are now [is_anchored ? "" : "un"]anchored.")
// the message in the [] will change depending whether or not the AI is anchored
-/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore
- return 0
+/mob/living/silicon/ai/update_mobility() //If the AI dies, mobs won't go through it anymore
+ return
/mob/living/silicon/ai/proc/ai_cancel_call()
set category = "Malfunction"
diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm
index 80665ccc6b64..046d915948dc 100644
--- a/code/modules/mob/living/silicon/ai/death.dm
+++ b/code/modules/mob/living/silicon/ai/death.dm
@@ -12,7 +12,6 @@
cameraFollow = null
anchored = FALSE //unbolt floorbolts
- update_canmove()
if(eyeobj)
eyeobj.setLoc(get_turf(src))
set_eyeobj_visible(FALSE)
diff --git a/code/modules/mob/living/silicon/death.dm b/code/modules/mob/living/silicon/death.dm
index 8ecacb608bcb..d2fc9bfaa610 100644
--- a/code/modules/mob/living/silicon/death.dm
+++ b/code/modules/mob/living/silicon/death.dm
@@ -10,4 +10,4 @@
diag_hud_set_status()
diag_hud_set_health()
update_health_hud()
- . = ..()
\ No newline at end of file
+ return ..()
diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm
index f558ff390730..22f8b59ec330 100644
--- a/code/modules/mob/living/silicon/pai/death.dm
+++ b/code/modules/mob/living/silicon/pai/death.dm
@@ -2,7 +2,7 @@
if(stat == DEAD)
return
stat = DEAD
- canmove = 0
+ mobility_flags = NONE
update_sight()
clear_fullscreens()
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 7fd861bfeb22..b08a9205491c 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -73,7 +73,6 @@
var/overload_ventcrawl = 0
var/overload_bulletblock = 0 //Why is this a good idea?
var/overload_maxhealth = 0
- canmove = FALSE
var/silent = FALSE
var/brightness_power = 5
@@ -97,7 +96,6 @@
START_PROCESSING(SSfastprocess, src)
GLOB.pai_list += src
make_laws()
- canmove = 0
if(!istype(P)) //when manually spawning a pai, we create a card to put it into.
var/newcardloc = P
P = new /obj/item/paicard(newcardloc)
diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm
index f20ccbc73092..50c7c0416f04 100644
--- a/code/modules/mob/living/silicon/pai/pai_defense.dm
+++ b/code/modules/mob/living/silicon/pai/pai_defense.dm
@@ -7,7 +7,7 @@
if(. & EMP_PROTECT_SELF)
return
take_holo_damage(50/severity)
- Knockdown(400/severity)
+ Paralyze(400/severity)
silent = max(30/severity, silent)
if(holoform)
fold_in(force = TRUE)
@@ -21,10 +21,10 @@
qdel(src)
if(2)
fold_in(force = 1)
- Knockdown(400)
+ Paralyze(400)
if(3)
fold_in(force = 1)
- Knockdown(200)
+ Paralyze(200)
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user)
switch(user.a_intent)
@@ -85,7 +85,7 @@
take_holo_damage(amount & 0.25)
/mob/living/silicon/pai/adjustBrainLoss(amount)
- Knockdown(amount * 0.2)
+ Paralyze(amount * 0.2)
/mob/living/silicon/pai/getBruteLoss()
return emittermaxhealth - emitterhealth
diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm
index 4344a439db4c..3e378c6183e1 100644
--- a/code/modules/mob/living/silicon/pai/pai_shell.dm
+++ b/code/modules/mob/living/silicon/pai/pai_shell.dm
@@ -18,7 +18,7 @@
emittersemicd = TRUE
addtimer(CALLBACK(src, .proc/emittercool), emittercd)
- canmove = TRUE
+ mobility_flags = MOBILITY_FLAGS_DEFAULT
density = TRUE
if(istype(card.loc, /obj/item/pda))
var/obj/item/pda/P = card.loc
@@ -60,12 +60,11 @@
var/turf/T = drop_location()
card.forceMove(T)
forceMove(card)
- canmove = FALSE
+ mobility_flags = NONE
density = FALSE
set_light(0)
holoform = FALSE
- if(resting)
- lay_down()
+ set_resting(resting)
/mob/living/silicon/pai/proc/choose_chassis()
if(!isturf(loc) && loc != card)
@@ -75,22 +74,17 @@
if(!choice)
return FALSE
chassis = choice
- icon_state = "[chassis]"
- if(resting)
- icon_state = "[chassis]_rest"
+ update_resting()
to_chat(src, "You switch your holochassis projection composite to [chassis]")
-/mob/living/silicon/pai/lay_down()
- ..()
- update_resting_icon(resting)
-
-/mob/living/silicon/pai/proc/update_resting_icon(rest)
- if(rest)
+/mob/living/silicon/pai/update_resting()
+ . = ..()
+ if(resting)
icon_state = "[chassis]_rest"
else
icon_state = "[chassis]"
if(loc != card)
- visible_message("[src] [rest? "lays down for a moment..." : "perks up from the ground"]")
+ visible_message("[src] [resting? "lays down for a moment..." : "perks up from the ground"]")
/mob/living/silicon/pai/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
return FALSE
diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm
index 75e8fd317f6c..188b53a5c96b 100644
--- a/code/modules/mob/living/silicon/robot/death.dm
+++ b/code/modules/mob/living/silicon/robot/death.dm
@@ -21,7 +21,6 @@
locked = FALSE //unlock cover
- update_canmove()
if(!QDELETED(builtInCamera) && builtInCamera.status)
builtInCamera.toggle_cam(src,0)
update_headlamp(1) //So borg lights are disabled when killed.
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 3ff18c874765..02387eba2b0b 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -92,11 +92,11 @@
else
cut_overlay(fire_overlay)
-/mob/living/silicon/robot/update_canmove()
+/mob/living/silicon/robot/update_mobility()
if(stat || buckled || lockcharge)
- canmove = 0
+ mobility_flags &= ~MOBILITY_MOVE
else
- canmove = 1
+ mobility_flags = MOBILITY_FLAGS_DEFAULT
update_transform()
update_action_buttons_icon()
- return canmove
+
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index dfe121bc69fb..87a64bfe1a5a 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -619,7 +619,7 @@
/mob/living/silicon/robot/update_icons()
cut_overlays()
icon_state = module.cyborg_base_icon
- if(stat != DEAD && !(IsUnconscious() || IsStun() || IsKnockdown() || low_power_mode)) //Not dead, not stunned.
+ if(stat != DEAD && !(IsUnconscious() || IsStun() || IsParalyzed() || low_power_mode)) //Not dead, not stunned.
if(!eye_lights)
eye_lights = new()
if(lamp_intensity > 2)
@@ -655,10 +655,10 @@
if(src.connected_ai)
connected_ai.connected_robots -= src
src.connected_ai = null
- lawupdate = 0
- lockcharge = 0
- canmove = 1
- scrambledcodes = 1
+ lawupdate = FALSE
+ lockcharge = FALSE
+ mobility_flags |= MOBILITY_FLAGS_DEFAULT
+ scrambledcodes = TRUE
//Disconnect it's camera so it's not so easily tracked.
if(!QDELETED(builtInCamera))
QDEL_NULL(builtInCamera)
@@ -688,7 +688,7 @@
else
clear_alert("locked")
lockcharge = state
- update_canmove()
+ update_mobility()
/mob/living/silicon/robot/proc/SetEmagged(new_state)
emagged = new_state
@@ -956,17 +956,17 @@
if(health <= -maxHealth) //die only once
death()
return
- if(IsUnconscious() || IsStun() || IsKnockdown() || getOxyLoss() > maxHealth*0.5)
+ if(IsUnconscious() || IsStun() || IsKnockdown() || IsParalyzed() || getOxyLoss() > maxHealth*0.5)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
- update_canmove()
+ update_mobility()
update_headlamp()
else
if(stat == UNCONSCIOUS)
stat = CONSCIOUS
adjust_blindness(-1)
- update_canmove()
+ update_mobility()
update_headlamp()
diag_hud_set_status()
diag_hud_set_health()
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index 037b2819e993..3c798588e509 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -15,7 +15,7 @@
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
if (M.a_intent == INTENT_DISARM)
- if(!(lying))
+ if(mobility_flags & MOBILITY_STAND)
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
var/obj/item/I = get_active_held_item()
if(I)
diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm
index d898fadc5fcc..7320e457f126 100644
--- a/code/modules/mob/living/silicon/silicon_defense.dm
+++ b/code/modules/mob/living/silicon/silicon_defense.dm
@@ -29,7 +29,7 @@
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
if(prob(damage))
for(var/mob/living/N in buckled_mobs)
- N.Knockdown(20)
+ N.Paralyze(20)
unbuckle_mob(N)
N.visible_message("[N] is knocked off of [src] by [M]!")
switch(M.melee_damage_type)
@@ -106,7 +106,7 @@
for(var/mob/living/M in buckled_mobs)
if(prob(severity*50))
unbuckle_mob(M)
- M.Knockdown(40)
+ M.Paralyze(40)
M.visible_message("[M] is thrown off of [src]!")
flash_act(affect_silicon = 1)
@@ -118,8 +118,8 @@
for(var/mob/living/M in buckled_mobs)
M.visible_message("[M] is knocked off of [src]!")
unbuckle_mob(M)
- M.Knockdown(40)
- if(Proj.stun || Proj.knockdown)
+ M.Paralyze(40)
+ if(Proj.stun || Proj.knockdown || Proj.paralyze)
for(var/mob/living/M in buckled_mobs)
unbuckle_mob(M)
M.visible_message("[M] is knocked off of [src] by the [Proj]!")
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index b065457f6de4..136d7bb2726a 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -110,7 +110,7 @@
if(stat)
return FALSE
on = TRUE
- canmove = TRUE
+ update_mobility()
set_light(initial(light_range))
update_icon()
diag_hud_set_botstat()
@@ -118,7 +118,7 @@
/mob/living/simple_animal/bot/proc/turn_off()
on = FALSE
- canmove = FALSE
+ update_mobility()
set_light(0)
bot_reset() //Resets an AI's call, should it exist.
update_icon()
@@ -155,11 +155,10 @@
path_hud.add_to_hud(src)
path_hud.add_hud_to(src)
-/mob/living/simple_animal/bot/update_canmove()
+/mob/living/simple_animal/bot/update_mobility()
. = ..()
if(!on)
- . = 0
- canmove = .
+ mobility_flags = NONE
/mob/living/simple_animal/bot/Destroy()
if(path_hud)
diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
index bc8dd0c3ab8e..32f48b140b95 100644
--- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
@@ -86,7 +86,7 @@
/mob/living/simple_animal/bot/cleanbot/process_scan(atom/A)
if(iscarbon(A))
var/mob/living/carbon/C = A
- if(C.stat != DEAD && C.lying)
+ if(C.stat != DEAD && !(C.mobility_flags & MOBILITY_STAND))
return C
else if(is_type_in_typecache(A, target_types))
return A
@@ -155,7 +155,7 @@
else
shuffle = TRUE //Shuffle the list the next time we scan so we dont both go the same way.
path = list()
-
+
if(!path || path.len == 0) //No path, need a new one
//Try to produce a path to the target, and ignore airlocks to which it has access.
path = get_path_to(src, target.loc, /turf/proc/Distance_cardinal, 0, 30, id=access_card)
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index d6f57cf4d56d..44a3e7ed140d 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -223,7 +223,7 @@ Auto Patrol[]"},
var/list/targets = list()
for(var/mob/living/carbon/C in view(7,src)) //Let's find us a target
var/threatlevel = 0
- if((C.stat) || (C.lying))
+ if(C.incapacitated())
continue
threatlevel = C.assess_threat(judgement_criteria, lasercolor, weaponcheck=CALLBACK(src, .proc/check_for_weapons))
//speak(C.real_name + text(": threat: []", threatlevel))
@@ -237,7 +237,7 @@ Auto Patrol[]"},
targets += C
if(targets.len>0)
var/mob/living/carbon/t = pick(targets)
- if((t.stat!=2) && (t.lying != 1) && (!t.handcuffed)) //we don't shoot people who are dead, cuffed or lying down.
+ if((t.stat!=2) && (!(t.mobility_flags & MOBILITY_STAND)) && (!t.handcuffed)) //we don't shoot people who are dead, cuffed or lying down.
shootAt(t)
switch(mode)
@@ -276,7 +276,7 @@ Auto Patrol[]"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
- if(!Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40)
+ if(!Adjacent(target) || !isturf(target.loc) || target.AmountParalyzed() < 40)
back_to_hunt()
return
@@ -303,7 +303,7 @@ Auto Patrol[]"},
back_to_idle()
return
- if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
+ if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountParalyzed() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else
@@ -527,7 +527,7 @@ Auto Patrol[]"},
return
if(iscarbon(A))
var/mob/living/carbon/C = A
- if(!C.IsStun() || arrest_type)
+ if(!C.IsStun() || !C.IsParalyzed() || arrest_type)
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
@@ -545,7 +545,7 @@ Auto Patrol[]"},
spawn(2)
icon_state = "[lasercolor]ed209[on]"
var/threat = 5
- C.Knockdown(100)
+ C.Paralyze(100)
C.stuttering = 5
if(ishuman(C))
var/mob/living/carbon/human/H = C
diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm
index bbbf38bdda0e..782d4ddc9506 100644
--- a/code/modules/mob/living/simple_animal/bot/honkbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm
@@ -150,7 +150,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
if (emagged <= 1)
honk_attack(A)
else
- if(!C.IsStun() || arrest_type)
+ if(!C.IsParalyzed() || arrest_type)
stun_attack(A)
..()
else if (!spam_flag) //honking at the ground
@@ -197,7 +197,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
C.stuttering = 20
C.adjustEarDamage(0, 5) //far less damage than the H.O.N.K.
C.Jitter(50)
- C.Knockdown(60)
+ C.Paralyze(60)
var/mob/living/carbon/human/H = C
if(client) //prevent spam from players..
spam_flag = TRUE
@@ -216,7 +216,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
"[src] has honked you!")
else
C.stuttering = 20
- C.Knockdown(80)
+ C.Paralyze(80)
addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntime)
@@ -359,7 +359,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
"[C] trips over [src] and falls!", \
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]")
- C.Knockdown(10)
+ C.Paralyze(10)
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 1, -1)
if(!client)
speak("Honk!")
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index 7167d87bde59..fd446ca75b26 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -85,7 +85,7 @@
if(!on)
icon_state = "medibot0"
return
- if(IsStun())
+ if(IsStun() || IsParalyzed())
icon_state = "medibota"
return
if(mode == BOT_HEALING)
@@ -105,7 +105,7 @@
skin = new_skin
update_icon()
-/mob/living/simple_animal/bot/medbot/update_canmove()
+/mob/living/simple_animal/bot/medbot/update_mobility()
. = ..()
update_icon()
@@ -277,7 +277,7 @@
if(mode == BOT_HEALING)
return
- if(IsStun())
+ if(IsStun() || IsParalyzed())
oldpatient = patient
patient = null
mode = BOT_IDLE
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 5209d0b6f0b9..7a511126e9bd 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -327,8 +327,9 @@
// mousedrop a crate to load the bot
// can load anything if hacked
/mob/living/simple_animal/bot/mulebot/MouseDrop_T(atom/movable/AM, mob/user)
+ var/mob/living/L = user
- if(user.incapacitated() || user.lying)
+ if(user.incapacitated() || (istype(L) && !(L.mobility_flags & MOBILITY_STAND)))
return
if(!istype(AM))
@@ -633,7 +634,7 @@
if(!paicard)
log_combat(src, L, "knocked down")
visible_message("[src] knocks over [L]!")
- L.Knockdown(160)
+ L.Paralyze(160)
return ..()
// called from mob/living/carbon/human/Crossed()
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index 3149b2fd6bf3..0a952daa15ff 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -212,7 +212,7 @@ Auto Patrol: []"},
return
if(iscarbon(A))
var/mob/living/carbon/C = A
- if(!C.IsStun() || arrest_type)
+ if(!C.IsParalyzed() || arrest_type)
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
@@ -253,11 +253,11 @@ Auto Patrol: []"},
var/threat = 5
if(ishuman(C))
C.stuttering = 5
- C.Knockdown(100)
+ C.Paralyze(100)
var/mob/living/carbon/human/H = C
threat = H.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons))
else
- C.Knockdown(100)
+ C.Paralyze(100)
C.stuttering = 5
threat = C.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons))
@@ -311,7 +311,7 @@ Auto Patrol: []"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
- if( !Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40)
+ if( !Adjacent(target) || !isturf(target.loc) || target.AmountParalyzed() < 40)
back_to_hunt()
return
@@ -338,7 +338,7 @@ Auto Patrol: []"},
back_to_idle()
return
- if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
+ if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountParalyzed() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else //Try arresting again if the target escapes.
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index f5f872403deb..2d0547440790 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -358,7 +358,7 @@
if(!LAZYLEN(parts))
if(undismembermerable_limbs) //they have limbs we can't remove, and no parts we can, attack!
return ..()
- C.Knockdown(60)
+ C.Paralyze(60)
visible_message("[src] knocks [C] down!")
to_chat(src, "\"Bring [C.p_them()] to me.\"")
return FALSE
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 5e5b486435bb..5cc9983517e4 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -38,7 +38,7 @@
. = ..()
verbs += /mob/living/proc/lay_down
-/mob/living/simple_animal/pet/cat/update_canmove()
+/mob/living/simple_animal/pet/cat/update_mobility()
..()
if(client && stat != DEAD)
if (resting)
@@ -49,7 +49,6 @@
collar_type = "[initial(collar_type)]"
regenerate_icons()
-
/mob/living/simple_animal/pet/cat/space
name = "space cat"
desc = "It's a cat... in space!"
@@ -172,21 +171,18 @@
emote("me", 1, pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
icon_state = "[icon_living]_rest"
collar_type = "[initial(collar_type)]_rest"
- resting = 1
- update_canmove()
+ set_resting(TRUE)
else if (prob(1))
emote("me", 1, pick("sits down.", "crouches on its hind legs.", "looks alert."))
icon_state = "[icon_living]_sit"
collar_type = "[initial(collar_type)]_sit"
- resting = 1
- update_canmove()
+ set_resting(TRUE)
else if (prob(1))
if (resting)
emote("me", 1, pick("gets up and meows.", "walks around.", "stops resting."))
icon_state = "[icon_living]"
collar_type = "[initial(collar_type)]"
- resting = 0
- update_canmove()
+ set_resting(FALSE)
else
emote("me", 1, pick("grooms its fur.", "twitches its whiskers.", "shakes out its coat."))
diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm
index d7d673ff8b65..1ed6f7abb9f3 100644
--- a/code/modules/mob/living/simple_animal/friendly/crab.dm
+++ b/code/modules/mob/living/simple_animal/friendly/crab.dm
@@ -25,7 +25,7 @@
..()
//CRAB movement
if(!ckey && !stat)
- if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
+ if(isturf(loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
var/east_vs_west = pick(4,8)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm
index 48fe4b321c3b..50da61515722 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm
@@ -207,37 +207,6 @@
else
icon_state = "[visualAppearence]_dead"
-/mob/living/simple_animal/drone/cogscarab/Stun(amount, updating = 1, ignore_canstun = 0)
+/mob/living/simple_animal/drone/cogscarab/update_mobility()
. = ..()
- if(.)
- update_icons()
-
-/mob/living/simple_animal/drone/cogscarab/SetStun(amount, updating = 1, ignore_canstun = 0)
- . = ..()
- if(.)
- update_icons()
-
-/mob/living/simple_animal/drone/cogscarab/AdjustStun(amount, updating = 1, ignore_canstun = 0)
- . = ..()
- if(.)
- update_icons()
-
-/mob/living/simple_animal/drone/cogscarab/Knockdown(amount, updating = 1, ignore_canknockdown = 0)
- . = ..()
- if(.)
- update_icons()
-
-/mob/living/simple_animal/drone/cogscarab/SetKnockdown(amount, updating = 1, ignore_canknockdown = 0)
- . = ..()
- if(.)
- update_icons()
-
-/mob/living/simple_animal/drone/cogscarab/AdjustKnockdown(amount, updating = 1, ignore_canknockdown = 0)
- . = ..()
- if(.)
- update_icons()
-
-/mob/living/simple_animal/drone/cogscarab/update_canmove()
- . = ..()
- if(.)
- update_icons()
+ update_icons()
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 564fae48adff..a285a0b121ff 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -160,7 +160,7 @@
M.visible_message("[M] tips over [src].",
"You tip over [src].")
to_chat(src, "You are tipped over by [M]!")
- Knockdown(60,ignore_canknockdown = TRUE)
+ Paralyze(60,ignore_canknockdown = TRUE)
icon_state = icon_dead
spawn(rand(20,50))
if(!stat && M)
diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm
index 4e7cb0ac70ab..1c653b01c3c0 100644
--- a/code/modules/mob/living/simple_animal/hostile/faithless.dm
+++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm
@@ -40,6 +40,6 @@
. = ..()
if(. && prob(12) && iscarbon(target))
var/mob/living/carbon/C = target
- C.Knockdown(60)
+ C.Paralyze(60)
C.visible_message("\The [src] knocks down \the [C]!", \
"\The [src] knocks you down!")
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm
index 5d1db8d35e1a..17eafd47858d 100644
--- a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm
+++ b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm
@@ -71,7 +71,7 @@
var/atom/throw_target = get_edge_target_turf(L, dir)
L.throw_at(throw_target, rand(1,2), 7, src)
else
- L.Knockdown(20)
+ L.Paralyze(20)
visible_message("[src] knocks [L] down!")
/mob/living/simple_animal/hostile/gorilla/CanAttack(atom/the_target)
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
index d1e8f1f49ed4..d2894772f2b4 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
@@ -31,7 +31,7 @@
/obj/item/projectile/leaper
name = "leaper bubble"
icon_state = "leaper"
- knockdown = 50
+ paralyze = 50
damage = 0
range = 7
hitsound = 'sound/effects/snap.ogg'
@@ -93,7 +93,7 @@
var/mob/living/L = AM
if(!istype(L, /mob/living/simple_animal/hostile/jungle/leaper))
playsound(src,'sound/effects/snap.ogg',50, 1, -1)
- L.Knockdown(50)
+ L.Paralyze(50)
if(iscarbon(L))
var/mob/living/carbon/C = L
C.reagents.add_reagent("leaper_venom", 5)
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index ca5323a9783c..bb6851eedbb4 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -69,7 +69,7 @@
icon_state = initial(icon_state)
if(prob(15) && iscarbon(target))
var/mob/living/carbon/C = target
- C.Knockdown(40)
+ C.Paralyze(40)
C.visible_message("\The [src] knocks down \the [C]!", \
"\The [src] knocks you down!")
@@ -179,7 +179,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
. = ..()
if(knockdown_people && . && prob(15) && iscarbon(target))
var/mob/living/carbon/C = target
- C.Knockdown(40)
+ C.Paralyze(40)
C.visible_message("\The [src] knocks down \the [C]!", \
"\The [src] knocks you down!")
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 3d10bfd12159..ccd1a226a0a5 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -56,7 +56,7 @@
if(iscarbon(target))
var/mob/living/carbon/C = target
if(prob(15))
- C.Knockdown(60)
+ C.Paralyze(60)
C.visible_message("\The [src] knocks down \the [C]!", \
"\The [src] knocks you down!")
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index 29bc2cbff0a0..2f07a61e9ca4 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -94,7 +94,7 @@
if(prob(grasp_pull_chance))
setDir(get_dir(src,L) )//staaaare
step(L,get_dir(L,src)) //reel them in
- L.Knockdown(60) //you can't get away now~
+ L.Paralyze(60) //you can't get away now~
if(grasping.len < max_grasps)
grasping:
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 4fdf431fa069..3dd3aff6772c 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -391,7 +391,7 @@
/mob/living/simple_animal/parrot/handle_automated_movement()
- if(!isturf(src.loc) || !canmove || buckled)
+ if(!isturf(src.loc) || !(mobility_flags & MOBILITY_MOVE) || buckled)
return //If it can't move, dont let it move. (The buckled check probably isn't necessary thanks to canmove)
if(client && stat == CONSCIOUS && parrot_state != icon_living)
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index be2ea6fe94aa..acc8e6f54e47 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -151,7 +151,7 @@
/mob/living/simple_animal/proc/handle_automated_movement()
set waitfor = FALSE
if(!stop_automated_movement && wander)
- if((isturf(src.loc) || allow_movement_on_non_turfs) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
+ if((isturf(loc) || allow_movement_on_non_turfs) && (mobility_flags & MOBILITY_MOVE)) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
if(!(stop_automated_movement_when_pulled && pulledby)) //Some animals don't move when pulled
@@ -328,7 +328,7 @@
health = 0
icon_state = icon_dead
density = FALSE
- lying = 1
+ set_resting(TRUE)
..()
/mob/living/simple_animal/proc/CanAttack(atom/the_target)
@@ -362,7 +362,8 @@
icon = initial(icon)
icon_state = icon_living
density = initial(density)
- lying = 0
+ mobility_flags = MOBILITY_FLAGS_DEFAULT
+ update_mobility()
. = 1
movement_type = initial(movement_type)
@@ -417,17 +418,19 @@
else
..()
-/mob/living/simple_animal/update_canmove(value_otherwise = TRUE)
- if(IsUnconscious() || IsStun() || IsKnockdown() || stat || resting)
+/mob/living/simple_animal/update_mobility(value_otherwise = TRUE)
+ if(IsUnconscious() || IsParalyzed() || IsStun() || IsKnockdown() || IsParalyzed() || stat || resting)
drop_all_held_items()
- canmove = FALSE
+ mobility_flags = NONE
else if(buckled)
- canmove = FALSE
+ mobility_flags = MOBILITY_FLAGS_INTERACTION
else
- canmove = value_otherwise
+ if(value_otherwise)
+ mobility_flags = MOBILITY_FLAGS_DEFAULT
+ else
+ mobility_flags = NONE
update_transform()
update_action_buttons_icon()
- return canmove
/mob/living/simple_animal/update_transform()
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
diff --git a/code/modules/mob/living/simple_animal/slime/death.dm b/code/modules/mob/living/simple_animal/slime/death.dm
index 52c92102630e..74d68719b2c6 100644
--- a/code/modules/mob/living/simple_animal/slime/death.dm
+++ b/code/modules/mob/living/simple_animal/slime/death.dm
@@ -24,8 +24,6 @@
stat = DEAD
cut_overlays()
- update_canmove()
-
if(SSticker.mode)
SSticker.mode.check_win()
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index 161362c1877d..579fa7deab1d 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -70,7 +70,7 @@
if(Target.Adjacent(src))
Target.attack_slime(src)
return
- if(!Target.lying && prob(80))
+ if((Target.mobility_flags & MOBILITY_STAND) && prob(80))
if(Target.client && Target.health >= 20)
if(!Atkcool)
@@ -140,12 +140,12 @@
stat = UNCONSCIOUS
powerlevel = 0
rabid = 0
- update_canmove()
+ update_mobility()
regenerate_icons()
else if(stat == UNCONSCIOUS && !stasis)
to_chat(src, "You wake up from the stasis.")
stat = CONSCIOUS
- update_canmove()
+ update_mobility()
regenerate_icons()
updatehealth()
@@ -278,9 +278,9 @@
/mob/living/simple_animal/slime/proc/handle_targets()
if(Tempstun)
if(!buckled) // not while they're eating!
- canmove = 0
+ mobility_flags &= ~MOBILITY_MOVE
else
- canmove = 1
+ mobility_flags |= MOBILITY_MOVE
if(attacked > 50)
attacked = 50
@@ -298,7 +298,7 @@
Discipline--
if(!client)
- if(!canmove)
+ if(!(mobility_flags & MOBILITY_MOVE))
return
if(buckled)
@@ -383,13 +383,13 @@
if (Leader)
if(holding_still)
holding_still = max(holding_still - 1, 0)
- else if(canmove && isturf(loc))
+ else if((mobility_flags & MOBILITY_MOVE) && isturf(loc))
step_to(src, Leader)
else if(hungry)
if (holding_still)
holding_still = max(holding_still - hungry, 0)
- else if(canmove && isturf(loc) && prob(50))
+ else if((mobility_flags & MOBILITY_MOVE) && isturf(loc) && prob(50))
step(src, pick(GLOB.cardinals))
else
@@ -397,7 +397,7 @@
holding_still = max(holding_still - 1, 0)
else if (docile && pulledby)
holding_still = 10
- else if(canmove && isturf(loc) && prob(33))
+ else if((mobility_flags & MOBILITY_MOVE) && isturf(loc) && prob(33))
step(src, pick(GLOB.cardinals))
else if(!AIproc)
INVOKE_ASYNC(src, .proc/AIprocess)
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index baea2ec84df6..bba5e1aad2b3 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -456,13 +456,13 @@
SStun = world.time + rand(20,60)
spawn(0)
- canmove = 0
+ mobility_flags &= ~MOBILITY_MOVE
if(user)
step_away(src,user,15)
sleep(3)
if(user)
step_away(src,user,15)
- update_canmove()
+ update_mobility()
/mob/living/simple_animal/slime/pet
docile = 1
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index 5baa42ffa23a..efb698971842 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -5,7 +5,7 @@
////////////////////////////// STUN ////////////////////////////////////
-/mob/living/IsStun() //If we're stunned
+/mob/living/proc/IsStun() //If we're stunned
return has_status_effect(STATUS_EFFECT_STUN)
/mob/living/proc/AmountStun() //How many deciseconds remain in our stun
@@ -15,6 +15,8 @@
return 0
/mob/living/proc/Stun(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
@@ -26,6 +28,8 @@
return S
/mob/living/proc/SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(amount <= 0)
@@ -41,6 +45,8 @@
return S
/mob/living/proc/AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_STUN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
@@ -53,7 +59,7 @@
///////////////////////////////// KNOCKDOWN /////////////////////////////////////
-/mob/living/IsKnockdown() //If we're knocked down
+/mob/living/proc/IsKnockdown() //If we're knocked down
return has_status_effect(STATUS_EFFECT_KNOCKDOWN)
/mob/living/proc/AmountKnockdown() //How many deciseconds remain in our knockdown
@@ -62,9 +68,11 @@
return K.duration - world.time
return 0
-/mob/living/proc/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Can't go below remaining duration
- if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
- if(absorb_stun(amount, ignore_canknockdown))
+/mob/living/proc/Knockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
@@ -73,14 +81,16 @@
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
-/mob/living/proc/SetKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Sets remaining duration
- if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
+/mob/living/proc/SetKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(amount <= 0)
if(K)
qdel(K)
else
- if(absorb_stun(amount, ignore_canknockdown))
+ if(absorb_stun(amount, ignore_canstun))
return
if(K)
K.duration = world.time + amount
@@ -88,9 +98,11 @@
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
-/mob/living/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Adds to remaining duration
- if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
- if(absorb_stun(amount, ignore_canknockdown))
+/mob/living/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_KNOCKDOWN, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
@@ -99,6 +111,230 @@
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating)
return K
+///////////////////////////////// IMMOBILIZED ////////////////////////////////////
+/mob/living/proc/IsImmobilized() //If we're immobilized
+ return has_status_effect(STATUS_EFFECT_IMMOBILIZED)
+
+/mob/living/proc/AmountImmobilized() //How many deciseconds remain in our Immobilized status effect
+ var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
+ if(I)
+ return I.duration - world.time
+ return 0
+
+/mob/living/proc/Immobilize(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
+ if(I)
+ I.duration = max(world.time + amount, I.duration)
+ else if(amount > 0)
+ I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
+ return I
+
+/mob/living/proc/SetImmobilized(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
+ if(amount <= 0)
+ if(I)
+ qdel(I)
+ else
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ if(I)
+ I.duration = world.time + amount
+ else
+ I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
+ return I
+
+/mob/living/proc/AdjustImmobilized(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_IMMOBILIZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
+ if(I)
+ I.duration += amount
+ else if(amount > 0)
+ I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
+ return I
+
+///////////////////////////////// PARALYZED //////////////////////////////////
+/mob/living/proc/IsParalyzed() //If we're immobilized
+ return has_status_effect(STATUS_EFFECT_PARALYZED)
+
+/mob/living/proc/AmountParalyzed() //How many deciseconds remain in our Paralyzed status effect
+ var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed()
+ if(P)
+ return P.duration - world.time
+ return 0
+
+/mob/living/proc/Paralyze(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed()
+ if(P)
+ P.duration = max(world.time + amount, P.duration)
+ else if(amount > 0)
+ P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
+ return P
+
+/mob/living/proc/SetParalyzed(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed()
+ if(amount <= 0)
+ if(P)
+ qdel(P)
+ else
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ if(P)
+ P.duration = world.time + amount
+ else
+ P = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount, updating)
+ return P
+
+/mob/living/proc/AdjustParalyzed(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_PARALYZE, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ if(absorb_stun(amount, ignore_canstun))
+ return
+ var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed()
+ if(P)
+ P.duration += amount
+ else if(amount > 0)
+ P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount, updating)
+ return P
+
+//Blanket
+/mob/living/proc/AllImmobility(amount, updating)
+ Paralyze(amount, FALSE)
+ Knockdown(amount, FALSE)
+ Stun(amount, FALSE)
+ Immobilize(amount, FALSE)
+ if(updating)
+ update_mobility()
+
+/mob/living/proc/SetAllImmobility(amount, updating)
+ SetParalyzed(amount, FALSE)
+ SetKnockdown(amount, FALSE)
+ SetStun(amount, FALSE)
+ SetImmobilized(amount, FALSE)
+ if(updating)
+ update_mobility()
+
+/mob/living/proc/AdjustAllImmobility(amount, updating)
+ AdjustParalyzed(amount, FALSE)
+ AdjustKnockdown(amount, FALSE)
+ AdjustStun(amount, FALSE)
+ AdjustImmobilized(amount, FALSE)
+ if(updating)
+ update_mobility()
+
+//////////////////UNCONSCIOUS
+/mob/living/proc/IsUnconscious() //If we're unconscious
+ return has_status_effect(STATUS_EFFECT_UNCONSCIOUS)
+
+/mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(U)
+ return U.duration - world.time
+ return 0
+
+/mob/living/proc/Unconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(U)
+ U.duration = max(world.time + amount, U.duration)
+ else if(amount > 0)
+ U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
+ return U
+
+/mob/living/proc/SetUnconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(amount <= 0)
+ if(U)
+ qdel(U)
+ else if(U)
+ U.duration = world.time + amount
+ else
+ U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
+ return U
+
+/mob/living/proc/AdjustUnconscious(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
+ if(U)
+ U.duration += amount
+ else if(amount > 0)
+ U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
+ return U
+
+/////////////////////////////////// SLEEPING ////////////////////////////////////
+
+/mob/living/proc/IsSleeping() //If we're asleep
+ return has_status_effect(STATUS_EFFECT_SLEEPING)
+
+/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
+ var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
+ if(S)
+ return S.duration - world.time
+ return 0
+
+/mob/living/proc/Sleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
+ if(S)
+ S.duration = max(world.time + amount, S.duration)
+ else if(amount > 0)
+ S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
+ return S
+
+/mob/living/proc/SetSleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
+ if(amount <= 0)
+ if(S)
+ qdel(S)
+ else if(S)
+ S.duration = world.time + amount
+ else
+ S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
+ return S
+
+/mob/living/proc/AdjustSleeping(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
+ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN)
+ return
+ if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_canstun)
+ var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
+ if(S)
+ S.duration += amount
+ else if(amount > 0)
+ S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
+ return S
+
///////////////////////////////// FROZEN /////////////////////////////////////
/mob/living/proc/IsFrozen()
@@ -207,7 +443,7 @@
add_trait(TRAIT_DEATHCOMA, source)
tod = station_time_timestamp()
update_stat()
-
+
/mob/living/proc/unignore_slowdown(list/sources)
remove_trait(TRAIT_IGNORESLOWDOWN, sources)
update_movespeed(FALSE)
diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm
index 383c8d8d6151..2a9744494d70 100644
--- a/code/modules/mob/living/ventcrawling.dm
+++ b/code/modules/mob/living/ventcrawling.dm
@@ -11,7 +11,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, typecacheof(list(
if(stat)
to_chat(src, "You must be conscious to do this!")
return
- if(lying)
+ if(IsStun() || IsParalyzed())
to_chat(src, "You can't vent crawl while you're stunned!")
return
if(restrained())
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index afec20927442..e565bccaf9c2 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -184,7 +184,7 @@
/mob/proc/restrained(ignore_grab)
return
-/mob/proc/incapacitated(ignore_restraints, ignore_grab)
+/mob/proc/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, check_immobilized = FALSE)
return
//This proc is called whenever someone clicks an inventory ui slot.
@@ -605,8 +605,6 @@
// facing verbs
/mob/proc/canface()
- if(!canmove)
- return FALSE
if(world.time < client.last_turn)
return FALSE
if(stat == DEAD || stat == UNCONSCIOUS)
@@ -619,8 +617,10 @@
return FALSE
return TRUE
-/mob/proc/fall(forced)
- drop_all_held_items()
+/mob/living/canface()
+ if(!(mobility_flags & MOBILITY_MOVE))
+ return FALSE
+ return ..()
/mob/verb/eastface()
set hidden = TRUE
@@ -889,7 +889,6 @@
/mob/proc/get_idcard(hand_first)
return
-
/mob/vv_get_dropdown()
. = ..()
. += "---"
@@ -917,3 +916,5 @@
var/datum/language_holder/H = get_language_holder()
H.open_language_menu(usr)
+
+
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index f813a7259584..dd169e195244 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -8,11 +8,17 @@
pressure_resistance = 8
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
throwforce = 10
+
var/lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
var/datum/mind/mind
+ var/static/next_mob_id = 0
+
+ //MOVEMENT SPEED
+ var/list/movespeed_modification //Lazy list, see mob_movespeed.dm
+ var/cached_multiplicative_slowdown
+ //ACTIONS
var/list/datum/action/actions = list()
var/list/datum/action/chameleon_item_actions
- var/static/next_mob_id = 0
var/stat = CONSCIOUS //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
@@ -34,15 +40,6 @@
var/eye_blurry = 0 //Carbon
var/real_name = null
var/spacewalk = FALSE
- var/resting = 0 //Carbon
- var/lying = 0
- var/lying_prev = 0
- var/canmove = 1
-
- //MOVEMENT SPEED
- var/list/movespeed_modification //Lazy list, see mob_movespeed.dm
- var/cached_multiplicative_slowdown
- /////////////////
var/name_archive //For admin things like possession
@@ -66,11 +63,10 @@
var/list/held_items = list() //len = number of hands, eg: 2 nulls is 2 empty hands, 1 item and 1 null is 1 full hand and 1 empty hand.
//held_items[active_hand_index] is the actively held item, but please use get_active_held_item() instead, because OOP
- var/datum/component/storage/active_storage = null//Carbon
-
+ //HUD things
+ var/datum/component/storage/active_storage
var/datum/hud/hud_used = null
-
- var/research_scanner = 0 //For research scanner equipped mobs. Enable to show research data when examining.
+ var/research_scanner = FALSE
var/in_throw_mode = 0
@@ -84,7 +80,6 @@
var/list/mob_spell_list = list() //construct spells and mime spells. Spells that do not transfer from one mob to another and can not be lost in mindswap.
-
var/status_flags = CANSTUN|CANKNOCKDOWN|CANUNCONSCIOUS|CANPUSH //bitflags defining which status effects can be inflicted (replaces canknockdown, canstun, etc)
var/digitalcamo = 0 // Can they be tracked by the AI?
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 27e7cb69eb0e..8365ad5d3d3f 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -1,14 +1,17 @@
/mob/CanPass(atom/movable/mover, turf/target)
+ return TRUE //There's almost no cases where non /living mobs should be used in game as actual mobs, other than ghosts.
+
+/mob/living/CanPass(atom/movable/mover, turf/target)
if((mover.pass_flags & PASSMOB))
return TRUE
if(istype(mover, /obj/item/projectile) || mover.throwing)
- return (!density || lying)
+ return (!density || !(mobility_flags & MOBILITY_STAND))
if(buckled == mover)
return TRUE
if(ismob(mover))
if (mover in buckled_mobs)
return TRUE
- return (!mover.density || !density || lying)
+ return (!mover.density || !density || !(mobility_flags & MOBILITY_STAND))
//DO NOT USE THIS UNLESS YOU ABSOLUTELY HAVE TO. THIS IS BEING PHASED OUT FOR THE MOVESPEED MODIFICATION SYSTEM.
//See mob_movespeed.dm
@@ -75,7 +78,7 @@
if(mob.buckled) //if we're buckled to something, tell it we moved.
return mob.buckled.relaymove(mob, direct)
- if(!mob.canmove)
+ if(!(L.mobility_flags & MOBILITY_MOVE))
return FALSE
if(isobj(mob.loc) || ismob(mob.loc)) //Inside an object, tell it we moved
diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm
index aae14e6885a2..95daf4700394 100644
--- a/code/modules/mob/status_procs.dm
+++ b/code/modules/mob/status_procs.dm
@@ -3,126 +3,7 @@
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, TRAIT_BLIND trait, and TRAIT_NEARSIGHT trait.
-/////////////////////////////////// STUN ////////////////////////////////////
-/mob/proc/IsStun() //non-living mobs shouldn't be stunned
- return FALSE
-
-/////////////////////////////////// KNOCKDOWN ////////////////////////////////////
-
-/mob/proc/IsKnockdown() //non-living mobs shouldn't be knocked down
- return FALSE
-
-/////////////////////////////////// UNCONSCIOUS ////////////////////////////////////
-
-/mob/proc/IsUnconscious() //non-living mobs shouldn't be unconscious
- return FALSE
-
-/mob/living/IsUnconscious() //If we're unconscious
- return has_status_effect(STATUS_EFFECT_UNCONSCIOUS)
-
-/mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness
- var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
- if(U)
- return U.duration - world.time
- return 0
-
-/mob/living/proc/Unconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Can't go below remaining duration
- if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious)
- var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
- if(U)
- U.duration = max(world.time + amount, U.duration)
- else if(amount > 0)
- U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
- return U
-
-/mob/living/proc/SetUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Sets remaining duration
- if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious)
- var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
- if(amount <= 0)
- if(U)
- qdel(U)
- else if(U)
- U.duration = world.time + amount
- else
- U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
- return U
-
-/mob/living/proc/AdjustUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Adds to remaining duration
- if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious)
- var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
- if(U)
- U.duration += amount
- else if(amount > 0)
- U = apply_status_effect(STATUS_EFFECT_UNCONSCIOUS, amount, updating)
- return U
-
-/////////////////////////////////// SLEEPING ////////////////////////////////////
-
-/mob/proc/IsSleeping() //non-living mobs shouldn't be sleeping either
- return FALSE
-
-/mob/living/IsSleeping() //If we're asleep
- return has_status_effect(STATUS_EFFECT_SLEEPING)
-
-/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
- var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
- if(S)
- return S.duration - world.time
- return 0
-
-/mob/living/proc/Sleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Can't go below remaining duration
- if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
- var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
- if(S)
- S.duration = max(world.time + amount, S.duration)
- else if(amount > 0)
- S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
- return S
-
-/mob/living/proc/SetSleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Sets remaining duration
- if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
- var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
- if(amount <= 0)
- if(S)
- qdel(S)
- else if(S)
- S.duration = world.time + amount
- else
- S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
- return S
-
-/mob/living/proc/AdjustSleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Adds to remaining duration
- if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
- var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
- if(S)
- S.duration += amount
- else if(amount > 0)
- S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount, updating)
- return S
-
-/////////////////////////////////// RESTING ////////////////////////////////////
-
-/mob/proc/Resting(amount)
- resting = max(max(resting,amount),0)
-
-/mob/living/Resting(amount)
- ..()
- update_canmove()
-
-/mob/proc/SetResting(amount)
- resting = max(amount,0)
-
-/mob/living/SetResting(amount)
- ..()
- update_canmove()
-
-/mob/proc/AdjustResting(amount)
- resting = max(resting + amount,0)
-
-/mob/living/AdjustResting(amount)
- ..()
- update_canmove()
/////////////////////////////////// JITTERINESS ////////////////////////////////////
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index d35a99adad5a..68c7ea02ae3a 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -29,9 +29,8 @@
dropItemToGround(W)
//Make mob invisible and spawn animation
- notransform = 1
- canmove = 0
- Stun(22, ignore_canstun = TRUE)
+ notransform = TRUE
+ Paralyze(22, ignore_canstun = TRUE)
icon = null
cut_overlays()
invisibility = INVISIBILITY_MAXIMUM
@@ -183,9 +182,9 @@
//Make mob invisible and spawn animation
- notransform = 1
- canmove = 0
- Stun(22, ignore_canstun = TRUE)
+ notransform = TRUE
+ Paralyze(22, ignore_canstun = TRUE)
+
icon = null
cut_overlays()
invisibility = INVISIBILITY_MAXIMUM
@@ -313,11 +312,11 @@
/mob/living/carbon/AIize()
if (notransform)
return
+ notransform = TRUE
+ Paralyze(1, ignore_canstun = TRUE)
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
- notransform = 1
- canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
return ..()
@@ -354,14 +353,15 @@
/mob/living/carbon/human/proc/Robotize(delete_items = 0, transfer_after = TRUE)
if (notransform)
return
+ notransform = TRUE
+ Paralyze(1, ignore_canstun = TRUE)
+
for(var/obj/item/W in src)
if(delete_items)
qdel(W)
else
dropItemToGround(W)
regenerate_icons()
- notransform = 1
- canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts)
@@ -399,11 +399,11 @@
/mob/living/carbon/human/proc/Alienize()
if (notransform)
return
+ notransform = TRUE
+ mobility_flags = NONE
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
- notransform = 1
- canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts)
@@ -429,11 +429,11 @@
/mob/living/carbon/human/proc/slimeize(reproduce as num)
if (notransform)
return
+ notransform = TRUE
+ mobility_flags = NONE
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
- notransform = 1
- canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts)
@@ -468,11 +468,11 @@
/mob/living/carbon/human/proc/corgize()
if (notransform)
return
+ notransform = TRUE
+ Paralyze(1, ignore_canstun = TRUE)
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
- notransform = 1
- canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
for(var/t in bodyparts) //this really should not be necessary
@@ -489,6 +489,8 @@
/mob/living/carbon/proc/gorillize()
if(notransform)
return
+ notransform = TRUE
+ Paralyze(1, ignore_canstun = TRUE)
SSblackbox.record_feedback("amount", "gorillas_created", 1)
@@ -498,8 +500,6 @@
dropItemToGround(W, TRUE)
regenerate_icons()
- notransform = TRUE
- canmove = FALSE
icon = null
invisibility = INVISIBILITY_MAXIMUM
var/mob/living/simple_animal/hostile/gorilla/new_gorilla = new (get_turf(src))
@@ -523,12 +523,13 @@
if(notransform)
return
+ notransform = TRUE
+ Paralyze(1, ignore_canstun = TRUE)
+
for(var/obj/item/W in src)
dropItemToGround(W)
regenerate_icons()
- notransform = 1
- canmove = 0
icon = null
invisibility = INVISIBILITY_MAXIMUM
diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm
index adc75ec7c0ac..d5c2499a3ce0 100644
--- a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm
@@ -7,10 +7,12 @@
H.SetUnconscious(0)
H.SetStun(0)
H.SetKnockdown(0)
+ H.SetImmobilized(0)
+ H.SetParalyzed(0)
H.adjustStaminaLoss(-75)
H.stuttering = 0
H.lying = 0
- H.update_canmove()
+ H.update_mobility()
H.reagents.add_reagent("stimulants", 5)
H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"), forced = "ninjaboost")
a_boost--
diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm
index bc873a058ddb..3c5bfeea9ea9 100644
--- a/code/modules/paperwork/paperbin.dm
+++ b/code/modules/paperwork/paperbin.dm
@@ -60,8 +60,10 @@
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/paper_bin/attack_hand(mob/user)
- if(user.lying)
- return
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_PICKUP))
+ return
user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/pen/P = bin_pen
diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm
index 0ccb1d1fa7b9..9b15aaead712 100644
--- a/code/modules/paperwork/paperplane.dm
+++ b/code/modules/paperwork/paperplane.dm
@@ -95,7 +95,7 @@
visible_message("\The [src] hits [H] in the eye!")
H.adjust_blurriness(6)
H.adjust_eye_damage(rand(6,8))
- H.Knockdown(40)
+ H.Paralyze(40)
H.emote("scream")
/obj/item/paper/examine(mob/user)
diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm
index 99e61cf3f0f8..48cc4f0b6b1e 100644
--- a/code/modules/photography/photos/photo.dm
+++ b/code/modules/photography/photos/photo.dm
@@ -88,6 +88,6 @@
var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
- if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && usr.canmove && !usr.restrained())
+ if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && !usr.incapacitated())
name = "photo[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm
index 491be4a83dca..c98b5fa7de87 100644
--- a/code/modules/power/singularity/containment_field.dm
+++ b/code/modules/power/singularity/containment_field.dm
@@ -108,7 +108,7 @@
var/shock_damage = min(rand(30,40),rand(30,40))
if(iscarbon(user))
- user.Knockdown(300)
+ user.Paralyze(300)
user.electrocute_act(shock_damage, src, 1)
else if(issilicon(user))
diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm
index 425fa3f50966..7ac4f6d738e3 100644
--- a/code/modules/projectiles/guns/ballistic/revolver.dm
+++ b/code/modules/projectiles/guns/ballistic/revolver.dm
@@ -358,4 +358,4 @@
user.visible_message("[user] somehow manages to shoot [user.p_them()]self in the face!", "You somehow shoot yourself in the face! How the hell?!")
user.emote("scream")
user.drop_all_held_items()
- user.Knockdown(80)
+ user.Paralyze(80)
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 3b3a9787350d..ab8441aa749c 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -87,6 +87,8 @@
//Effects
var/stun = 0
var/knockdown = 0
+ var/paralyze = 0
+ var/immobilize = 0
var/unconscious = 0
var/irradiate = 0
var/stutter = 0
@@ -212,7 +214,7 @@
else
L.log_message("has been shot by [firer] with [src]", LOG_ATTACK, color="orange")
- return L.apply_effects(stun, knockdown, unconscious, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
+ return L.apply_effects(stun, knockdown, unconscious, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter, paralyze, immobilize)
/obj/item/projectile/proc/vol_by_damage()
if(src.damage)
@@ -287,11 +289,10 @@
var/turf/T = get_turf(A)
if(original in T)
return original
- var/list/mob/possible_mobs = typecache_filter_list(T, GLOB.typecache_mob) - A
+ var/list/mob/living/possible_mobs = typecache_filter_list(T, GLOB.typecache_mob) - A
var/list/mob/mobs = list()
- for(var/i in possible_mobs)
- var/mob/M = i
- if(M.lying)
+ for(var/mob/living/M in possible_mobs)
+ if(!(M.mobility_flags & MOBILITY_STAND))
continue
mobs += M
var/mob/M = safepick(mobs)
diff --git a/code/modules/projectiles/projectile/bullets/shotgun.dm b/code/modules/projectiles/projectile/bullets/shotgun.dm
index 457ec78e9bc4..52f5260e5a33 100644
--- a/code/modules/projectiles/projectile/bullets/shotgun.dm
+++ b/code/modules/projectiles/projectile/bullets/shotgun.dm
@@ -18,7 +18,7 @@
/obj/item/projectile/bullet/shotgun_stunslug
name = "stunslug"
damage = 5
- knockdown = 100
+ paralyze = 100
stutter = 5
jitter = 20
range = 7
@@ -30,7 +30,7 @@
icon = 'icons/obj/meteor.dmi'
icon_state = "dust"
damage = 20
- knockdown = 80
+ paralyze = 80
hitsound = 'sound/effects/meteorimpact.ogg'
/obj/item/projectile/bullet/shotgun_meteorslug/on_hit(atom/target, blocked = FALSE)
@@ -47,7 +47,7 @@
/obj/item/projectile/bullet/shotgun_frag12
name ="frag12 slug"
damage = 25
- knockdown = 50
+ paralyze = 50
/obj/item/projectile/bullet/shotgun_frag12/on_hit(atom/target, blocked = FALSE)
..()
diff --git a/code/modules/projectiles/projectile/bullets/sniper.dm b/code/modules/projectiles/projectile/bullets/sniper.dm
index 78be94339c15..f2206a797017 100644
--- a/code/modules/projectiles/projectile/bullets/sniper.dm
+++ b/code/modules/projectiles/projectile/bullets/sniper.dm
@@ -4,7 +4,7 @@
name =".50 bullet"
speed = 0.4
damage = 70
- knockdown = 100
+ paralyze = 100
dismemberment = 50
armour_penetration = 50
var/breakthings = TRUE
@@ -20,7 +20,7 @@
armour_penetration = 0
damage = 0
dismemberment = 0
- knockdown = 0
+ paralyze = 0
breakthings = FALSE
/obj/item/projectile/bullet/p50/soporific/on_hit(atom/target, blocked = FALSE)
@@ -36,5 +36,5 @@
damage = 60
forcedodge = TRUE
dismemberment = 0 //It goes through you cleanly.
- knockdown = 0
+ paralyze = 0
breakthings = FALSE
diff --git a/code/modules/projectiles/projectile/bullets/special.dm b/code/modules/projectiles/projectile/bullets/special.dm
index f6782fac0104..3a92c98d7942 100644
--- a/code/modules/projectiles/projectile/bullets/special.dm
+++ b/code/modules/projectiles/projectile/bullets/special.dm
@@ -3,7 +3,7 @@
/obj/item/projectile/bullet/honker
name = "banana"
damage = 0
- knockdown = 60
+ paralyze = 60
forcedodge = TRUE
nodamage = TRUE
hitsound = 'sound/items/bikehorn.ogg'
diff --git a/code/modules/projectiles/projectile/energy/ebow.dm b/code/modules/projectiles/projectile/energy/ebow.dm
index 3e65bbfad237..640d4d11976d 100644
--- a/code/modules/projectiles/projectile/energy/ebow.dm
+++ b/code/modules/projectiles/projectile/energy/ebow.dm
@@ -4,7 +4,7 @@
damage = 8
damage_type = TOX
nodamage = 0
- knockdown = 100
+ paralyze = 100
stutter = 5
/obj/item/projectile/energy/bolt/halloween
diff --git a/code/modules/projectiles/projectile/energy/misc.dm b/code/modules/projectiles/projectile/energy/misc.dm
index 86f4cc060c34..e903e5ca47d9 100644
--- a/code/modules/projectiles/projectile/energy/misc.dm
+++ b/code/modules/projectiles/projectile/energy/misc.dm
@@ -11,5 +11,5 @@
icon_state = "toxin"
damage = 5
damage_type = TOX
- knockdown = 100
+ paralyze = 100
range = 7
diff --git a/code/modules/projectiles/projectile/energy/net_snare.dm b/code/modules/projectiles/projectile/energy/net_snare.dm
index f5d06073416c..691b978ea9e0 100644
--- a/code/modules/projectiles/projectile/energy/net_snare.dm
+++ b/code/modules/projectiles/projectile/energy/net_snare.dm
@@ -59,7 +59,7 @@
name = "energy snare"
icon_state = "e_snare"
nodamage = 1
- knockdown = 20
+ paralyze = 20
hitsound = 'sound/weapons/taserhit.ogg'
range = 4
@@ -79,7 +79,7 @@
name = "Energy Bola"
icon_state = "e_snare"
nodamage = 1
- knockdown = 0
+ paralyze = 0
hitsound = 'sound/weapons/taserhit.ogg'
range = 10
diff --git a/code/modules/projectiles/projectile/energy/stun.dm b/code/modules/projectiles/projectile/energy/stun.dm
index db1ad403a76f..bc75899aa713 100644
--- a/code/modules/projectiles/projectile/energy/stun.dm
+++ b/code/modules/projectiles/projectile/energy/stun.dm
@@ -3,7 +3,7 @@
icon_state = "spark"
color = "#FFFF00"
nodamage = 1
- knockdown = 100
+ paralyze = 100
stutter = 5
jitter = 20
hitsound = 'sound/weapons/taserhit.ogg'
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 4060060ac4f9..2e240801eb2d 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -124,8 +124,8 @@
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags))
return
- M.notransform = 1
- M.canmove = 0
+ M.notransform = TRUE
+ M.mobility_flags = NONE
M.icon = null
M.cut_overlays()
M.invisibility = INVISIBILITY_ABSTRACT
diff --git a/code/modules/projectiles/projectile/special/curse.dm b/code/modules/projectiles/projectile/special/curse.dm
index adce5dad5755..362c34eb7f3d 100644
--- a/code/modules/projectiles/projectile/special/curse.dm
+++ b/code/modules/projectiles/projectile/special/curse.dm
@@ -9,7 +9,7 @@
layer = LARGE_MOB_LAYER
damage_type = BURN
damage = 10
- knockdown = 20
+ paralyze = 20
speed = 2
range = 16
forcedodge = TRUE
diff --git a/code/modules/projectiles/projectile/special/hallucination.dm b/code/modules/projectiles/projectile/special/hallucination.dm
index f65ebce51f7e..0c57e9b20f57 100644
--- a/code/modules/projectiles/projectile/special/hallucination.dm
+++ b/code/modules/projectiles/projectile/special/hallucination.dm
@@ -166,7 +166,7 @@
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/taser/hal_apply_effect()
- hal_target.Knockdown(100)
+ hal_target.Paralyze(100)
hal_target.stuttering += 20
if(hal_target.dna && hal_target.dna.check_mutation(HULK))
hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
@@ -199,7 +199,7 @@
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/ebow/hal_apply_effect()
- hal_target.Knockdown(100)
+ hal_target.Paralyze(100)
hal_target.stuttering += 5
hal_target.adjustStaminaLoss(8)
diff --git a/code/modules/projectiles/projectile/special/neurotoxin.dm b/code/modules/projectiles/projectile/special/neurotoxin.dm
index 46027e7bdf33..fc7928c88d78 100644
--- a/code/modules/projectiles/projectile/special/neurotoxin.dm
+++ b/code/modules/projectiles/projectile/special/neurotoxin.dm
@@ -3,10 +3,10 @@
icon_state = "neurotoxin"
damage = 5
damage_type = TOX
- knockdown = 100
+ paralyze = 100
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = FALSE)
if(isalien(target))
- knockdown = 0
+ paralyze = 0
nodamage = TRUE
return ..()
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index c9c5a4be972a..ede249e39558 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -308,7 +308,7 @@
addiction_tick++
if(C && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates.
C.updatehealth()
- C.update_canmove()
+ C.update_mobility()
C.update_stamina()
update_total()
@@ -596,11 +596,13 @@
R.on_new(data)
if(isliving(my_atom))
- if(!istype(R, /datum/reagent/medicine/synthflesh) && ishuman(my_atom)) //yogs start - snowflake synth check
+ //yogs start - snowflake synth check
+ if(!istype(R, /datum/reagent/medicine/synthflesh) && ishuman(my_atom))
var/mob/living/carbon/human/H = my_atom
if(istype(H.dna.species, /datum/species/synth))
return
- R.on_mob_add(my_atom) //yogs end //Must occur befor it could posibly run on_mob_delete
+ R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete
+ //yogs end
update_total()
if(my_atom)
my_atom.on_reagent_change(ADD_REAGENT)
diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
index f9dbd1928bde..75e73ab57170 100644
--- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
@@ -1332,7 +1332,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A drink that is guaranteed to knock you silly."
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/M)
- M.Knockdown(60, 1, 0)
+ M.Paralyze(60, 1, 0)
M.dizziness +=2
switch(current_cycle)
if(15 to 45)
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index 989c5a9b8284..54490ae0520f 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -19,7 +19,7 @@
/datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/M)
M.set_drugginess(15)
if(isturf(M.loc) && !isspaceturf(M.loc))
- if(M.canmove)
+ if(M.mobility_flags & MOBILITY_MOVE)
if(prob(10))
step(M, pick(GLOB.cardinals))
if(prob(7))
@@ -50,9 +50,11 @@
var/smoke_message = pick("You feel relaxed.", "You feel calmed.","You feel alert.","You feel rugged.")
to_chat(M, "[smoke_message]")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "smoked", /datum/mood_event/smoked, name)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
- M.AdjustUnconscious(-20, 0)
+ M.AdjustStun(-20, FALSE)
+ M.AdjustKnockdown(-20, FALSE)
+ M.AdjustUnconscious(-20, FALSE)
+ M.AdjustParalyzed(-20, FALSE)
+ M.AdjustImmobilized(-20, FALSE)
M.adjustStaminaLoss(-0.5*REM, 0)
..()
. = 1
@@ -70,9 +72,11 @@
if(prob(5))
var/high_message = pick("You feel jittery.", "You feel like you gotta go fast.", "You feel like you need to step it up.")
to_chat(M, "[high_message]")
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
- M.AdjustUnconscious(-20, 0)
+ M.AdjustStun(-20, FALSE)
+ M.AdjustKnockdown(-20, FALSE)
+ M.AdjustUnconscious(-20, FALSE)
+ M.AdjustImmobilized(-20, FALSE)
+ M.AdjustParalyzed(-20, FALSE)
..()
. = 1
@@ -177,9 +181,11 @@
var/high_message = pick("You feel hyper.", "You feel like you need to go faster.", "You feel like you can run the world.")
if(prob(5))
to_chat(M, "[high_message]")
- M.AdjustStun(-40, 0)
- M.AdjustKnockdown(-40, 0)
- M.AdjustUnconscious(-40, 0)
+ M.AdjustStun(-40, FALSE)
+ M.AdjustKnockdown(-40, FALSE)
+ M.AdjustUnconscious(-40, FALSE)
+ M.AdjustParalyzed(-40, FALSE)
+ M.AdjustImmobilized(-40, FALSE)
M.adjustStaminaLoss(-2, 0)
M.Jitter(2)
M.adjustBrainLoss(rand(1,4))
@@ -189,7 +195,7 @@
. = 1
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i in 1 to 4)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -216,7 +222,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 4, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -226,7 +232,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(20)
@@ -271,7 +277,7 @@
M.adjustStaminaLoss(-5, 0)
M.adjustBrainLoss(4)
M.hallucination += 5
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
step(M, pick(GLOB.cardinals))
step(M, pick(GLOB.cardinals))
..()
@@ -279,7 +285,7 @@
/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
M.hallucination += 5
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i in 1 to 8)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -290,7 +296,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
M.hallucination += 10
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(5)
@@ -301,7 +307,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M)
M.hallucination += 20
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(10)
@@ -313,7 +319,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M)
M.hallucination += 30
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 12, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -325,7 +331,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M)
M.hallucination += 30
- if(M.canmove && !ismovableatom(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
for(var/i = 0, i < 16, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(50)
diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm
index 47529190b69b..d60ba67e9e69 100755
--- a/code/modules/reagents/chemistry/reagents/food_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm
@@ -319,7 +319,7 @@
victim.blind_eyes(2)
victim.confused = max(M.confused, 3)
victim.damageoverlaytemp = 60
- victim.Knockdown(60)
+ victim.Paralyze(60)
return
else if ( eyes_covered ) // Eye cover is better than mouth cover
victim.blur_eyes(3)
@@ -332,7 +332,7 @@
victim.blind_eyes(3)
victim.confused = max(M.confused, 6)
victim.damageoverlaytemp = 75
- victim.Knockdown(100)
+ victim.Paralyze(100)
victim.update_damage_hud()
/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M)
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 6ffe15143f47..385e4395aa2a 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -47,9 +47,11 @@
M.remove_all_traits()
M.set_blurriness(0)
M.set_blindness(0)
- M.SetKnockdown(0, 0)
- M.SetStun(0, 0)
- M.SetUnconscious(0, 0)
+ M.SetKnockdown(0, FALSE)
+ M.SetStun(0, FALSE)
+ M.SetUnconscious(0, FALSE)
+ M.SetParalyzed(0, FALSE)
+ M.SetImmobilized(0, FALSE)
M.silent = FALSE
M.dizziness = 0
M.disgust = 0
@@ -82,9 +84,11 @@
/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M)
M.drowsyness = max(M.drowsyness-5, 0)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
- M.AdjustUnconscious(-20, 0)
+ M.AdjustStun(-20, FALSE)
+ M.AdjustKnockdown(-20, FALSE)
+ M.AdjustUnconscious(-20, FALSE)
+ M.AdjustImmobilized(-20, FALSE)
+ M.AdjustParalyzed(-20, FALSE)
if(holder.has_reagent("mindbreaker"))
holder.remove_reagent("mindbreaker", 5)
M.hallucination = max(0, M.hallucination - 10)
@@ -554,10 +558,8 @@
..()
/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
- M.AdjustUnconscious(-20, 0)
- M.adjustStaminaLoss(-1*REM, 0)
+ M.AdjustAllImmobility(-20, FALSE)
+ M.adjustStaminaLoss(-1*REM, FALSE)
..()
return TRUE
@@ -763,9 +765,7 @@
M.adjustStaminaLoss(-0.5*REM, 0)
. = 1
if(prob(20))
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
- M.AdjustUnconscious(-20, 0)
+ M.AdjustAllImmobility(-20, FALSE)
..()
/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M)
@@ -880,9 +880,7 @@
M.adjustToxLoss(-1*REM, 0)
M.adjustBruteLoss(-1*REM, 0)
M.adjustFireLoss(-1*REM, 0)
- M.AdjustStun(-60, 0)
- M.AdjustKnockdown(-60, 0)
- M.AdjustUnconscious(-60, 0)
+ M.AdjustAllImmobility(-60, FALSE)
M.adjustStaminaLoss(-5*REM, 0)
..()
. = 1
@@ -1133,9 +1131,7 @@
overdose_threshold = 30
/datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/M as mob)
- M.AdjustUnconscious(-20, 0)
- M.AdjustStun(-20, 0)
- M.AdjustKnockdown(-20, 0)
+ M.AdjustAllImmobility(-20, FALSE)
M.adjustStaminaLoss(-1, 0)
..()
return TRUE
@@ -1217,9 +1213,7 @@
/datum/reagent/medicine/modafinil/on_mob_life(mob/living/carbon/M)
if(!overdosed) // We do not want any effects on OD
overdose_threshold = overdose_threshold + rand(-10,10)/10 // for extra fun
- M.AdjustStun(-5, 0)
- M.AdjustKnockdown(-5, 0)
- M.AdjustUnconscious(-5, 0)
+ M.AdjustAllImmobility(-5, FALSE)
M.adjustStaminaLoss(-0.5*REM, 0)
M.Jitter(1)
metabolization_rate = 0.01 * REAGENTS_METABOLISM * rand(5,20) // randomizes metabolism between 0.02 and 0.08 per tick
@@ -1250,7 +1244,7 @@
if(prob(20))
to_chat(M, "You have a sudden fit!")
M.emote("moan")
- M.Knockdown(20, 1, 0) // you should be in a bad spot at this point unless epipen has been used
+ M.Paralyze(20, 1, 0) // you should be in a bad spot at this point unless epipen has been used
if(81)
to_chat(M, "You feel too exhausted to continue!") // at this point you will eventually die unless you get charcoal
M.adjustOxyLoss(0.1*REM, 0)
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 4bae5620110a..4e97b80519bf 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -285,9 +285,7 @@
/datum/reagent/fuel/unholywater/on_mob_life(mob/living/carbon/M)
if(iscultist(M))
M.drowsyness = max(M.drowsyness-5, 0)
- M.AdjustUnconscious(-20, 0)
- M.AdjustStun(-40, 0)
- M.AdjustKnockdown(-40, 0)
+ M.AdjustAllImmobility(-40, FALSE)
M.adjustStaminaLoss(-10, 0)
M.adjustToxLoss(-2, 0)
M.adjustOxyLoss(-2, 0)
@@ -449,7 +447,7 @@
return
to_chat(H, "You crumple in agony as your flesh wildly morphs into new forms!")
H.visible_message("[H] falls to the ground and screams as [H.p_their()] skin bubbles and froths!") //'froths' sounds painful when used with SKIN.
- H.Knockdown(60)
+ H.Paralyze(60)
addtimer(CALLBACK(src, .proc/mutate, H), 30)
return
@@ -755,7 +753,7 @@
taste_mult = 0 // apparently tasteless.
/datum/reagent/mercury/on_mob_life(mob/living/carbon/M)
- if(M.canmove && !isspaceturf(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinals))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
@@ -835,7 +833,7 @@
taste_description = "metal"
/datum/reagent/lithium/on_mob_life(mob/living/carbon/M)
- if(M.canmove && !isspaceturf(M.loc))
+ if((M.mobility_flags & MOBILITY_MOVE) && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinals))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
index 90cb732a1f5d..a6cb066b7806 100644
--- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
@@ -238,9 +238,7 @@
/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/carbon/M)
if(isjellyperson(M))
shock_timer = 0 //immune to shocks
- M.AdjustStun(-40, 0)
- M.AdjustKnockdown(-40, 0)
- M.AdjustUnconscious(-40, 0)
+ M.AdjustAllImmobility(-40, FALSE)
M.adjustStaminaLoss(-2, 0)
if(isluminescent(M))
var/mob/living/carbon/human/H = M
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index fb54a1a4ab2c..07cb7426f360 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -562,7 +562,7 @@
var/picked_option = rand(1,3)
switch(picked_option)
if(1)
- C.Knockdown(60, 0)
+ C.Paralyze(60, 0)
. = TRUE
if(2)
C.losebreath += 10
@@ -714,7 +714,7 @@
/datum/reagent/toxin/curare/on_mob_life(mob/living/carbon/M)
if(current_cycle >= 11)
- M.Knockdown(60, 0)
+ M.Paralyze(60, 0)
M.adjustOxyLoss(1*REM, 0)
. = 1
..()
@@ -886,7 +886,7 @@
holder.remove_reagent(id, actual_metaboliztion_rate * M.metabolism_efficiency)
M.adjustToxLoss(actual_toxpwr*REM, 0)
if(prob(10))
- M.Knockdown(20, 0)
+ M.Paralyze(20, 0)
. = 1
..()
diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
index 9d18baa693cb..2ca1f0e0eeb9 100644
--- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
+++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
@@ -73,7 +73,7 @@
for(var/mob/living/carbon/C in get_hearers_in_view(round(created_volume/48,1),get_turf(holder.my_atom)))
if(iscultist(C))
to_chat(C, "The divine explosion sears you!")
- C.Knockdown(40)
+ C.Paralyze(40)
C.adjust_fire_stacks(5)
C.IgniteMob()
..()
@@ -249,7 +249,7 @@
for(var/mob/living/carbon/C in get_hearers_in_view(range, location))
if(C.flash_act())
if(get_dist(C, location) < 4)
- C.Knockdown(60)
+ C.Paralyze(60)
else
C.Stun(100)
holder.remove_reagent("flash_powder", created_volume*3)
@@ -270,7 +270,7 @@
for(var/mob/living/carbon/C in get_hearers_in_view(range, location))
if(C.flash_act())
if(get_dist(C, location) < 4)
- C.Knockdown(60)
+ C.Paralyze(60)
else
C.Stun(100)
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index 20f2ac2ab151..c3118ab5c6f0 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -114,9 +114,9 @@
break
if(stream_mode)
- if(ismob(T))
- var/mob/M = T
- if(!M.lying || !range_left)
+ if(isliving(T))
+ var/mob/living/M = T
+ if((M.mobility_flags & MOBILITY_STAND) || !range_left)
D.reagents.reaction(M, VAPOR)
puff_reagent_left -= 1
else if(!range_left)
diff --git a/code/modules/research/nanites/nanite_programs/buffing.dm b/code/modules/research/nanites/nanite_programs/buffing.dm
index 5f17845067e4..70a3b6f54750 100644
--- a/code/modules/research/nanites/nanite_programs/buffing.dm
+++ b/code/modules/research/nanites/nanite_programs/buffing.dm
@@ -29,12 +29,10 @@
if(!..())
return
to_chat(host_mob, "You feel a sudden surge of energy!")
- host_mob.SetStun(0)
- host_mob.SetKnockdown(0)
- host_mob.SetUnconscious(0)
+ host_mob.SetAllImmobility(0)
host_mob.adjustStaminaLoss(-75)
- host_mob.lying = 0
- host_mob.update_canmove()
+ host_mob.set_resting(FALSE)
+ host_mob.update_mobility()
host_mob.reagents.add_reagent("stimulants", 1.5)
/datum/nanite_program/hardening
diff --git a/code/modules/research/nanites/nanite_programs/rogue.dm b/code/modules/research/nanites/nanite_programs/rogue.dm
index f64c7e878121..a77944f2f44c 100644
--- a/code/modules/research/nanites/nanite_programs/rogue.dm
+++ b/code/modules/research/nanites/nanite_programs/rogue.dm
@@ -116,4 +116,4 @@
host_mob.drop_all_held_items()
else if(prob(4))
to_chat(host_mob, "You can't feel your legs!")
- host_mob.Knockdown(30)
+ host_mob.Paralyze(30)
diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm
index 3d89baba68c7..b77fe0a1a8ef 100644
--- a/code/modules/research/nanites/nanite_programs/suppression.dm
+++ b/code/modules/research/nanites/nanite_programs/suppression.dm
@@ -55,7 +55,7 @@
if(!..())
return
playsound(host_mob, "sparks", 75, 1, -1)
- host_mob.Knockdown(80)
+ host_mob.Paralyze(80)
/datum/nanite_program/pacifying
name = "Pacification"
diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm
index 17178ccb3c83..0e6ac94374d8 100644
--- a/code/modules/shuttle/on_move.dm
+++ b/code/modules/shuttle/on_move.dm
@@ -315,7 +315,7 @@ All ShuttleMove procs go here
var/knockdown = movement_force["KNOCKDOWN"]
if(knockdown)
- Knockdown(knockdown)
+ Paralyze(knockdown)
/mob/living/simple_animal/hostile/megafauna/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock)
diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm
index 6d3e304ddad9..a2717bfe71db 100644
--- a/code/modules/shuttle/special.dm
+++ b/code/modules/shuttle/special.dm
@@ -186,7 +186,7 @@
// No climbing on the bar please
var/mob/living/M = AM
var/throwtarget = get_edge_target_turf(src, boot_dir)
- M.Knockdown(40)
+ M.Paralyze(40)
M.throw_at(throwtarget, 5, 1,src)
to_chat(M, "No climbing on the bar please.")
else
@@ -235,7 +235,7 @@
if(payees[AM] >= threshold)
break
payees[AM] += C.value
- counted_money += C
+ counted_money += C
for(var/obj/item/stack/spacecash/S in AM.GetAllContents())
if(payees[AM] >= threshold)
break
@@ -256,7 +256,7 @@
var/obj/item/stack/spacecash/S = AM.pulling
payees[AM] += S.value * S.amount
counted_money += S
-
+
else if(payees[AM] < threshold && istype(AM.pulling, /obj/item/holochip))
var/obj/item/holochip/H = AM.pulling
payees[AM] += H.credits
diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm
index 89e5caca5e32..3bf25f76e9db 100644
--- a/code/modules/spells/spell.dm
+++ b/code/modules/spells/spell.dm
@@ -370,6 +370,10 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
target.AdjustStun(amount)
if("knockdown")
target.AdjustKnockdown(amount)
+ if("paralyze")
+ target.AdjustParalyzed(amount)
+ if("immobilize")
+ target.AdjustImmobilized(amount)
if("unconscious")
target.AdjustUnconscious(amount)
else
diff --git a/code/modules/spells/spell_types/devil.dm b/code/modules/spells/spell_types/devil.dm
index 6831266d4e2a..ffc3ba4251eb 100644
--- a/code/modules/spells/spell_types/devil.dm
+++ b/code/modules/spells/spell_types/devil.dm
@@ -198,7 +198,7 @@
if(H.anti_magic_check(FALSE, TRUE))
continue
H.mind.add_antag_datum(/datum/antagonist/sintouched)
- H.Knockdown(400)
+ H.Paralyze(400)
/obj/effect/proc_holder/spell/targeted/summon_dancefloor
diff --git a/code/modules/spells/spell_types/ethereal_jaunt.dm b/code/modules/spells/spell_types/ethereal_jaunt.dm
index 1219d8ec7b00..4924d9ba84cf 100644
--- a/code/modules/spells/spell_types/ethereal_jaunt.dm
+++ b/code/modules/spells/spell_types/ethereal_jaunt.dm
@@ -40,7 +40,7 @@
return
mobloc = get_turf(target.loc)
jaunt_steam(mobloc)
- target.canmove = 0
+ target.mobility_flags &= ~MOBILITY_MOVE
holder.reappearing = 1
playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
sleep(25 - jaunt_in_time)
@@ -55,7 +55,7 @@
if(T)
if(target.Move(T))
break
- target.canmove = 1
+ target.mobility_flags |= MOBILITY_MOVE
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(mobloc)
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
diff --git a/code/modules/spells/spell_types/godhand.dm b/code/modules/spells/spell_types/godhand.dm
index 919d87b4c7b9..e2fe90ee8a28 100644
--- a/code/modules/spells/spell_types/godhand.dm
+++ b/code/modules/spells/spell_types/godhand.dm
@@ -18,7 +18,7 @@
/obj/item/melee/touch_attack/attack(mob/target, mob/living/carbon/user)
if(!iscarbon(user)) //Look ma, no hands
return
- if(user.lying || user.handcuffed)
+ if(!(user.mobility_flags & MOBILITY_USE))
to_chat(user, "You can't reach out!")
return
..()
@@ -45,7 +45,7 @@
item_state = "disintegrate"
/obj/item/melee/touch_attack/disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad
+ if(!proximity || target == user || !ismob(target) || !iscarbon(user) || !(user.mobility_flags & MOBILITY_USE)) //exploding after touching yourself would be bad
return
if(!user.can_speak_vocal())
to_chat(user, "You can't get the words out!")
@@ -77,9 +77,9 @@
item_state = "fleshtostone"
/obj/item/melee/touch_attack/fleshtostone/afterattack(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !isliving(target) || !iscarbon(user) || user.lying || user.handcuffed) //getting hard after touching yourself would also be bad
+ if(!proximity || target == user || !isliving(target) || !iscarbon(user)) //getting hard after touching yourself would also be bad
return
- if(user.lying || user.handcuffed)
+ if(!(user.mobility_flags & MOBILITY_USE))
to_chat(user, "You can't reach out!")
return
if(!user.can_speak_vocal())
diff --git a/code/modules/spells/spell_types/inflict_handler.dm b/code/modules/spells/spell_types/inflict_handler.dm
index da0af7a6013f..e35bdf466940 100644
--- a/code/modules/spells/spell_types/inflict_handler.dm
+++ b/code/modules/spells/spell_types/inflict_handler.dm
@@ -41,7 +41,7 @@
target.adjustToxLoss(amt_dam_tox)
target.adjustOxyLoss(amt_dam_oxy)
//disabling
- target.Knockdown(amt_knockdown)
+ target.Paralyze(amt_knockdown)
target.Unconscious(amt_unconscious)
target.Stun(amt_stun)
diff --git a/code/modules/spells/spell_types/lichdom.dm b/code/modules/spells/spell_types/lichdom.dm
index 729527705676..58aef8556ae0 100644
--- a/code/modules/spells/spell_types/lichdom.dm
+++ b/code/modules/spells/spell_types/lichdom.dm
@@ -135,7 +135,7 @@
lich.hardset_dna(null,null,lich.real_name,null, new /datum/species/skeleton)
to_chat(lich, "Your bones clatter and shudder as you are pulled back into this world!")
var/turf/body_turf = get_turf(old_body)
- lich.Knockdown(200 + 200*resurrections)
+ lich.Paralyze(200 + 200*resurrections)
resurrections++
if(old_body && old_body.loc)
if(iscarbon(old_body))
diff --git a/code/modules/spells/spell_types/shadow_walk.dm b/code/modules/spells/spell_types/shadow_walk.dm
index 6d31cb439e1c..b7b64b5008a4 100644
--- a/code/modules/spells/spell_types/shadow_walk.dm
+++ b/code/modules/spells/spell_types/shadow_walk.dm
@@ -25,8 +25,7 @@
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
playsound(get_turf(user), 'sound/magic/ethereal_enter.ogg', 50, 1, -1)
visible_message("[user] melts into the shadows!")
- user.SetStun(0, FALSE)
- user.SetKnockdown(0, FALSE)
+ user.SetAllImmobility(0)
user.setStaminaLoss(0, 0)
var/obj/effect/dummy/shadow/S2 = new(get_turf(user.loc))
user.forceMove(S2)
diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm
index 731f040ffac6..1d80b00effb0 100644
--- a/code/modules/spells/spell_types/wizard.dm
+++ b/code/modules/spells/spell_types/wizard.dm
@@ -287,14 +287,14 @@
if(distfromcaster == 0)
if(isliving(AM))
var/mob/living/M = AM
- M.Knockdown(100)
+ M.Paralyze(100)
M.adjustBruteLoss(5)
to_chat(M, "You're slammed into the floor by [user]!")
else
new sparkle_path(get_turf(AM), get_dir(user, AM)) //created sparkles will disappear on their own
if(isliving(AM))
var/mob/living/M = AM
- M.Knockdown(stun_amt)
+ M.Paralyze(stun_amt)
to_chat(M, "You're thrown back by [user]!")
AM.safe_throw_at(throwtarget, ((CLAMP((maxthrow - (CLAMP(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user, force = repulse_force)//So stuff gets tossed around at the same time.
diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm
index d1285032cfc7..6724c9b0aa8f 100644
--- a/code/modules/surgery/bodyparts/bodyparts.dm
+++ b/code/modules/surgery/bodyparts/bodyparts.dm
@@ -231,7 +231,7 @@
disabled = new_disabled
owner.update_health_hud() //update the healthdoll
owner.update_body()
- owner.update_canmove()
+ owner.update_mobility()
//Updates an organ's brute/burn states for use by update_damage_overlays()
//Returns 1 if we need to update overlays. 0 otherwise.
diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm
index 73d0ab305ea6..69a725d061b8 100644
--- a/code/modules/surgery/bodyparts/dismemberment.dm
+++ b/code/modules/surgery/bodyparts/dismemberment.dm
@@ -123,7 +123,7 @@
C.update_health_hud() //update the healthdoll
C.update_body()
C.update_hair()
- C.update_canmove()
+ C.update_mobility()
if(!Tsec) // Tsec = null happens when a "dummy human" used for rendering icons on prefs screen gets its limbs replaced.
qdel(src)
@@ -298,7 +298,7 @@
C.update_body()
C.update_hair()
C.update_damage_overlays()
- C.update_canmove()
+ C.update_mobility()
/obj/item/bodypart/head/attach_limb(mob/living/carbon/C, special)
diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm
index 59440cc3ee1f..ab59d83ca7ed 100644
--- a/code/modules/surgery/helpers.dm
+++ b/code/modules/surgery/helpers.dm
@@ -10,7 +10,7 @@
C = M
affecting = C.get_bodypart(check_zone(selected_zone))
- if(!M.lying && !isslime(M)) //if they're prone or a slime
+ if((M.mobility_flags & MOBILITY_STAND) && !isslime(M)) //if they're prone or a slime
return
var/datum/surgery/current_surgery
diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm
index 38967711fe25..ce0eea3622d3 100644
--- a/code/modules/surgery/organs/augments_internal.dm
+++ b/code/modules/surgery/organs/augments_internal.dm
@@ -1,4 +1,3 @@
-#define STUN_SET_AMOUNT 40
/obj/item/organ/cyberimp
name = "cybernetic implant"
@@ -95,22 +94,50 @@
ui_action_click()
..()
-
/obj/item/organ/cyberimp/brain/anti_stun
name = "CNS Rebooter implant"
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned."
implant_color = "#FFFF00"
slot = ORGAN_SLOT_BRAIN_ANTISTUN
+ var/datum/component/redirect/listener
+ var/datum/callback/CB
+ var/stun_cap_amount = 40
-/obj/item/organ/cyberimp/brain/anti_stun/on_life()
- ..()
+/obj/item/organ/cyberimp/brain/anti_stun/Initialize()
+ . = ..()
+ initialize_callback()
+
+/obj/item/organ/cyberimp/brain/anti_stun/proc/initialize_callback()
+ if(CB)
+ return
+ CB = CALLBACK(src, .proc/on_signal)
+
+/obj/item/organ/cyberimp/brain/anti_stun/Remove()
+ . = ..()
+ QDEL_NULL(listener)
+
+/obj/item/organ/cyberimp/brain/anti_stun/Insert()
+ . = ..()
+ if(listener)
+ qdel(listener)
+ listener = owner.AddComponent(/datum/component/redirect, list(
+ COMSIG_LIVING_STATUS_STUN = CB,
+ COMSIG_LIVING_STATUS_KNOCKDOWN = CB,
+ COMSIG_LIVING_STATUS_IMMOBILIZE = CB,
+ COMSIG_LIVING_STATUS_PARALYZE = CB
+ ))
+
+/obj/item/organ/cyberimp/brain/anti_stun/proc/on_signal()
if(crit_fail)
return
-
- if(owner.AmountStun() > STUN_SET_AMOUNT)
- owner.SetStun(STUN_SET_AMOUNT)
- if(owner.AmountKnockdown() > STUN_SET_AMOUNT)
- owner.SetKnockdown(STUN_SET_AMOUNT)
+ if(owner.AmountStun() > stun_cap_amount)
+ owner.SetStun(stun_cap_amount)
+ if(owner.AmountKnockdown() > stun_cap_amount)
+ owner.SetKnockdown(stun_cap_amount)
+ if(owner.AmountImmobilized() > stun_cap_amount)
+ owner.SetImmobilized(stun_cap_amount)
+ if(owner.AmountParalyzed() > stun_cap_amount)
+ owner.SetParalyzed(stun_cap_amount)
/obj/item/organ/cyberimp/brain/anti_stun/emp_act(severity)
. = ..()
@@ -122,7 +149,6 @@
/obj/item/organ/cyberimp/brain/anti_stun/proc/reboot()
crit_fail = FALSE
-
//[[[[MOUTH]]]]
/obj/item/organ/cyberimp/mouth
zone = BODY_ZONE_PRECISE_MOUTH
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index 48392f70a394..c0948315e625 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -265,7 +265,7 @@
cooldown = COOLDOWN_STUN
for(var/V in listeners)
var/mob/living/L = V
- L.Knockdown(60 * power_multiplier)
+ L.Paralyze(60 * power_multiplier)
//SLEEP
else if((findtext(message, sleep_words)))
@@ -484,11 +484,8 @@
cooldown = COOLDOWN_DAMAGE //because stun removal
for(var/V in listeners)
var/mob/living/L = V
- if(L.resting)
- L.lay_down() //aka get up
- L.SetStun(0)
- L.SetKnockdown(0)
- L.SetUnconscious(0) //i said get up i don't care if you're being tased
+ L.set_resting(FALSE)
+ L.SetAllImmobility(0)
//SIT
else if((findtext(message, sit_words)))
diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm
index fc30d171fb9b..baf85851f421 100644
--- a/code/modules/tgui/states.dm
+++ b/code/modules/tgui/states.dm
@@ -60,10 +60,15 @@
return UI_CLOSE
else if(stat) // Disable UIs if unconcious.
return UI_DISABLED
- else if(incapacitated() || lying) // Update UIs if incapicitated but concious.
+ else if(incapacitated()) // Update UIs if incapicitated but concious.
return UI_UPDATE
return UI_INTERACTIVE
+/mob/living/shared_ui_interaction(src_object)
+ . = ..()
+ if(!(mobility_flags & MOBILITY_UI) && . == UI_INTERACTIVE)
+ return UI_UPDATE
+
/mob/living/silicon/ai/shared_ui_interaction(src_object)
if(lacks_power()) // Disable UIs if the AI is unpowered.
return UI_DISABLED
diff --git a/code/modules/tgui/states/not_incapacitated.dm b/code/modules/tgui/states/not_incapacitated.dm
index 12fe266bc520..bec6d09bdba8 100644
--- a/code/modules/tgui/states/not_incapacitated.dm
+++ b/code/modules/tgui/states/not_incapacitated.dm
@@ -24,6 +24,10 @@ 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)
return UI_CLOSE
- if(user.incapacitated() || user.lying || (turf_check && !isturf(user.loc)))
+ if(user.incapacitated() || (turf_check && !isturf(user.loc)))
return UI_DISABLED
+ if(isliving(user))
+ var/mob/living/L = user
+ if(!(L.mobility_flags & MOBILITY_STAND))
+ return UI_DISABLED
return UI_INTERACTIVE
\ No newline at end of file
diff --git a/code/modules/vehicles/cars/car.dm b/code/modules/vehicles/cars/car.dm
index 12d7388cdc23..8c96febdc319 100644
--- a/code/modules/vehicles/cars/car.dm
+++ b/code/modules/vehicles/cars/car.dm
@@ -32,7 +32,7 @@
playsound(src, engine_sound, 100, TRUE)
/obj/vehicle/sealed/car/MouseDrop_T(atom/dropping, mob/M)
- if(!M.canmove || M.stat || M.restrained())
+ if(M.stat || M.restrained())
return FALSE
if((car_traits & CAN_KIDNAP) && isliving(dropping) && M != dropping)
var/mob/living/L = dropping
@@ -64,7 +64,7 @@
if(!(car_traits & CAN_KIDNAP))
return
if(occupants[user])
- return
+ return
to_chat(user, "You start opening [src]'s trunk.")
if(do_after(user, 30))
if(return_amount_of_controllers_with_flag(VEHICLE_CONTROL_KIDNAPPED))
diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm
index 1462da830c70..08acb0f73117 100644
--- a/code/modules/vehicles/cars/clowncar.dm
+++ b/code/modules/vehicles/cars/clowncar.dm
@@ -59,7 +59,7 @@
var/mob/living/L = M
if(iscarbon(L))
var/mob/living/carbon/C = L
- C.Knockdown(40) //I play to make sprites go horizontal
+ C.Paralyze(40) //I play to make sprites go horizontal
L.visible_message("[src] rams into [L] and sucks him up!") //fuck off shezza this isn't ERP.
mob_forced_enter(L)
playsound(src, pick('sound/vehicles/clowncar_ram1.ogg', 'sound/vehicles/clowncar_ram2.ogg', 'sound/vehicles/clowncar_ram3.ogg'), 75)
diff --git a/code/modules/vehicles/scooter.dm b/code/modules/vehicles/scooter.dm
index 9af5b13a7d69..632383cc0b63 100644
--- a/code/modules/vehicles/scooter.dm
+++ b/code/modules/vehicles/scooter.dm
@@ -71,7 +71,7 @@
var/atom/throw_target = get_edge_target_turf(H, pick(GLOB.cardinals))
unbuckle_mob(H)
H.throw_at(throw_target, 4, 3)
- H.Knockdown(100)
+ H.Paralyze(100)
H.adjustStaminaLoss(40)
var/head_slot = H.get_item_by_slot(SLOT_HEAD)
if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat)))
@@ -197,7 +197,7 @@
var/atom/throw_target = get_edge_target_turf(H, pick(GLOB.cardinals))
unbuckle_mob(H)
H.throw_at(throw_target, 4, 3)
- H.Knockdown(30)
+ H.Paralyze(30)
H.adjustStaminaLoss(10)
var/head_slot = H.get_item_by_slot(SLOT_HEAD)
if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat)))
diff --git a/code/modules/vehicles/sealed.dm b/code/modules/vehicles/sealed.dm
index fbb22578ccdd..53865b9a229e 100644
--- a/code/modules/vehicles/sealed.dm
+++ b/code/modules/vehicles/sealed.dm
@@ -57,7 +57,7 @@
if(randomstep)
var/turf/target_turf = get_step(exit_location(M), pick(GLOB.cardinals))
M.throw_at(target_turf, 5, 10)
-
+
if(!silent)
M.visible_message("[M] drops out of \the [src]!")
return TRUE
@@ -99,7 +99,7 @@
mob_exit(i, null, randomstep)
if(iscarbon(i))
var/mob/living/carbon/Carbon = i
- Carbon.Knockdown(40)
+ Carbon.Paralyze(40)
/obj/vehicle/sealed/proc/DumpSpecificMobs(flag, randomstep = TRUE)
for(var/i in occupants)
@@ -107,8 +107,8 @@
mob_exit(i, null, randomstep)
if(iscarbon(i))
var/mob/living/carbon/C = i
- C.Knockdown(40)
-
-
+ C.Paralyze(40)
+
+
/obj/vehicle/sealed/AllowDrop()
return FALSE
diff --git a/code/modules/vehicles/speedbike.dm b/code/modules/vehicles/speedbike.dm
index 6526e6d89a43..b6af3116b410 100644
--- a/code/modules/vehicles/speedbike.dm
+++ b/code/modules/vehicles/speedbike.dm
@@ -76,7 +76,7 @@
playsound(src, 'sound/effects/bang.ogg', 50, 1)
if(ishuman(A))
var/mob/living/carbon/human/H = A
- H.Knockdown(100)
+ H.Paralyze(100)
H.adjustStaminaLoss(30)
H.apply_damage(rand(20,35), BRUTE)
if(!crash_all)