mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
[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:
@@ -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)]")
|
||||
|
||||
Reference in New Issue
Block a user