From c2f9228988ee26045d7fe9b50871a38134687a73 Mon Sep 17 00:00:00 2001 From: DGamerL <108773801+DGamerL@users.noreply.github.com> Date: Tue, 15 Aug 2023 03:52:15 +0200 Subject: [PATCH] [s] Fixes several clingspider related runtimes and fixes spiderlings growing into infestation spiders (#21988) * The fixes * Steelslayer review --- code/game/objects/effects/spiders.dm | 2 +- code/modules/antagonists/changeling/powers/summon_spiders.dm | 4 +++- code/modules/mob/mob.dm | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 5132550a95c..e6077a13538 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -182,7 +182,7 @@ qdel(src) return if(!grow_as) - grow_as = pick(typesof(/mob/living/simple_animal/hostile/poison/giant_spider)) + grow_as = pick(typesof(/mob/living/simple_animal/hostile/poison/giant_spider) - /mob/living/simple_animal/hostile/poison/giant_spider/hunter/infestation_spider) var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(loc) S.faction = faction.Copy() S.master_commander = master_commander diff --git a/code/modules/antagonists/changeling/powers/summon_spiders.dm b/code/modules/antagonists/changeling/powers/summon_spiders.dm index 87e7ce9d780..aa589955ae6 100644 --- a/code/modules/antagonists/changeling/powers/summon_spiders.dm +++ b/code/modules/antagonists/changeling/powers/summon_spiders.dm @@ -53,13 +53,15 @@ /// To check and gib the spider when dead, then remove only one of the counter for the changeling owner var/gibbed = FALSE -//These two bellow are needed to both gib the spider always, and even if it was gibbed only remove 1 from the counter of spider_counter instead of death's gib calling death again and removing 2 +//These two below are needed to both gib the spider always, and even if it was gibbed only remove 1 from the counter of spider_counter instead of death's gib calling death again and removing 2 /mob/living/simple_animal/hostile/poison/giant_spider/hunter/infestation_spider/gib() gibbed = TRUE return ..() /mob/living/simple_animal/hostile/poison/giant_spider/hunter/infestation_spider/death(gibbed) var/mob/owner_mob = locateUID(owner_UID) + if(!ismob(owner_mob)) + return ..(TRUE) var/datum/action/changeling/spiders/S = locate() in owner_mob.actions if(!isnull(S)) if(gibbed) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4ce3294ae78..c46a1ff30d5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1430,6 +1430,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ return FALSE /mob/proc/faction_check_mob(mob/target, exact_match) + if(!target) + return faction_check(faction, null, FALSE) if(exact_match) //if we need an exact match, we need to do some bullfuckery. var/list/faction_src = faction.Copy() var/list/faction_target = target.faction.Copy()