[MIRROR] Adds more "curated" version of human randomization (for humonkeys, corpse spawners, and fresh characters) (#28582)

* Adds more "curated" version of human randomization (for humonkeys, corpse spawners, and fresh characters)

* fix conflict

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-07-05 07:05:38 +02:00
committed by GitHub
parent f430f478a5
commit b883c38a8d
9 changed files with 71 additions and 24 deletions
+40 -1
View File
@@ -11,7 +11,7 @@
user << browse(create_panel_helper(create_mob_html), "window=create_mob;size=425x475")
/**
* Randomizes everything about a human, including DNA and name
* Fully randomizes everything about a human, including DNA and name.
*/
/proc/randomize_human(mob/living/carbon/human/human, randomize_mutations = FALSE)
human.gender = human.dna.species.sexes ? pick(MALE, FEMALE, PLURAL, NEUTER) : PLURAL
@@ -35,3 +35,42 @@
// Snowflake for Ethereals
human.updatehealth()
human.updateappearance(mutcolor_update = TRUE)
/**
* Randomizes a human, but produces someone who looks exceedingly average (by most standards).
*
* (IE, no wacky hair styles / colors)
*/
/proc/randomize_human_normie(mob/living/carbon/human/human, randomize_mutations = FALSE)
var/static/list/natural_hair_colors = list(
"#111111", "#362925", "#3B3831", "#41250C", "#412922",
"#544C49", "#583322", "#593029", "#703b30", "#714721",
"#744729", "#74482a", "#7b746e", "#855832", "#863019",
"#8c4734", "#9F550E", "#A29A96", "#A4381C", "#B17B41",
"#C0BAB7", "#EFE5E4", "#F7F3F1", "#FFF2D6", "#a15537",
"#a17e61", "#b38b67", "#ba673c", "#c89f73", "#d9b380",
"#dbc9b8", "#e1621d", "#e17d17", "#e1af93", "#f1cc8f",
"#fbe7a1",
)
// Sorry enbys but statistically you are not average enough
human.gender = human.dna.species.sexes ? pick(MALE, FEMALE) : PLURAL
human.physique = human.gender
human.real_name = human.generate_random_mob_name()
human.name = human.get_visible_name()
human.eye_color_left = random_eye_color()
human.eye_color_right = human.eye_color_left
human.skin_tone = pick(GLOB.skin_tones)
// No underwear generation handled here
var/picked_color = pick(natural_hair_colors)
human.set_haircolor(picked_color, update = FALSE)
human.set_facial_haircolor(picked_color, update = FALSE)
var/datum/sprite_accessory/hairstyle = SSaccessories.hairstyles_list[random_hairstyle(human.gender)]
if(hairstyle?.natural_spawn)
human.set_hairstyle(hairstyle.name, update = FALSE)
var/datum/sprite_accessory/facial_hair = SSaccessories.facial_hairstyles_list[random_facial_hairstyle(human.gender)]
if(facial_hair?.natural_spawn)
human.set_facial_hairstyle(facial_hair.name, update = FALSE)
// Normal DNA init stuff, these can generally be wacky but we care less, they're aliens after all
human.dna.initialize_dna(newblood_type = random_blood_type(), create_mutation_blocks = randomize_mutations, randomize_features = TRUE)
human.updatehealth()
human.updateappearance(mutcolor_update = TRUE)
+1 -1
View File
@@ -94,7 +94,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
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
randomize_human_normie(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)
+1 -1
View File
@@ -209,7 +209,7 @@ ADMIN_VERB(create_mapping_job_icons, R_DEBUG, "Generate job landmarks icons", "G
else
for(var/obj/item/I in D)
qdel(I)
randomize_human(D)
randomize_human_normie(D)
D.dress_up_as_job(
equipping = JB,
visual_only = TRUE,