From 83a1ea9f8252a038631b2f4d8b8b4b8d4e437a11 Mon Sep 17 00:00:00 2001 From: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Date: Sun, 19 Mar 2023 10:45:23 -0400 Subject: [PATCH] Fixes infinite ghost role spawners not being infinite (#74090) ## About The Pull Request I love it when we add something and we have like three PRs around the same time touching the same code and none of it conflicts, it's awesome, believe me! Adds the `!infinite_use` to the other check that checked the uses left, to ensure that it still allows infinite spawners to remain infinite. ## Why It's Good For The Game Code that works is always good for the game. ## Changelog :cl: GoldenAlpharex fix: Ghost role spawners that are set to have infinite uses no longer run out of uses. /:cl: --- code/modules/mob_spawn/mob_spawn.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index d1cb78d61c6..8b72669769f 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -191,7 +191,7 @@ LAZYREMOVE(ckeys_trying_to_spawn, user_ckey) return - if(uses <= 0) // Just in case something took longer than it should've and we got here after the uses went below zero. + if(uses <= 0 && !infinite_use) // Just in case something took longer than it should've and we got here after the uses went below zero. to_chat(user, span_warning("This spawner is out of charges!")) LAZYREMOVE(ckeys_trying_to_spawn, user_ckey) return