[MIRROR] De-hardcodes randomize_human() and fixes some related issues along the way [MDB IGNORE] (#15638)

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

* Update create_mob.dm

* Update species.dm

* hhhh fuck

* Fixes what was still broken with the mirror

Co-authored-by: FernandoJ8 <80640114+FernandoJ8@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
SkyratBot
2022-08-24 18:13:52 -04:00
committed by GitHub
co-authored by FernandoJ8 Zonespace John Doe GoldenAlpharex
parent ba3cbfe76f
commit 5cd946f4d0
30 changed files with 103 additions and 132 deletions
+13 -15
View File
@@ -814,21 +814,6 @@ GLOBAL_LIST_EMPTY(features_by_species)
return "FRONT"
//SKYRAT EDIT ADDITION END
///Proc that will randomise the hair, or primary appearance element (i.e. for moths wings) of a species' associated mob
/datum/species/proc/randomize_main_appearance_element(mob/living/carbon/human/human_mob)
//SKYRAT EDIT ADDITION BEGIN
for(var/key in mutant_bodyparts) //Randomize currently attached mutant bodyparts, organs should update when they need to (detachment)
var/datum/sprite_accessory/SP = random_accessory_of_key_for_species(key, src)
var/list/color_list = SP.get_default_color(human_mob.dna.features, src)
var/list/final_list = list()
final_list[MUTANT_INDEX_NAME] = SP.name
final_list[MUTANT_INDEX_COLOR_LIST] = color_list
mutant_bodyparts[key] = final_list
human_mob.update_mutant_bodyparts()
//SKYRAT EDIT ADDITION END
human_mob.hairstyle = random_hairstyle(human_mob.gender)
human_mob.update_body_parts()
///Proc that will randomise the underwear (i.e. top, pants and socks) of a species' associated mob
/datum/species/proc/randomize_active_underwear(mob/living/carbon/human/human_mob)
human_mob.undershirt = random_undershirt(human_mob.gender)
@@ -836,6 +821,19 @@ GLOBAL_LIST_EMPTY(features_by_species)
human_mob.socks = random_socks(human_mob.gender)
human_mob.update_body()
///Proc that will randomize all the external organs (i.e. horns, frills, tails etc.) of a species' associated mob
/datum/species/proc/randomize_external_organs(mob/living/carbon/human/human_mob)
for(var/obj/item/organ/external/organ_path as anything in external_organs)
var/obj/item/organ/external/randomized_organ = human_mob.getorgan(organ_path)
if(randomized_organ)
var/new_look = pick(randomized_organ.get_global_feature_list())
human_mob.dna.features["[randomized_organ.feature_key]"] = new_look
mutant_bodyparts["[randomized_organ.feature_key]"] = new_look
///Proc that randomizes all the appearance elements (external organs, markings, hair etc.) of a species' associated mob. Function set by child procs
/datum/species/proc/randomize_features(mob/living/carbon/human/human_mob)
return
/datum/species/proc/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(HAS_TRAIT(H, TRAIT_NOBREATH))
H.setOxyLoss(0)
@@ -97,6 +97,8 @@
return randname
/datum/species/ethereal/randomize_features(mob/living/carbon/human/human_mob)
human_mob.dna.features["ethcolor"] = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)]
/datum/species/ethereal/spec_updatehealth(mob/living/carbon/human/ethereal)
. = ..()
@@ -44,6 +44,10 @@
mutantears = /obj/item/organ/internal/ears
return ..()
/datum/species/human/felinid/randomize_features(mob/living/carbon/human/human_mob)
randomize_external_organs(human_mob)
return ..()
/proc/mass_purrbation()
for(var/mob in GLOB.human_list)
purrbation_apply(mob)
@@ -21,6 +21,9 @@
human.hair_color = "#bb9966" // brown
human.update_body_parts()
/datum/species/human/randomize_features(mob/living/carbon/human/human_mob)
human_mob.skin_tone = random_skin_tone()
/datum/species/human/get_scream_sound(mob/living/carbon/human/human)
if(human.gender == MALE)
if(prob(1))
@@ -73,11 +73,9 @@
//SKYRAT EDIT REMOVAL BEGIN
/*
/datum/species/lizard/randomize_main_appearance_element(mob/living/carbon/human/human_mob)
var/tail = pick(GLOB.tails_list_lizard)
human_mob.dna.features["tail_lizard"] = tail
mutant_bodyparts["tail_lizard"] = tail
human_mob.update_body()
/datum/species/lizard/randomize_features(mob/living/carbon/human/human_mob)
human_mob.dna.features["body_markings"] = pick(GLOB.body_markings_list)
randomize_external_organs(human_mob)
*/
//SKYRAT EDIT REMOVAL END
@@ -66,13 +66,10 @@
return 10 //flyswatters deal 10x damage to moths
return 1
/datum/species/moth/randomize_main_appearance_element(mob/living/carbon/human/human_mob)
var/wings = pick(GLOB.moth_wings_list)
mutant_bodyparts["wings"] = wings
mutant_bodyparts["moth_wings"] = wings
human_mob.dna.features["wings"] = wings
human_mob.dna.features["moth_wings"] = wings
human_mob.update_body()
/datum/species/moth/randomize_features(mob/living/carbon/human/human_mob)
human_mob.dna.features["moth_markings"] = pick(GLOB.moth_wings_list)
randomize_external_organs(human_mob)
/datum/species/moth/get_scream_sound(mob/living/carbon/human/human)
return 'sound/voice/moth/scream_moth.ogg'
@@ -75,11 +75,8 @@
return list("You're a plant!")
// SKYRAT EDIT END
/datum/species/pod/randomize_main_appearance_element(mob/living/carbon/human/human_mob)
var/hairstyle = pick(GLOB.pod_hair_list)
human_mob.dna.features["pod_hair"] = hairstyle
mutant_bodyparts["pod_hair"] = hairstyle
human_mob.update_body()
/datum/species/pod/randomize_features(mob/living/carbon/human_mob)
randomize_external_organs(human_mob)
/datum/species/pod/proc/change_hairstyle(mob/living/carbon/human/human_mob, new_style)
var/obj/item/organ/external/organ = human_mob.getorganslot(ORGAN_SLOT_EXTERNAL_POD_HAIR)