Skip to content

Commit

Permalink
hotfix (#11264)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsar-Salat authored Jul 31, 2024
1 parent e8d34ed commit 183af9e
Show file tree
Hide file tree
Showing 24 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion code/__HELPERS/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
return FALSE
if(isliving(source))
var/mob/living/source_mob = source
if(source_mob.mobility_flags & MOBILITY_STAND)
if(source_mob.body_position == LYING_DOWN)
return FALSE
var/goal_dir = get_dir(source, target)
var/clockwise_source_dir = turn(source.dir, -45)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/spikes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
if((H.movement_type & FLYING) || !(H.mobility_flags & MOBILITY_STAND)|| H.buckled || H.shoes || feetCover)
if((H.movement_type & FLYING) || H.body_position == LYING_DOWN || H.buckled || H.shoes || feetCover)
prick(H, 0.5)
else
prick(H, 2)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/martial/_martial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
var/damage = A.dna.species.punchdamage

var/atk_verb = A.dna.species.attack_verb
if(!(D.mobility_flags & MOBILITY_STAND))
if(D.body_position == LYING_DOWN)
atk_verb = "kick"

switch(atk_verb)
Expand Down Expand Up @@ -72,7 +72,7 @@

log_combat(A, D, "punched", name)

if(!(D.mobility_flags & MOBILITY_STAND))
if(D.body_position == LYING_DOWN)
D.force_say(A)
return 1

Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/boxing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
D.SetSleeping(100)
D.force_say(A)
log_combat(A, D, "knocked out (boxing) ", name)
else if(!(D.mobility_flags & MOBILITY_STAND))
else if(D.body_position == LYING_DOWN)
D.force_say(A)
return TRUE

Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/karate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
var/def_check = D.getarmor(BODY_ZONE_HEAD, MELEE)
if(!can_use(A))
return FALSE
if(!(D.mobility_flags & MOBILITY_STAND))
if(D.body_position == LYING_DOWN)
log_combat(A, D, "floor stomped (Karate)", name)
D.visible_message("<span class='warning'>[A] stomped [D] in the head!</span>", \
"<span class='userdanger'>[A] stomped you in the head!</span>", null, COMBAT_MESSAGE_RANGE)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/sleeping_carp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
var/def_check = D.getarmor(BODY_ZONE_CHEST, MELEE)
if(!(D.mobility_flags & MOBILITY_STAND))
if(D.body_position == LYING_DOWN)
log_combat(A, D, "elbow dropped (Sleeping Carp)", name)
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("<span class='warning'>[A] elbow drops [D]!</span>", \
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

if(!turf_mob.can_inject())
continue
if(!(turf_mob.mobility_flags & MOBILITY_STAND) && !travelled_max_distance)
if(turf_mob.body_position != STANDING_UP && !travelled_max_distance)
continue

lifetime--
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/teleportation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,15 @@
/obj/item/teleporter/proc/telefrag(turf/fragging_location, mob/user)
for(var/mob/living/target in fragging_location)//Hit everything in the turf
// Skip any mobs that aren't standing, or aren't dense
if (!(target.mobility_flags & MOBILITY_STAND) || !target.density || user == target)
if ((target.body_position == LYING_DOWN) || !target.density || user == target)
continue
// Run armour checks and apply damage
var/armor_block = target.run_armor_check(BODY_ZONE_CHEST, MELEE)
target.apply_damage(25, BRUTE, blocked = armor_block)
target.Paralyze(10 * (100 - armor_block) / 100)
target.Knockdown(40 * (100 - armor_block) / 100)
// Check if we successfully knocked them down
if (!(target.mobility_flags & MOBILITY_STAND))
if (target.body_position == LYING_DOWN)
to_chat(target, "<span class='userdanger'>[user] teleports into you, knocking you to the floor with the bluespace wave!</span>")
else
to_chat(user, "<span class='userdanger'>[target] resists the force of your jaunt's wake, bringing you to stop!</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/plasticflaps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
if(istype(living_mover.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return TRUE

if((living_mover.mobility_flags & MOBILITY_STAND) && !living_mover.ventcrawler && living_mover.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
if(living_mover.body_position == STANDING_UP && living_mover.mob_size != MOB_SIZE_TINY && !living_mover.ventcrawler) //If your not laying down, or a ventcrawler or a small creature, no pass.
return FALSE

/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
if(!istype(H))
return
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
if(!HAS_TRAIT(H, TRAIT_ALWAYS_STUBS) && (H.shoes || feetCover || !(H.mobility_flags & MOBILITY_STAND) || HAS_TRAIT(H, TRAIT_PIERCEIMMUNE) || H.m_intent == MOVE_INTENT_WALK || H.dna?.species.bodytype & BODYTYPE_DIGITIGRADE))
if(!HAS_TRAIT(H, TRAIT_ALWAYS_STUBS) && (H.shoes || feetCover || H.body_position == LYING_DOWN || HAS_TRAIT(H, TRAIT_PIERCEIMMUNE) || H.m_intent == MOVE_INTENT_WALK || H.dna?.species.bodytype & BODYTYPE_DIGITIGRADE))
return
if(HAS_TRAIT(H, TRAIT_ALWAYS_STUBS) || ((world.time >= last_bump + 100) && prob(5)))
to_chat(H, "<span class='warning'>You stub your toe on the [name]!</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/open/_open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
if(!(lube&GALOSHES_DONT_HELP)) //can't slip while buckled unless it's lube.
return 0
else
if(!(lube & SLIP_WHEN_CRAWLING) && (!(slipper.mobility_flags & MOBILITY_STAND) || !(slipper.status_flags & CANKNOCKDOWN))) // can't slip unbuckled mob if they're lying or can't fall.
if(!(lube & SLIP_WHEN_CRAWLING) && slipper.body_position == LYING_DOWN || !(slipper.status_flags & CANKNOCKDOWN)) // can't slip unbuckled mob if they're lying or can't fall.
return 0
if(slipper.m_intent == MOVE_INTENT_WALK && (lube&NO_SLIP_WHEN_WALKING))
return 0
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/changeling/powers/adrenaline.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//Recover from stuns.
/datum/action/changeling/adrenaline/sting_action(mob/living/user)
..()
to_chat(user, "<span class='notice'>Energy rushes through us.[(!(user.mobility_flags & MOBILITY_STAND)) ? " We arise." : ""]</span>")
to_chat(user, "<span class='notice'>Energy rushes through us.[(user.body_position == LYING_DOWN) ? " We arise." : ""]</span>")
user.SetSleeping(0)
user.SetUnconscious(0)
user.SetStun(0)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/devil/true_devil/_true_devil.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
log_combat(M, src, "attacked", M)
updatehealth()
if ("disarm")
if (!(mobility_flags & MOBILITY_STAND) && !ascended) //No stealing the arch devil's pitchfork.
if (body_position == LYING_DOWN && !ascended) //No stealing the arch devil's pitchfork.
if (prob(5))
Unconscious(40)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/assembly/flash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
to_chat(M, "<span class='userdanger'>You are blinded by [src]!</span>")
//Will be 0 if the user has no stmaina loss, will be 1 if they are in stamcrit
var/flash_proportion = CLAMP01(M.getStaminaLoss() / (M.maxHealth - M.crit_threshold))
if (!(M.mobility_flags & MOBILITY_STAND))
if (M.body_position == LYING_DOWN)
flash_proportion = 1
if(flash_proportion > 0.4)
M.Paralyze(70 * flash_proportion)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/shoes/magboots.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
return
var/turf/T = user.loc
for (var/mob/living/A in T)
if (A != user && !(A.mobility_flags & MOBILITY_STAND))
if (A != user && A.body_position == LYING_DOWN)
A.adjustBruteLoss(rand(10,13))
to_chat(A,"<span class='userdanger'>[user]'s magboots press down on you, crushing you!</span>")
INVOKE_ASYNC(A, TYPE_PROC_REF(/mob, emote), "scream")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
ContactContractDisease(D)

for(var/datum/surgery/S in surgeries)
if(!(mobility_flags & MOBILITY_STAND) || !S.lying_required)
if(body_position == LYING_DOWN || !S.lying_required)
if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM)
if(S.next_step(user, user.a_intent))
return 1
Expand Down Expand Up @@ -294,7 +294,7 @@
if(M == src && check_self_for_injuries())
return

if(!(mobility_flags & MOBILITY_STAND))
if(body_position == LYING_DOWN)
if(buckled)
to_chat(M, "<span class='warning'>You need to unbuckle [src] first to do that!")
return
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -947,10 +947,10 @@
. = ..()
if(ishuman(over))
var/mob/living/carbon/human/T = over // curbstomp, ported from PP with modifications
if(!src.is_busy && (src.is_zone_selected(BODY_ZONE_HEAD) || src.is_zone_selected(BODY_ZONE_PRECISE_GROIN)) && get_turf(src) == get_turf(T) && !(T.mobility_flags & MOBILITY_STAND) && src.a_intent != INTENT_HELP && !HAS_TRAIT(src, TRAIT_PACIFISM)) //all the stars align, time to curbstomp
if(!src.is_busy && (src.is_zone_selected(BODY_ZONE_HEAD) || src.is_zone_selected(BODY_ZONE_PRECISE_GROIN)) && get_turf(src) == get_turf(T) && (T.body_position == LYING_DOWN) && src.a_intent != INTENT_HELP && !HAS_TRAIT(src, TRAIT_PACIFISM)) //all the stars align, time to curbstomp
src.is_busy = TRUE

if (!do_after(src, 2.5 SECONDS, T) || get_turf(src) != get_turf(T) || (T.mobility_flags & MOBILITY_STAND) || src.a_intent == INTENT_HELP || src == T) //wait 30ds and make sure the stars still align (Body zone check removed after PR #958)
if (!do_after(src, 2.5 SECONDS, T) || get_turf(src) != get_turf(T) || (T.body_position == STANDING_UP) || src.a_intent == INTENT_HELP || src == T) //wait 30ds and make sure the stars still align (Body zone check removed after PR #958)
src.is_busy = FALSE
return

Expand Down Expand Up @@ -1027,7 +1027,7 @@

//src is the user that will be carrying, target is the mob to be carried
/mob/living/carbon/human/proc/can_piggyback(mob/living/carbon/target)
return (istype(target) && target.stat == CONSCIOUS && (target.mobility_flags & MOBILITY_STAND))
return (istype(target) && target.stat == CONSCIOUS && target.body_position == STANDING_UP)

/mob/living/carbon/human/proc/can_be_firemanned(mob/living/carbon/target)
return ((ishuman(target) || ismonkey(target)) && target.body_position == LYING_DOWN)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
return
if(buckled || now_pushing)
return
if(confused && stat == CONSCIOUS && (mobility_flags & MOBILITY_STAND) && m_intent == "run" && !ismovable(A) && !HAS_MOB_PROPERTY(src, PROP_CANTBUMPSLAM)) // ported from VORE, sue me
if(confused && stat == CONSCIOUS && body_position == STANDING_UP && m_intent == "run" && !ismovable(A) && !HAS_MOB_PROPERTY(src, PROP_CANTBUMPSLAM)) // ported from VORE, sue me //Suing you rn
APPLY_MOB_PROPERTY(src, PROP_CANTBUMPSLAM, src.type) //Bump() is called continuously so ratelimit the check to 20 seconds if it passes or 5 if it doesn't
if(prob(10))
playsound(get_turf(src), "punch", 25, 1, -1)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/bot/ed209bot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
targets += C
if(targets.len>0)
var/mob/living/carbon/t = pick(targets)
if(t.stat != DEAD && (t.mobility_flags & MOBILITY_STAND) && !t.handcuffed) //we don't shoot people who are dead, cuffed or lying down.
if(t.stat != DEAD && t.body_position == STANDING_UP && !t.handcuffed) //we don't shoot people who are dead, cuffed or lying down.
shootAt(t)
switch(mode)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/pool/components/swimming.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
var/obj/item/pool/helditem = victim.get_active_held_item()
if(istype(helditem) && ISWIELDED(helditem))
return
return ((!(victim.mobility_flags & MOBILITY_STAND)) && (!HAS_TRAIT(victim, TRAIT_NOBREATH)))
return ((victim.body_position == LYING_DOWN) && (!HAS_TRAIT(victim, TRAIT_NOBREATH)))

/datum/component/swimming/proc/drown(mob/living/victim)
if(victim.losebreath < 1)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/supermatter/supermatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
return
if(ishuman(P))
var/mob/living/carbon/human/H = P
if(H.incapacitated() || !(H.mobility_flags & MOBILITY_STAND) || H.mob_negates_gravity())
if(H.incapacitated() || H.body_position == LYING_DOWN || H.mob_negates_gravity())
return //You can't knock down someone who is already knocked down or has immunity to gravity
H.visible_message("<span class='danger'>[H] is suddenly knocked down, as if [H.p_their()] [(H.usable_legs == 1) ? "leg had" : "legs have"] been pulled out from underneath [H.p_them()]!</span>",\
"<span class='userdanger'>A sudden gravitational pulse knocks you down!</span>",\
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@
if(!L.density)
// If you are moving, then bullets will hit you even if you are lying.
// This is to counter abuse in space where you can be moving via inertia while lying #11020
if (!(L.mobility_flags & MOBILITY_STAND) && L.last_move_time + max(L.inertia_move_delay, CRAWLING_ADD_SLOWDOWN + CONFIG_GET(number/movedelay/run_delay)) > world.time)
if ((L.body_position == LYING_DOWN) && L.last_move_time + max(L.inertia_move_delay, CRAWLING_ADD_SLOWDOWN + CONFIG_GET(number/movedelay/run_delay)) > world.time)
return TRUE
return FALSE
if(L.body_position != LYING_DOWN)// if you stand, it returns true and you get hit. If you arent standing(i.e. resting), it returns false and you dont get hit. Such stupid code.
Expand Down
4 changes: 2 additions & 2 deletions code/modules/surgery/helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
continue
else if(C && S.requires_bodypart) //mob with no limb in surgery zone when we need a limb
continue
if(S.lying_required && (M.mobility_flags & MOBILITY_STAND))
if(S.lying_required && M.body_position != LYING_DOWN)
continue
if(!S.can_start(user, M, target_zone))
continue
Expand Down Expand Up @@ -68,7 +68,7 @@
return
else if(C && S.requires_bodypart)
return
if(S.lying_required && (M.mobility_flags & MOBILITY_STAND))
if(S.lying_required && M.body_position != LYING_DOWN)
return
if(!S.can_start(user, M, target_zone))
return
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgui/status_composers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@
return UI_UPDATE

var/mob/living/living_user = user
return (!(living_user.mobility_flags & MOBILITY_STAND) && living_user.stat == CONSCIOUS) \
return (living_user.body_position == LYING_DOWN && living_user.stat == CONSCIOUS) \
? UI_INTERACTIVE \
: UI_UPDATE

0 comments on commit 183af9e

Please sign in to comment.