From 463f3f626a8cfe592785e7f0c246746d8d50d3f4 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 26 Sep 2020 21:05:25 -0700 Subject: [PATCH 1/2] Fixes #12838 - spiders getting stuck in zero-g despite being on webs --- .../mob/living/simple_animal/hostile/giant_spider.dm | 8 ++++++++ .../hostile/terror_spiders/terror_spiders.dm | 8 ++++++++ 2 files changed, 16 insertions(+) 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 74a5bd749d6..e45a85629c3 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -47,6 +47,14 @@ if(C.can_inject(null, FALSE, inject_target, FALSE)) C.reagents.add_reagent("spidertoxin", venom_per_bite) +/mob/living/simple_animal/hostile/poison/giant_spider/get_spacemove_backup() + . = ..() + // If we don't find any normal thing to use, attempt to use any nearby spider structure instead. + if(!.) + for(var/obj/structure/spider/S in range(1, get_turf(src))) + . = S + break + //nursemaids - these create webs and eggs /mob/living/simple_animal/hostile/poison/giant_spider/nurse desc = "Furry and black, it makes you shudder to look at it. This one has brilliant green eyes." diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 6c943b26f53..50eeb1db7f2 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -391,6 +391,14 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) return TRUE +/mob/living/simple_animal/hostile/poison/terror_spider/get_spacemove_backup() + . = ..() + // If we don't find any normal thing to use, attempt to use any nearby spider structure instead. + if(!.) + for(var/obj/structure/spider/S in range(1, get_turf(src))) + . = S + break + /mob/living/simple_animal/hostile/poison/terror_spider/Stat() ..() // Determines what shows in the "Status" tab for player-controlled spiders. Used to help players understand spider health regeneration mechanics. From d7ddca70c5421ae2112d8bee38e71651c4477680 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 27 Sep 2020 17:26:24 -0700 Subject: [PATCH 2/2] Steel suggestions --- code/modules/mob/living/simple_animal/hostile/giant_spider.dm | 3 +-- .../simple_animal/hostile/terror_spiders/terror_spiders.dm | 3 +-- 2 files changed, 2 insertions(+), 4 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 e45a85629c3..9211a43ae8c 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -52,8 +52,7 @@ // If we don't find any normal thing to use, attempt to use any nearby spider structure instead. if(!.) for(var/obj/structure/spider/S in range(1, get_turf(src))) - . = S - break + return S //nursemaids - these create webs and eggs /mob/living/simple_animal/hostile/poison/giant_spider/nurse diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 50eeb1db7f2..66f6141c797 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -396,8 +396,7 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) // If we don't find any normal thing to use, attempt to use any nearby spider structure instead. if(!.) for(var/obj/structure/spider/S in range(1, get_turf(src))) - . = S - break + return S /mob/living/simple_animal/hostile/poison/terror_spider/Stat() ..()