From efb8805c55cf2eb431f3b18dfcb1c704260e409e Mon Sep 17 00:00:00 2001 From: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Date: Mon, 2 Jun 2025 20:42:27 +0100 Subject: [PATCH] Spider tweaks and Mob pulling (#17782) * Spider tweaks and Mob pulling Added a small amount of weaken to spider warning bites to knock people over. Added a new variable to mobs that can prevent them from being pulled when alive, currently only applies to the spiders. Fixed an issue where spiders would sometimes try to inject poison where they couldn't and runtime. * Invert var --- .../simple_mob/subtypes/animal/giant_spider/_giant_spider.dm | 5 ++++- code/modules/mob/mob.dm | 4 ++++ code/modules/mob/mob_defines.dm | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm index db62ec1d976..a4749ebdc16 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm @@ -127,6 +127,8 @@ var/warning_warmup = 2 SECONDS // How long the leap telegraphing is. var/warning_sound = 'sound/weapons/spiderlunge.ogg' + no_pull_when_living = TRUE + /mob/living/simple_mob/animal/giant_spider/Initialize(mapload) . = ..() @@ -204,7 +206,8 @@ break if(victim) - A.reagents.add_reagent(REAGENT_ID_WARNINGTOXIN, poison_per_bite) + victim.reagents.add_reagent(REAGENT_ID_WARNINGTOXIN, poison_per_bite) + victim.AdjustWeakened(2) victim.visible_message(span_danger("\The [src] has bitten \the [victim]!")) to_chat(victim, span_critical("\The [src] bites you and retreats!")) . = TRUE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6d84f5d3934..7f8e7eaae6e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -607,6 +607,10 @@ else M.LAssailant = usr + if(M.no_pull_when_living && !(M.stat == DEAD)) //If it's now allowed to be pulled when living, and it's not dead yet, deny. + to_chat(src, span_warning("\The [M] won't let you just pull them!")) + return + else if(isobj(AM)) var/obj/I = AM if(!can_pull_size || can_pull_size < I.w_class) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 13913d49771..8052a2aa711 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -120,6 +120,7 @@ var/m_intent = I_RUN//Living var/lastKnownIP = null var/obj/buckled = null//Living + var/no_pull_when_living = FALSE //Test for if it can be pulled when alive var/seer = 0 //for cult//Carbon, probably Human