diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index f558132b82..a4191a65ef 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -111,14 +111,13 @@ var/mob/living/carbon/human/M = loc M.adjustStaminaLoss(-75) M.SetUnconscious(0) - M.SetStun(0) - M.SetKnockdown(0) + M.SetAllImmobility(0) combat_cooldown = 0 START_PROCESSING(SSobj, src) /obj/item/clothing/suit/armor/abductor/vest/process() combat_cooldown++ - if(combat_cooldown==initial(combat_cooldown)) + if(combat_cooldown == initial(combat_cooldown)) STOP_PROCESSING(SSobj, src) /obj/item/clothing/suit/armor/abductor/Destroy() 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 fe3a1696a4..e9cd788e30 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(!CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || leaping) return if(pounce_cooldown > world.time) diff --git a/code/modules/mob/living/carbon/alien/humanoid/death.dm b/code/modules/mob/living/carbon/alien/humanoid/death.dm index c6c675ead9..827d3c2add 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/death.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/death.dm @@ -4,7 +4,7 @@ . = ..() - update_canmove() + update_mobility() update_icons() status_flags |= CANPUSH 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 8510f7278d..5ce429f558 100644 --- a/code/modules/mob/living/carbon/alien/larva/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/larva/update_icons.dm @@ -14,9 +14,9 @@ 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 || _MOBILTIYFLAGTEMPORARY_resting) + else if(stat == UNCONSCIOUS || lying || _MOBILITYFLAGTEMPORARY_resting) icon_state = "larva[state]_sleep" - else if(_MOBILTIYFLAGTEMPORARY_IsStun() || IsParalyzed()) + else if(_MOBILITYFLAGTEMPORARY_IsStun() || IsParalyzed()) icon_state = "larva[state]_stun" else icon_state = "larva[state]" diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 5e1052505a..d04b259b03 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -816,7 +816,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/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm index 3fd0001a12..0f72907613 100644 --- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm +++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm @@ -79,7 +79,7 @@ visible_message("[M] has attempted to punch [name]!", \ "[M] has attempted to punch [name]!", null, COMBAT_MESSAGE_RANGE) if(INTENT_DISARM) - if(!IsUnconscious()) + if(!_MOBILITYFLAGTEMPORARY_IsUnconscious()) M.do_attack_animation(src, ATTACK_EFFECT_DISARM) if (prob(25)) DefaultCombatKnockdown(40) diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 1c6546fd83..c040f4f8d9 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -78,7 +78,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/living.dm b/code/modules/mob/living/living.dm index 7667113937..364d98c70d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -362,11 +362,10 @@ if(stat) return TRUE if(!CHECK_BITFIELD(mobility_flags, MOBILITY_FLAGS_ANY_INTERACTION)) + return TRUE if(!ignore_restraints && restrained(ignore_grab)) return TRUE return FALSE - if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here - return TRUE /mob/living/canUseStorage() if (get_num_arms() <= 0) @@ -1077,7 +1076,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(isnull(new_z) && audiovisual_redirect) diff --git a/code/modules/mob/living/living_mobility.dm b/code/modules/mob/living/living_mobility.dm index 2a98e283fd..e28762521c 100644 --- a/code/modules/mob/living/living_mobility.dm +++ b/code/modules/mob/living/living_mobility.dm @@ -25,13 +25,13 @@ set category = "IC" if(client?.prefs?.autostand) intentionalresting = !intentionalresting - to_chat(src, "You are now attempting to [intentionalresting ? "[!_MOBILTIYFLAGTEMPORARY_resting ? "lay down and ": ""]stay down" : "[_MOBILTIYFLAGTEMPORARY_resting ? "get up and ": ""]stay up"].") + to_chat(src, "You are now attempting to [intentionalresting ? "[!_MOBILITYFLAGTEMPORARY_resting ? "lay down and ": ""]stay down" : "[_MOBILITYFLAGTEMPORARY_resting ? "get up and ": ""]stay up"].") if(intentionalresting && !resting) set_resting(TRUE, FALSE) else resist_a_rest() else - if(!_MOBILTIYFLAGTEMPORARY_resting) + if(!_MOBILITYFLAGTEMPORARY_resting) set_resting(TRUE, FALSE) to_chat(src, "You are now laying down.") else diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 75e8fd317f..ec73b93ce8 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -21,7 +21,7 @@ locked = FALSE //unlock cover - update_canmove() + update_mobility() 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/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 39a8858106..cbe979a861 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1265,11 +1265,11 @@ aicamera.stored[i] = TRUE /mob/living/silicon/robot/lay_down() - ..() - update_canmove() + . = ..() + update_mobility() -/mob/living/silicon/robot/update_canmove() - ..() +/mob/living/silicon/robot/update_mobility() + . = ..() if(client && stat != DEAD && dogborg == FALSE) if(resting) cut_overlays() diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 126f0a4263..43be1bc273 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -261,10 +261,10 @@ /// Makes sure all 4 of the non-knockout immobilizing status effects are lower or equal to amount. /mob/living/proc/HealAllImmobilityupto(amount, updating, ignore_canstun = FALSE) - if(_MOBILTIYFLAGTEMPORARY_AmountStun() > amount) - _MOBILTIYFLAGTEMPORARY_SetStun(amount, FALSE, ignore_canstun) - if(_MOBILTIYFLAGTEMPORARY_AmountKnockdown() > amount) - _MOBILTIYFLAGTEMPORARY_SetKnockdown(amount, FALSE, ignore_canstun) + if(_MOBILITYFLAGTEMPORARY_AmountStun() > amount) + _MOBILITYFLAGTEMPORARY_SetStun(amount, FALSE, ignore_canstun) + if(_MOBILITYFLAGTEMPORARY_AmountKnockdown() > amount) + _MOBILITYFLAGTEMPORARY_SetKnockdown(amount, FALSE, ignore_canstun) if(AmountParalyzed() > amount) SetParalyzed(amount, FALSE, ignore_canstun) if(AmountImmobilized() > amount) @@ -286,7 +286,7 @@ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) return if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) - var/datum/status_effect/incapacitating/unconscious/U = _MOBILTIYFLAGTEMPORARY_IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/U = _MOBILITYFLAGTEMPORARY_IsUnconscious() if(U) U.duration = max(world.time + amount, U.duration) else if(amount > 0) @@ -344,7 +344,7 @@ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) return if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun) - var/datum/status_effect/incapacitating/sleeping/S = _MOBILTIYFLAGTEMPORARY_IsSleeping() + var/datum/status_effect/incapacitating/sleeping/S = _MOBILITYFLAGTEMPORARY_IsSleeping() if(amount <= 0) if(S) qdel(S) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 04d47da56e..864200dd2b 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -75,7 +75,7 @@ if(mob.buckled) //if we're buckled to something, tell it we moved. return mob.buckled.relaymove(mob, direct) - if(!mob.canmove) + if(!CHECK_BITFIELD(mob, MOBILITY_MOVE)) return FALSE if(isobj(mob.loc) || ismob(mob.loc)) //Inside an object, tell it we moved diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 6acface60f..975516b033 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -315,13 +315,13 @@ return ..() /mob/living/carbon/AIize() - if (notransform) + if(notransform) return for(var/obj/item/W in src) dropItemToGround(W) regenerate_icons() - notransform = 1 - canmove = 0 + notransform = TRUE + Paralyze(INFINITY) icon = null invisibility = INVISIBILITY_MAXIMUM return ..() diff --git a/modular_citadel/code/modules/mob/living/living.dm b/modular_citadel/code/modules/mob/living/living.dm index b3f5dd041d..6999092e88 100644 --- a/modular_citadel/code/modules/mob/living/living.dm +++ b/modular_citadel/code/modules/mob/living/living.dm @@ -19,7 +19,7 @@ /mob/living/movement_delay(ignorewalk = 0) . = ..() - if(resting) + if(!CHECK_BITFIELD(mobility_flags, MOBILITY_STAND)) . += 6 /atom