From 0a046cb8fd6aee6a16c056b9d7ac6bf1cbbdc8ec Mon Sep 17 00:00:00 2001 From: Kyep <16434066+Kyep@users.noreply.github.com> Date: Fri, 25 Sep 2020 22:39:08 +0000 Subject: [PATCH] Fixes spiders eating the crew alive (#14436) * Fixes spiders eating the crew alive * more fixes Co-authored-by: Kyep --- .../simple_animal/hostile/giant_spider.dm | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 614e814fc25..74a5bd749d6 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -164,15 +164,27 @@ if(!cocoon_target) var/list/choices = list() - for(var/mob/living/L in view(1,src)) + for(var/mob/living/L in view(1, src)) if(L == src) continue + if(L.stat != DEAD) + continue + if(istype(L, /mob/living/simple_animal/hostile/poison/giant_spider)) + continue if(Adjacent(L)) choices += L - for(var/obj/O in src.loc) + for(var/obj/O in get_turf(src)) + if(O.anchored) + continue + if(!(isitem(O) || isstructure(O) || ismachinery(O))) + continue if(Adjacent(O)) choices += O - cocoon_target = input(src,"What do you wish to cocoon?") in null|choices + if(length(choices)) + cocoon_target = input(src,"What do you wish to cocoon?") in null|choices + else + to_chat(src, "No suitable dead prey or wrappable objects found nearby.") + return if(cocoon_target && busy != SPINNING_COCOON) busy = SPINNING_COCOON @@ -199,6 +211,8 @@ for(var/mob/living/L in C.loc) if(istype(L, /mob/living/simple_animal/hostile/poison/giant_spider)) continue + if(L.stat != DEAD) + continue large_cocoon = 1 L.loc = C C.pixel_x = L.pixel_x