mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
All jaunts now kick you out if you are KO'd mid-jaunt (#86339)
## About The Pull Request Basically, this is https://github.com/tgstation/tgstation/pull/83241 extended to all jaunts, like bloodcrawl and such ## Why It's Good For The Game Kinda sucks getting RR'd if you die for some stupid reason mid-bloodcrawl (i.e accidentally suffocating while jaunting) ## Changelog 🆑 fix: You will now be ejected from any jaunt (i.e bloodcrawl or shadow walk) if you lose consciousness somehow during the jaunt. /🆑
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
jaunter.forceMove(src)
|
||||
if(ismob(jaunter))
|
||||
var/mob/mob_jaunter = jaunter
|
||||
RegisterSignal(mob_jaunter, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_change))
|
||||
mob_jaunter.reset_perspective(src)
|
||||
|
||||
/obj/effect/dummy/phased_mob/Destroy()
|
||||
@@ -55,6 +56,7 @@
|
||||
/obj/effect/dummy/phased_mob/Exited(atom/movable/gone, direction)
|
||||
. = ..()
|
||||
if(gone == jaunter)
|
||||
UnregisterSignal(jaunter, COMSIG_MOB_STATCHANGE)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_EJECTED_FROM_JAUNT, jaunter)
|
||||
jaunter = null
|
||||
|
||||
@@ -98,3 +100,9 @@
|
||||
newloc = can_z_move(direction, get_turf(src), newloc, ZMOVE_INCAPACITATED_CHECKS | ZMOVE_FEEDBACK | ZMOVE_ALLOW_ANCHORED, user)
|
||||
|
||||
return newloc
|
||||
|
||||
/// Signal proc for [COMSIG_MOB_STATCHANGE], to throw us out of the jaunt if we lose consciousness.
|
||||
/obj/effect/dummy/phased_mob/proc/on_stat_change(mob/living/source, new_stat, old_stat)
|
||||
SIGNAL_HANDLER
|
||||
if(source == jaunter && source.stat != CONSCIOUS)
|
||||
eject_jaunter()
|
||||
|
||||
Reference in New Issue
Block a user