From c0e0226d3c78c31b3083ed9a6920dc7a1c3f3498 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 24 Jun 2020 23:18:03 +0200 Subject: [PATCH] faction check. --- code/datums/components/spawner.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm index f9164b0f5e..27bf4a5986 100644 --- a/code/datums/components/spawner.dm +++ b/code/datums/components/spawner.dm @@ -37,7 +37,7 @@ // Stopping clientless simple mobs' from indiscriminately bashing their own spawners due DestroySurroundings() et similars. /datum/component/spawner/proc/on_attack_generic(datum/source, mob/user, damage_amount, damage_type, damage_flag, sound_effect, armor_penetration) - if(!user.client && (user in spawned_mobs)) + if(!user.client && ((user.faction & faction) || (user in spawned_mobs))) return COMPONENT_STOP_GENERIC_ATTACK /datum/component/spawner/proc/try_spawn_mob()