From cf27074ee5f34e9f31f43a3ccc52cc62294aab67 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Sat, 22 Feb 2025 17:19:42 +0100 Subject: [PATCH] Fixes runtimes in Spawn Debug Full Crew, makes the warning clearer (#89601) ## About The Pull Request Mobs without clients or prefs now get default values instead of informed default values, preventing runtimes in Spawn Debug Full Crew. Also made the ***second*** warning much clearer and only appear when the user isn't localhost, similarly to Start Now. Totally not related to a recent incident on live servers, nope. Surely not. ## Changelog :cl: fix: Spawn Debug Full Crew no longer runtimes admin: Spawn Debug Full Crew now explicitly warns you a second time if you're attempting to use it as a non-localhost user. /:cl: --- code/__HELPERS/mobs.dm | 5 ++++- code/modules/admin/admin_verbs.dm | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index f4491d336a0..5d68557149f 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -740,7 +740,10 @@ GLOBAL_LIST_INIT(skin_tone_names, list( newname = requesting_client?.prefs?.read_preference(preference_type) else var/datum/preference/preference = GLOB.preference_entries[preference_type] - newname = preference.create_informed_default_value(requesting_client.prefs) + if (requesting_client?.prefs) + newname = preference.create_informed_default_value(requesting_client.prefs) + else + newname = preference.create_default_value() for(var/mob/living/checked_mob in GLOB.player_list) if(checked_mob == src) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index ec4107e5d64..802c405ba23 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -508,7 +508,7 @@ ADMIN_VERB(spawn_debug_full_crew, R_DEBUG, "Spawn Debug Full Crew", "Creates a f if(tgui_alert(user, "This command will create a bunch of dummy crewmembers with minds, job, and datacore entries, which will take a while and fill the manifest.", "Spawn Crew", list("Yes", "Cancel")) != "Yes") return - if(tgui_alert(user, "I sure hope you aren't doing this on live. Are you sure?", "Spawn Crew (Be certain)", list("Yes", "Cancel")) != "Yes") + if(!user.is_localhost() && tgui_alert(user, "You are not on localhost! Are you sure?", "Spawn Crew (Be certain)", list("Yes", "Cancel")) != "Yes") return // Find the observer spawn, so we have a place to dump the dummies.