[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>
This commit is contained in:
SkyratBot
2021-11-07 21:57:53 +00:00
committed by GitHub
parent 5cc1d8d177
commit a2c6f36895
+11 -12
View File
@@ -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)]")