From 704b479f2eec1fdfcd7b8911ae47ef53a0f206da Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Mon, 1 Feb 2021 23:42:54 +0100
Subject: [PATCH] [MIRROR] Fix 2 wendigo runtimes (#3012)
* Fix 2 wendigo runtimes (#56540)
Fixes 2 wendigo runtimes:
- When the wendigo tries to teleport to you but there is no location to teleport it would runtimes because the code tried to pick from a empty list
- The wendigo scream message used capitalize which is not needed and also runtimed, since capitalize expects a string not some object
* Fix 2 wendigo runtimes
Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
---
.../living/simple_animal/hostile/megafauna/wendigo.dm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
index 8e7c714f39c..70610ad0540 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
@@ -170,9 +170,10 @@ Difficulty: Hard
if(isclosedturf(T))
continue
possible_ends |= T
- var/turf/end = pick(possible_ends)
- do_teleport(src, end, 0, channel=TELEPORT_CHANNEL_BLUESPACE, forced = TRUE)
- SetRecoveryTime(20, 0)
+ if (LAZYLEN(possible_ends))
+ var/turf/end = pick(possible_ends)
+ do_teleport(src, end, 0, channel=TELEPORT_CHANNEL_BLUESPACE, forced = TRUE)
+ SetRecoveryTime(20, 0)
/// Applies dizziness to all nearby enemies that can hear the scream and animates the wendigo shaking up and down
/mob/living/simple_animal/hostile/megafauna/wendigo/proc/disorienting_scream()
@@ -183,7 +184,7 @@ Difficulty: Hard
animate(pixel_z = 0, time = 1)
for(var/mob/living/L in get_hearers_in_view(7, src) - src)
L.Dizzy(6)
- to_chat(L, "[capitalize(src)] screams loudly!")
+ to_chat(L, "[src] screams loudly!")
SetRecoveryTime(30, 0)
SLEEP_CHECK_DEATH(12)
can_move = TRUE