diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm
index d70ea49108..6ed2245dfd 100644
--- a/code/datums/martial/wrestling.dm
+++ b/code/datums/martial/wrestling.dm
@@ -207,7 +207,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.proc/Knockdown, 20))
+ D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/DefaultCombatKnockdown, 20))
log_combat(A, D, "has thrown with wrestling")
return 0
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index bd78288092..de4651f1f9 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -679,7 +679,7 @@ datum/status_effect/pacify
var/mob/living/carbon/C = owner
C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hearing_args[HEARING_RAW_MESSAGE]), 10)
- addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
+ addtimer(CALLBACK(C, /mob/living.proc/_MOBILITYFLAGTEMPORARY_Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
qdel(src)
/datum/status_effect/spasms
diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm
index d71e7c0f6a..d2e5acdc80 100644
--- a/code/modules/holiday/halloween/jacqueen.dm
+++ b/code/modules/holiday/halloween/jacqueen.dm
@@ -46,6 +46,8 @@
var/progression = list() //Keep track of where people are in the story.
var/active = TRUE //Turn this to false to keep normal mob behavour
var/cached_z
+ /// I'm busy chatting, don't move.
+ var/busy_chatting = FALSE
/mob/living/simple_animal/jacq/Initialize()
..()
@@ -76,9 +78,9 @@
say("Hello there [gender_check(M)]!")
return ..()
if(!ckey)
- canmove = FALSE
+ busy_chatting = FALSE
chit_chat(M)
- canmove = TRUE
+ busy_chatting = TRUE
..()
/mob/living/simple_animal/jacq/attack_paw(mob/living/carbon/monkey/M)
@@ -86,9 +88,9 @@
say("Hello there [gender_check(M)]!")
return ..()
if(!ckey)
- canmove = FALSE
+ busy_chatting = FALSE
chit_chat(M)
- canmove = TRUE
+ busy_chatting = TRUE
..()
/mob/living/simple_animal/jacq/proc/poof()
@@ -99,7 +101,7 @@
s.set_up(R, 0, loc)
s.start()
visible_message("[src] disappears in a puff of smoke!")
- canmove = TRUE
+ busy_chatting = TRUE
health = 25
//Try to go to populated areas
@@ -377,6 +379,12 @@
sleep(20)
poof()
+/mob/living/simple_animal/jacq/update_mobility()
+ . = ..()
+ if(busy_chatting)
+ DISABLE_BITFIELD(., MOBILITY_MOVE)
+ mobility_flags = .
+
/obj/item/clothing/head/hardhat/pumpkinhead/jaqc
name = "Jacq o' latern"
desc = "A jacqueline o' lantern! You can't seem to get rid of it."
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 f11174f877..ba7062aef4 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
@@ -12,7 +12,7 @@
else
icon_state = "alien[caste]_dead"
- else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || _MOBILITYFLAGTEMPORARY_IsParalyzed())
+ else if((stat == UNCONSCIOUS && !asleep) || stat == SOFT_CRIT || IsParalyzed())
icon_state = "alien[caste]_unconscious"
else if(leap_on_click)
icon_state = "alien[caste]_pounce"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index b6461f3c71..ef985194fc 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -494,7 +494,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_UI)
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, bypass_immunity = FALSE)
. = 1 // Default to returning true.
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 12bc5f925f..df596ec785 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -1203,3 +1203,6 @@
update_canmove()
for(var/chem in healing_chems)
reagents.add_reagent(chem, healing_chems[chem])
+
+/mob/living/canface()
+ return ..() && CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 5f7d3ca243..a52289192b 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -1021,7 +1021,7 @@
if(health <= -maxHealth) //die only once
death()
return
- if(IsUnconscious() || IsStun() || IsKnockdown() || getOxyLoss() > maxHealth*0.5)
+ if(IsUnconscious() || _MOBILITYFLAGTEMPORARY_IsStun() || IsParalyze() || getOxyLoss() > maxHealth*0.5)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index 1ecc8f8bfa..259e2ac953 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -36,7 +36,7 @@
"[M] has disabled [src]'s active module!", null, COMBAT_MESSAGE_RANGE)
log_combat(M, src, "disarmed", "[I ? " removing \the [I]" : ""]")
else
- _MOBILITYFLAGTEMPORARY_Paralyze(40)
+ Paralyze(40)
step(src,get_dir(M,src))
log_combat(M, src, "pushed")
visible_message("[M] has forced back [src]!", \
@@ -86,9 +86,9 @@
return
switch(severity)
if(1)
- _MOBILITYFLAGTEMPORARY_Paralyze(160)
+ Paralyze(160)
if(2)
- _MOBILITYFLAGTEMPORARY_Paralyze(60)
+ Paralyze(60)
/mob/living/silicon/robot/emag_act(mob/user)
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 3397d9f4b6..5ec0ff516a 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -115,7 +115,7 @@
if(stat)
return FALSE
on = TRUE
- canmove = TRUE
+ update_mobility()
set_light(initial(light_range))
update_icon()
diag_hud_set_botstat()
@@ -123,7 +123,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()
@@ -160,11 +160,11 @@
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 = .
+ . = NONE
+ mobility_flags = .
/mob/living/simple_animal/bot/Destroy()
if(path_hud)
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 06d83bf235..c923ee38d9 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/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg)
- . = ..()
- 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/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index 29b4689317..c64bb45d4b 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -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()
@@ -272,15 +272,8 @@
if(prob(25-powerlevel*5))
powerlevel++
-
-
-
/mob/living/simple_animal/slime/proc/handle_targets()
- if(Tempstun)
- if(!buckled) // not while they're eating!
- canmove = 0
- else
- canmove = 1
+ update_mobility()
if(attacked > 50)
attacked = 50
@@ -298,7 +291,7 @@
Discipline--
if(!client)
- if(!canmove)
+ if(!CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE))
return
if(buckled)
@@ -383,13 +376,13 @@
if (Leader)
if(holding_still)
holding_still = max(holding_still - 1, 0)
- else if(canmove && isturf(loc))
+ else if(CHECK_BITFIELD(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(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && prob(50))
step(src, pick(GLOB.cardinals))
else
@@ -397,7 +390,7 @@
holding_still = max(holding_still - 1, 0)
else if (docile && pulledby)
holding_still = 10
- else if(canmove && isturf(loc) && prob(33))
+ else if(CHECK_BITFIELD(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_mobility.dm b/code/modules/mob/living/simple_animal/slime/slime_mobility.dm
new file mode 100644
index 0000000000..d82e945172
--- /dev/null
+++ b/code/modules/mob/living/simple_animal/slime/slime_mobility.dm
@@ -0,0 +1,5 @@
+/mob/living/simple_animal/slime/proc/update_mobility()
+ . = ..()
+ if(Tempstun && !buckled)
+ DISABLE_BITFIELD(., MOBILITY_MOVE)
+ mobility_flags = .
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index 832ed336c4..0569722098 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -31,7 +31,7 @@
return S.duration - world.time
return 0
-/mob/living/proc/_MOBILITYFLAGTEMPORARY_Stun(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
+/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(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
@@ -260,10 +260,10 @@
update_mobility()
//////////////////UNCONSCIOUS
-/mob/living/proc/IsUnconscious() //If we're unconscious
+/mob/living/proc/_MOBILITYFLAGTEMPORARY_IsUnconscious() //If we're unconscious
return has_status_effect(STATUS_EFFECT_UNCONSCIOUS)
-/mob/living/proc/_MOBILITYFLAGTEMPORARY_AmountUnconscious() //How many deciseconds remain in our unconsciousness
+/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
@@ -307,7 +307,7 @@
/////////////////////////////////// SLEEPING ////////////////////////////////////
-/mob/living/proc/IsSleeping() //If we're asleep
+/mob/living/proc/_MOBILITYFLAGTEMPORARY_IsSleeping() //If we're asleep
return has_status_effect(STATUS_EFFECT_SLEEPING)
/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index fad9431b61..7a498a25cc 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -667,8 +667,6 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
// facing verbs
/mob/proc/canface()
- if(!canmove)
- return FALSE
if(world.time < client.last_turn)
return FALSE
if(stat == DEAD || stat == UNCONSCIOUS)
diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm
index 8fb14b8dd1..d55c934bc5 100644
--- a/code/modules/mob/status_procs.dm
+++ b/code/modules/mob/status_procs.dm
@@ -49,11 +49,11 @@
throw_alert("blind", /obj/screen/alert/blind)
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
// You are blind why should you be able to make out details like color, only shapes near you
- add_client_colour(/datum/client_colour/monochrome/blind)
+ // add_client_colour(/datum/client_colour/monochrome/blind)
else // CONSCIOUS no blind trait, no blindness
clear_alert("blind")
clear_fullscreen("blind")
- remove_client_colour(/datum/client_colour/monochrome/blind)
+ // remove_client_colour(/datum/client_colour/monochrome/blind)
/**
* Make the mobs vision blurry
*/
diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm
index e5cb6f4c67..4b64588de1 100644
--- a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm
+++ b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm
@@ -1,6 +1,6 @@
/mob/living/silicon/robot/Move(NewLoc, direct)
. = ..()
- if(. && sprinting && !(movement_type & FLYING) && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND | MOBILITY_MOVE)))
+ if(. && sprinting && !(movement_type & FLYING) && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND | MOBILITY_MOVE))
if(!(cell?.use(25)))
togglesprint(TRUE)
diff --git a/tgstation.dme b/tgstation.dme
index 37118e133f..37300f0ab1 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2262,6 +2262,7 @@
#include "code\modules\mob\living\silicon\robot\login.dm"
#include "code\modules\mob\living\silicon\robot\robot.dm"
#include "code\modules\mob\living\silicon\robot\robot_defense.dm"
+#include "code\modules\mob\living\silicon\robot\robot_mobility.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\say.dm"
@@ -2398,6 +2399,7 @@
#include "code\modules\mob\living\simple_animal\slime\powers.dm"
#include "code\modules\mob\living\simple_animal\slime\say.dm"
#include "code\modules\mob\living\simple_animal\slime\slime.dm"
+#include "code\modules\mob\living\simple_animal\slime\slime_mobility.dm"
#include "code\modules\mob\living\simple_animal\slime\subtypes.dm"
#include "code\modules\modular_computers\laptop_vendor.dm"
#include "code\modules\modular_computers\computers\item\computer.dm"