[MIRROR] The Tramstation Tram no longer shoves the handicapped out of their wheelchairs when moved [MDB IGNORE] (#9763)

* The Tramstation Tram no longer shoves the handicapped out of their wheelchairs when moved

* Feeeeex

Co-authored-by: MMMiracles <lolaccount1@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-29 01:03:39 +00:00
committed by GitHub
co-authored by MMMiracles GoldenAlpharex
parent 7d097ce509
commit 38f6ece63b
4 changed files with 9 additions and 2 deletions
+2
View File
@@ -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
+2 -1
View File
@@ -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,
@@ -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)
+1 -1
View File
@@ -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)