From 09e8da1fc64be3e0ec3026e6d14c631ddb309da8 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 19 Mar 2023 15:59:18 +0100 Subject: [PATCH] [MIRROR] Fixes infinite ghost role spawners not being infinite [MDB IGNORE] (#19973) * 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: * Fixes infinite ghost role spawners not being infinite --------- Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> --- 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 e47f8d7e5a6..5245a439758 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -217,7 +217,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