De-hardcodes randomize_human() and fixes some related issues along the way (#68876)

* First draft on this branch. Should work.

* Whoopsie

* Some fixes

* And again

* Final draft, question mark?

* Please enter the commit message for your changes

* Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

* please work

* Saving for the week offline

* Final draft

* Final final draft

* Oh and clean this up

* eah

* Okay, final for real.

* I lied.

* Sure thing boss

* clinclin

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>

* That's all of em I think

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
FernandoJ8
2022-08-15 04:55:13 +02:00
committed by GitHub
parent 8b39073437
commit aa2eee2ded
16 changed files with 55 additions and 45 deletions
+12 -18
View File
@@ -11,13 +11,13 @@
user << browse(create_panel_helper(create_mob_html), "window=create_mob;size=425x475")
/proc/randomize_human(mob/living/carbon/human/human)
human.gender = pick(MALE, FEMALE)
if(human.dna.species.sexes)
human.gender = pick(MALE, FEMALE, PLURAL)
else
human.gender = PLURAL
human.physique = human.gender
human.real_name = human.dna?.species.random_name(human.gender) || random_unique_name(human.gender)
human.name = human.real_name
human.underwear = random_underwear(human.gender)
human.underwear_color = "#[random_color()]"
human.skin_tone = random_skin_tone()
human.hairstyle = random_hairstyle(human.gender)
human.facial_hairstyle = random_facial_hairstyle(human.gender)
human.hair_color = "#[random_color()]"
@@ -25,21 +25,15 @@
var/random_eye_color = random_eye_color()
human.eye_color_left = random_eye_color
human.eye_color_right = random_eye_color
human.dna.blood_type = random_blood_type()
// Mutant randomizing, doesn't affect the mob appearance unless it's the specific mutant.
human.dna.features["mcolor"] = "#[random_color()]"
human.dna.features["ethcolor"] = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)]
human.dna.features["tail_cat"] = pick(GLOB.tails_list_human)
human.dna.features["tail_lizard"] = pick(GLOB.tails_list_lizard)
human.dna.features["snout"] = pick(GLOB.snouts_list)
human.dna.features["horns"] = pick(GLOB.horns_list)
human.dna.features["frills"] = pick(GLOB.frills_list)
human.dna.features["spines"] = pick(GLOB.spines_list)
human.dna.features["body_markings"] = pick(GLOB.body_markings_list)
human.dna.features["moth_wings"] = pick(GLOB.moth_wings_list)
human.dna.features["moth_antennae"] = pick(GLOB.moth_antennae_list)
human.dna.features["pod_hair"] = pick(GLOB.pod_hair_list)
human.dna.species.randomize_active_underwear(human)
human.update_body(is_creating = TRUE)
for(var/datum/species/species_path as anything in subtypesof(/datum/species))
var/datum/species/new_species = new species_path
new_species.randomize_features(human)
human.dna.species.spec_updatehealth(human)
human.dna.update_dna_identity()
human.updateappearance()
human.update_body(is_creating = TRUE)