diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 30376b452b..4d275e2034 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -64,16 +64,16 @@ else playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1) -/obj/item/holybeacon/proc/beacon_armor(mob/living/M) +/obj/item/holybeacon/proc/beacon_armor(mob/living/L) var/list/holy_armor_list = typesof(/obj/item/storage/box/holy) var/list/display_names = list() for(var/V in holy_armor_list) var/atom/A = V 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 + var/choice = input(L,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names var/turf/T = get_turf(src) - if(!T || QDELETED(src) || !choice || !CHECK_BITFIELD(M.mobility_flags, MOBILITY_USE) || !in_range(M, src) || GLOB.holy_armor_type) + if(!T || QDELETED(src) || !choice || !CHECK_MOBILITY(L, MOBILITY_USE) || !in_range(L, src) || GLOB.holy_armor_type) return var/index = display_names.Find(choice) @@ -86,7 +86,7 @@ if(holy_armor_box) qdel(src) - M.put_in_hands(holy_armor_box) + L.put_in_hands(holy_armor_box) /obj/item/storage/box/holy name = "Templar Kit" @@ -244,7 +244,7 @@ if(user.mind && (user.mind.isholy) && !reskinned) reskin_holy_weapon(user) -/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/M) +/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/L) if(GLOB.holy_weapon_type) return var/obj/item/holy_weapon @@ -255,8 +255,8 @@ if (initial(rodtype.chaplain_spawnable)) 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 || !in_range(M, src) || !CHECK_MOBILITY(M, MOBILITY_USE) || reskinned) + var/choice = input(L, "What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names + if(QDELETED(src) || !choice || !in_range(L, src) || !CHECK_MOBILITY(L, MOBILITY_USE) || reskinned) return var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new @@ -269,7 +269,7 @@ if(holy_weapon) holy_weapon.reskinned = TRUE qdel(src) - M.put_in_active_hand(holy_weapon) + L.put_in_active_hand(holy_weapon) /obj/item/nullrod/proc/jedi_spin(mob/living/user) for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH)) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 0d82c0295a..4033afa022 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -529,7 +529,7 @@ if(B.cell.charge > 0 && B.status == 1) flick("baton_active", src) var/stunforce = B.stamforce - user.DefaultCombatKnockdown(stunforce) + user.DefaultCombatKnockdown(stunforce * 2) 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 dd7dcd4dbf..e824567b50 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -344,7 +344,7 @@ set category = "Object" set src in oview(1) var/mob/living/L = usr - if(!CHECK_BITFIELD(L, MOBILITY_PULL)) + if(!CHECK_MOBILITY(L, MOBILITY_PULL)) return if(facing == "l") diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index d4d3843a54..13ea317b9b 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -197,13 +197,12 @@ else to_chat(user, "This mind seems resistant to the flash!") - /obj/item/assembly/flash/cyborg /obj/item/assembly/flash/cyborg/attack(mob/living/M, mob/user) . = ..() new /obj/effect/temp_visual/borgflash(get_turf(src)) - if(. && !CONFIG_GET(flag/disable_borg_flash_knockdown) && iscarbon(M) && CHECK_BITFIELD(M.mobility_flags, MOBILITY_STAND) && !M.get_eye_protection()) + if(. && !CONFIG_GET(flag/disable_borg_flash_knockdown) && iscarbon(M) && CHECK_MOBILITY(M, MOBILITY_STAND) && !M.get_eye_protection()) M.DefaultCombatKnockdown(80) /obj/item/assembly/flash/cyborg/attack_self(mob/user) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 052106456f..e013a86fd2 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -280,7 +280,7 @@ /obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/living/carbon/target, mob/user) if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !istype(target) || !user.IsAdvancedToolUser()) return - if(!CHECK_BITFIELD(target.mobility_flags, MOBILITY_MOVE)) + if(!CHECK_MOBILITY(target, MOBILITY_MOVE)) close_machine(target) else user.visible_message("[user] starts shoving [target] inside [src].", "You start shoving [target] inside [src].") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1bd35bb867..cefb411644 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -88,7 +88,7 @@ var/they_can_move = TRUE if(isliving(M)) var/mob/living/L = M - they_can_move = L.mobility_flags & MOBILITY_MOVE + they_can_move = CHECK_MOBILITY(L, MOBILITY_MOVE) //Also spread diseases for(var/thing in diseases) var/datum/disease/D = thing @@ -663,7 +663,7 @@ // This shouldn't give clickdelays sometime (e.g. going out of a mech/unwelded and unlocked locker/disposals bin/etc) but there's so many overrides that I am not going to bother right now. return TRUE - if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE)) + if(CHECK_MOBILITY(src, MOBILITY_MOVE)) if(on_fire) resist_fire() //stop, drop, and roll // Give clickdelay @@ -704,7 +704,7 @@ /mob/living/do_resist_grab(moving_resist, forced, silent = FALSE) . = ..() if(pulledby.grab_state) - if(CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) && prob(30/pulledby.grab_state)) + if(CHECK_MOBILITY(src, MOBILITY_STAND) && prob(30/pulledby.grab_state)) visible_message("[src] has broken free of [pulledby]'s grip!") pulledby.stop_pulling() return TRUE @@ -1184,4 +1184,4 @@ reagents.add_reagent_list(healing_chems) /mob/living/canface() - return ..() && CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) + return ..() && CHECK_MOBILITY(src, MOBILITY_MOVE) diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index d9cf4b2a09..a923da6ed6 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -41,7 +41,7 @@ AIproc = 1 while(AIproc && stat != DEAD && (attacked || hungry || rabid || buckled)) - if(!(mobility_flags & MOBILITY_MOVE)) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly + if(!CHECK_MOBILITY(src, MOBILITY_MOVE)) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly break if(!Target || client) @@ -291,7 +291,7 @@ Discipline-- if(!client) - if(!CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE)) + if(!CHECK_MOBILITY(src, MOBILITY_MOVE)) return if(buckled) @@ -376,13 +376,13 @@ if (Leader) if(holding_still) holding_still = max(holding_still - 1, 0) - else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc)) + else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc)) step_to(src, Leader) else if(hungry) if (holding_still) holding_still = max(holding_still - hungry, 0) - else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && prob(50)) + else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc) && prob(50)) step(src, pick(GLOB.cardinals)) else @@ -390,7 +390,7 @@ holding_still = max(holding_still - 1, 0) else if (docile && pulledby) holding_still = 10 - else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && prob(33)) + else if(CHECK_MOBILITY(src, 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/mob.dm b/code/modules/mob/mob.dm index a523c22d53..2bc4aa8a32 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -665,6 +665,8 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) return FALSE if(anchored) return FALSE + if(!CHECK_MOBILITY(src, MOBILITY_MOVE)) + return FALSE if(notransform) return FALSE if(restrained()) diff --git a/modular_citadel/code/modules/mob/living/living.dm b/modular_citadel/code/modules/mob/living/living.dm index b370bfa078..51c21f4388 100644 --- a/modular_citadel/code/modules/mob/living/living.dm +++ b/modular_citadel/code/modules/mob/living/living.dm @@ -1,4 +1,4 @@ -/mob/living +|/mob/living var/sprinting = FALSE var/recoveringstam = FALSE var/incomingstammult = 1 @@ -25,7 +25,7 @@ /mob/living/movement_delay(ignorewalk = 0) . = ..() - if(!CHECK_BITFIELD(mobility_flags, MOBILITY_STAND)) + if(!CHECK_MOBILITY(src, MOBILITY_STAND)) . += 6 /atom