diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 7410d78ce83..dbbb81fa8e0 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -297,6 +297,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_WEAK_SOUL "weak_soul" /// Prevents mob from riding mobs when buckled onto something #define TRAIT_CANT_RIDE "cant_ride" +/// Prevents a mob from being unbuckled, currently only used to prevent people from falling over on the tram +#define TRAIT_CANNOT_BE_UNBUCKLED "cannot_be_unbuckled" /// from heparin, makes open bleeding wounds rapidly spill more blood #define TRAIT_BLOODY_MESS "bloody_mess" /// from coagulant reagents, this doesn't affect the bleeding itself but does affect the bleed warning messages diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index 541eb7ac76f..0a6477f9290 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -169,7 +169,8 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_UNNATURAL_RED_GLOWY_EYES" = TRAIT_UNNATURAL_RED_GLOWY_EYES, "TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES, "TRAIT_SHIFTY_EYES" = TRAIT_SHIFTY_EYES, - "TRAIT_OVERSIZED" = TRAIT_OVERSIZED, //SKYRAT EDIT ADDITION + "TRAIT_OVERSIZED" = TRAIT_OVERSIZED, //SKYRAT EDIT ADDITION - Leaving this here so that it hopefully doesn't cause conflicts again in the future(?) + "TRAIT_CANNOT_BE_UNBUCKLED" = TRAIT_CANNOT_BE_UNBUCKLED, ), /obj/item/bodypart = list( "TRAIT_PARALYSIS" = TRAIT_PARALYSIS, diff --git a/code/game/objects/structures/industrial_lift.dm b/code/game/objects/structures/industrial_lift.dm index abdd1c233cf..d141475bb4a 100644 --- a/code/game/objects/structures/industrial_lift.dm +++ b/code/game/objects/structures/industrial_lift.dm @@ -180,6 +180,8 @@ GLOBAL_LIST_EMPTY(lifts) SIGNAL_HANDLER if(!(potential_rider in lift_load)) return + if(isliving(potential_rider) && HAS_TRAIT(potential_rider, TRAIT_CANNOT_BE_UNBUCKLED)) + REMOVE_TRAIT(potential_rider, TRAIT_CANNOT_BE_UNBUCKLED, BUCKLED_TRAIT) LAZYREMOVE(lift_load, potential_rider) UnregisterSignal(potential_rider, COMSIG_PARENT_QDELETING) @@ -189,6 +191,8 @@ GLOBAL_LIST_EMPTY(lifts) return if(AM in lift_load) return + if(isliving(AM) && !HAS_TRAIT(AM, TRAIT_CANNOT_BE_UNBUCKLED)) + ADD_TRAIT(AM, TRAIT_CANNOT_BE_UNBUCKLED, BUCKLED_TRAIT) LAZYADD(lift_load, AM) RegisterSignal(AM, COMSIG_PARENT_QDELETING, .proc/RemoveItemFromLift) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 34d53527bf1..4a6c5447cfe 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1566,7 +1566,7 @@ /mob/living/forceMove(atom/destination) stop_pulling() - if(buckled) + if(buckled && !HAS_TRAIT(src, TRAIT_CANNOT_BE_UNBUCKLED)) buckled.unbuckle_mob(src, force = TRUE) if(has_buckled_mobs()) unbuckle_all_mobs(force = TRUE)