From a2c6f36895cde9bc9e209c6ea6a9ea951e5375f9 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 7 Nov 2021 21:57:53 +0000 Subject: [PATCH] [MIRROR] anonymous names fixes [MDB IGNORE] (#9295) * anonymous names fixes (#62497) the "Stations?" theme now properly describes what its extra does fixes runtimes with anonymous names! i'll point em out * anonymous names fixes Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> --- code/modules/admin/verbs/anonymousnames.dm | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/code/modules/admin/verbs/anonymousnames.dm b/code/modules/admin/verbs/anonymousnames.dm index 7ce001fb7f9..6b049fe589e 100644 --- a/code/modules/admin/verbs/anonymousnames.dm +++ b/code/modules/admin/verbs/anonymousnames.dm @@ -86,20 +86,19 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme) * called when the anonymous theme is created regardless of extra theming */ /datum/anonymous_theme/proc/anonymous_all_players() - var/datum/anonymous_theme/theme = GLOB.current_anonymous_theme for(var/mob/living/player in GLOB.player_list) if(!player.mind || (!ishuman(player) && !issilicon(player)) || player.mind.assigned_role.faction != FACTION_STATION) continue if(issilicon(player)) - player.fully_replace_character_name(player.real_name, theme.anonymous_ai_name(isAI(player))) - else - var/mob/living/carbon/human/human_mob = player - var/original_name = player.real_name //id will not be changed if you do not do this - randomize_human(player) //do this first so the special name can be given - player.fully_replace_character_name(original_name, theme.anonymous_name(player)) - if(extras_enabled) - player_extras(player) - human_mob.dna.update_dna_identity() + player.fully_replace_character_name(player.real_name, anonymous_ai_name(isAI(player))) + return + var/mob/living/carbon/human/human_mob = player + var/original_name = player.real_name //id will not be changed if you do not do this + randomize_human(player) //do this first so the special name can be given + player.fully_replace_character_name(original_name, anonymous_name(player)) + if(extras_enabled) + player_extras(player) + human_mob.dna.update_dna_identity() /** * restore_all_players: sets all crewmembers on station back to their preference name. @@ -180,7 +179,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme) /obj/item/storage/box/wizard_kit/yellow, /obj/item/storage/box/wizard_kit/magusred, /obj/item/storage/box/wizard_kit/magusblue, - /obj/item/storage/box/wizard_kit/black\ + /obj/item/storage/box/wizard_kit/black, ) player.put_in_hands(new random_path()) @@ -263,7 +262,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme) /datum/anonymous_theme/station name = "Stations?" - extras_prompt = "Also flip station name?" + extras_prompt = "Also set station name to be a random human name?" /datum/anonymous_theme/station/theme_extras() set_station_name("[pick(GLOB.first_names)] [pick(GLOB.last_names)]")