mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Fixes monkeys falling over through windoors (#82963)
## About The Pull Request Monkey knockover is now on a new mob-bump signal instead of being on crossed, fixing some consistency issues and getting rid of our need for snowflake "can bump into mob" check. We should try to get rid of all our instances of Crossed and remove its use to prevent this bug from occurring in the future. ## Why It's Good For The Game Closes https://github.com/tgstation/tgstation/issues/66983 ## Changelog 🆑 fix: Monkeys can no longer be knocked over by walking into a windoor on combat mode while they're behind it. /🆑
This commit is contained in:
@@ -146,6 +146,8 @@
|
||||
#define COMPONENT_LIVING_BLOCK_PRE_MOB_BUMP (1<<0)
|
||||
///From base of mob/living/MobBump() (mob/living)
|
||||
#define COMSIG_LIVING_MOB_BUMP "living_mob_bump"
|
||||
///From base of mob/living/MobBump() (mob/living)
|
||||
#define COMSIG_LIVING_MOB_BUMPED "living_mob_bumped"
|
||||
///From base of mob/living/Bump() (turf/closed)
|
||||
#define COMSIG_LIVING_WALL_BUMP "living_wall_bump"
|
||||
///From base of turf/closed/Exited() (turf/closed)
|
||||
|
||||
@@ -76,11 +76,6 @@
|
||||
if(istype(ghost))
|
||||
ghost.ManualFollow(src)
|
||||
|
||||
/obj/effect/immovablerod/proc/on_entered_over_movable(datum/source, atom/movable/atom_crossed_over)
|
||||
SIGNAL_HANDLER
|
||||
if((atom_crossed_over.density || isliving(atom_crossed_over)) && !QDELETED(atom_crossed_over))
|
||||
Bump(atom_crossed_over)
|
||||
|
||||
/obj/effect/immovablerod/proc/on_entering_atom(datum/source, atom/destination, atom/old_loc, list/atom/old_locs)
|
||||
SIGNAL_HANDLER
|
||||
if(destination.density && isturf(destination))
|
||||
|
||||
@@ -168,24 +168,17 @@
|
||||
|
||||
/obj/item/organ/internal/brain/primate/on_mob_insert(mob/living/carbon/primate)
|
||||
. = ..()
|
||||
RegisterSignal(primate, COMSIG_MOVABLE_CROSS, PROC_REF(on_crossed))
|
||||
RegisterSignal(primate, COMSIG_LIVING_MOB_BUMPED, PROC_REF(on_mob_bump))
|
||||
|
||||
/obj/item/organ/internal/brain/primate/on_mob_remove(mob/living/carbon/primate)
|
||||
. = ..()
|
||||
UnregisterSignal(primate, COMSIG_MOVABLE_CROSS)
|
||||
UnregisterSignal(primate, COMSIG_LIVING_MOB_BUMPED)
|
||||
|
||||
/obj/item/organ/internal/brain/primate/proc/on_crossed(datum/source, atom/movable/crossed)
|
||||
/obj/item/organ/internal/brain/primate/proc/on_mob_bump(mob/source, mob/living/crossing_mob)
|
||||
SIGNAL_HANDLER
|
||||
if(!tripping)
|
||||
if(!tripping || !crossing_mob.combat_mode)
|
||||
return
|
||||
if(IS_DEAD_OR_INCAP(owner) || !isliving(crossed))
|
||||
return
|
||||
var/mob/living/in_the_way_mob = crossed
|
||||
if(iscarbon(in_the_way_mob) && !in_the_way_mob.combat_mode)
|
||||
return
|
||||
if(in_the_way_mob.pass_flags & PASSMOB)
|
||||
return
|
||||
in_the_way_mob.knockOver(owner)
|
||||
crossing_mob.knockOver(owner)
|
||||
|
||||
/obj/item/organ/internal/brain/primate/get_attacking_limb(mob/living/carbon/human/target)
|
||||
if(!HAS_TRAIT(owner, TRAIT_ADVANCEDTOOLUSER))
|
||||
|
||||
@@ -156,6 +156,7 @@
|
||||
return TRUE
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_MOB_BUMP, M)
|
||||
SEND_SIGNAL(M, COMSIG_LIVING_MOB_BUMPED, src)
|
||||
//Even if we don't push/swap places, we "touched" them, so spread fire
|
||||
spreadFire(M)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user