From 16a0754cc29db83312b268116c4d659a2e9242b5 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 4 Mar 2023 13:57:33 +0100 Subject: [PATCH] [MIRROR] Allows mob spawners to be infinite [MDB IGNORE] (#19648) * Allows mob spawners to be infinite (#73726) ## About The Pull Request Gives a more 'proper' way for mob spawners to be infinite than just "set a very large number". ## Why It's Good For The Game Useful for admins ## Changelog not really player facing * Allows mob spawners to be infinite --------- Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> --- code/modules/mob_spawn/mob_spawn.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index ff65575b378..db6ac575882 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -5,6 +5,8 @@ //So it shows up in the map editor icon = 'icons/effects/mapping_helpers.dmi' icon_state = "mobspawner" + /// Can this spawner be used up? + var/infinite_use = FALSE ///A forced name of the mob, though can be overridden if a special name is passed as an argument var/mob_name ///the type of the mob, you best inherit this @@ -183,7 +185,7 @@ if(!(GLOB.ghost_role_flags & GHOSTROLE_SPAWNER) && !(flags_1 & ADMIN_SPAWNED_1)) to_chat(user, span_warning("An admin has temporarily disabled non-admin ghost roles!")) return - if(uses <= 0) //just in case + if(uses <= 0 && !infinite_use) //just in case to_chat(user, span_warning("This spawner is out of charges!")) return