From e576962ac3534ad3146f4fbb9ff7a0bae6c6d99e Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Fri, 3 Dec 2021 18:29:13 +0100 Subject: [PATCH] e --- code/__DEFINES/traits.dm | 2 ++ code/datums/components/riding.dm | 2 ++ code/modules/mob/living/living_movement.dm | 2 ++ 3 files changed, 6 insertions(+) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 665c0340a4..ca326ece5f 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -222,6 +222,8 @@ /// forces us to not render our overlays #define TRAIT_HUMAN_NO_RENDER "human_no_render" #define TRAIT_TRASHCAN "trashcan" +///Used for fireman carry to have mobe not be dropped when passing by a prone individual. +#define TRAIT_BEING_CARRIED "being_carried" // mobility flag traits // IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it) diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index e11eca2975..a074fe6f5f 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -219,6 +219,7 @@ if(!fireman_carrying) M.Daze(25) REMOVE_TRAIT(M, TRAIT_MOBILITY_NOUSE, src) + REMOVE_TRAIT(M, TRAIT_BEING_CARRIED, src) return ..() /datum/component/riding/human/vehicle_mob_buckle(datum/source, mob/living/M, force = FALSE) @@ -228,6 +229,7 @@ H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/human_carry, TRUE, fireman_carrying? FIREMAN_CARRY_SLOWDOWN : PIGGYBACK_CARRY_SLOWDOWN) if(fireman_carrying) ADD_TRAIT(M, TRAIT_MOBILITY_NOUSE, src) + ADD_TRAIT(M, TRAIT_BEING_CARRIED, src) /datum/component/riding/human/proc/on_host_unarmed_melee(atom/target) var/mob/living/carbon/human/H = parent diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index ca7960ff69..a35558884b 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -36,6 +36,8 @@ if(ismob(mover)) if(mover in buckled_mobs) return TRUE + if(HAS_TRAIT(mover, TRAIT_BEING_CARRIED)) + return TRUE //We're being carried and our carrier managed to pass, ergo, let us pass aswell. var/mob/living/L = mover //typecast first, check isliving and only check this if living using short circuit if(isliving(L) && lying && L.lying) //if we're both lying down and aren't already being thrown/shipped around, don't pass return FALSE