From 3f60bb37e73f0e5a14d4ebcfd609e083ed54fc6d Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Sat, 22 Feb 2025 12:47:38 -0500 Subject: [PATCH] Dead carp no longer block lasers / interact weirdly (#28487) * fucking carp * dead carp don't swarm * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/datums/components/swarming.dm | 4 ++++ code/modules/mob/living/simple_animal/hostile/carp.dm | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/datums/components/swarming.dm b/code/datums/components/swarming.dm index 608359d4908..a58080ee4c8 100644 --- a/code/datums/components/swarming.dm +++ b/code/datums/components/swarming.dm @@ -27,6 +27,10 @@ return ..() /datum/component/swarming/proc/join_swarm(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs) + if(isliving(arrived)) + var/mob/living/our_mob = arrived + if(our_mob.stat == DEAD) + return var/datum/component/swarming/other_swarm = arrived.GetComponent(/datum/component/swarming) if(!other_swarm) return diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index cd43a1db281..8a7f859449c 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -124,13 +124,13 @@ // We do not want mobs moving through space carp, we as such we block it if the mob is not dense /mob/living/simple_animal/hostile/carp/CanPass(atom/movable/mover, border_dir) - if(isliving(mover) && !istype(mover, /mob/living/simple_animal/hostile/carp) && mover.density == TRUE) + if(isliving(mover) && !istype(mover, /mob/living/simple_animal/hostile/carp) && mover.density == TRUE && stat != DEAD) return FALSE return ..() // Since it's not dense we let it always hit /mob/living/simple_animal/hostile/carp/projectile_hit_check(obj/item/projectile/P) - return FALSE + return stat == DEAD /mob/living/simple_animal/hostile/carp/holocarp icon_state = "holocarp"