diff --git a/code/datums/diseases/advance/symptoms/beard.dm b/code/datums/diseases/advance/symptoms/beard.dm index 6ca83c118c9..b537c31edac 100644 --- a/code/datums/diseases/advance/symptoms/beard.dm +++ b/code/datums/diseases/advance/symptoms/beard.dm @@ -32,5 +32,5 @@ if(index > 0 && H.facial_hairstyle != beard_order[index]) to_chat(H, span_warning("Your chin itches.")) H.facial_hairstyle = beard_order[index] - H.update_hair() + H.update_hair(is_creating = TRUE) diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index fa23da69135..fe199c60ce3 100644 --- a/code/datums/diseases/advance/symptoms/shedding.dm +++ b/code/datums/diseases/advance/symptoms/shedding.dm @@ -45,4 +45,4 @@ H.hairstyle = "Bald" else H.hairstyle = "Balding Hair" - H.update_hair() + H.update_hair(is_creating = TRUE) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index caed19be8a3..61feaafe8b0 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -564,7 +564,10 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) eye_color_left = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_LEFT_BLOCK)) eye_color_right = sanitize_hexcolor(get_uni_identity_block(structure, DNA_EYE_COLOR_RIGHT_BLOCK)) facial_hairstyle = GLOB.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), GLOB.facial_hairstyles_list.len)] - hairstyle = GLOB.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), GLOB.hairstyles_list.len)] + if(HAS_TRAIT(src, TRAIT_BALD)) + hairstyle = "Bald" + else + hairstyle = GLOB.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), GLOB.hairstyles_list.len)] var/features = dna.unique_features if(dna.features["mcolor"]) dna.features["mcolor"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_MUTANT_COLOR_BLOCK)) diff --git a/code/datums/quirks/neutral.dm b/code/datums/quirks/neutral.dm index 53cf158d4dd..38d136b2b2f 100644 --- a/code/datums/quirks/neutral.dm +++ b/code/datums/quirks/neutral.dm @@ -294,7 +294,7 @@ var/mob/living/carbon/human/human_holder = quirk_holder old_hair = human_holder.hairstyle human_holder.hairstyle = "Bald" - human_holder.update_hair() + human_holder.update_hair(is_creating = TRUE) RegisterSignal(human_holder, COMSIG_CARBON_EQUIP_HAT, .proc/equip_hat) RegisterSignal(human_holder, COMSIG_CARBON_UNEQUIP_HAT, .proc/unequip_hat) @@ -314,7 +314,7 @@ . = ..() var/mob/living/carbon/human/human_holder = quirk_holder human_holder.hairstyle = old_hair - human_holder.update_hair() + human_holder.update_hair(is_creating = TRUE) UnregisterSignal(human_holder, list(COMSIG_CARBON_EQUIP_HAT, COMSIG_CARBON_UNEQUIP_HAT)) SEND_SIGNAL(human_holder, COMSIG_CLEAR_MOOD_EVENT, "bad_hair_day") diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index f1452e03648..7473aa62f0d 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -203,9 +203,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28) to_chat(amazed_human, span_notice("Invalid color. Your color is not bright enough.")) return TRUE - amazed_human.update_body() - amazed_human.update_hair() - amazed_human.update_body_parts() + amazed_human.update_body(is_creating = TRUE) amazed_human.update_mutations_overlay() // no hulk lizard if("gender") diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index 5232fcec34e..434685bb210 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -42,5 +42,4 @@ human.dna.features["pod_hair"] = pick(GLOB.pod_hair_list) human.update_body(is_creating = TRUE) - human.update_hair(is_creating = TRUE) human.dna.species.spec_updatehealth(human) diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm index 74ea92cc87a..4ca41d463e2 100644 --- a/code/modules/antagonists/blob/blob_mobs.dm +++ b/code/modules/antagonists/blob/blob_mobs.dm @@ -188,7 +188,7 @@ icon = H.icon icon_state = "zombie" H.hairstyle = null - H.update_hair() + H.update_hair(is_creating = TRUE) H.forceMove(src) oldguy = H update_icons() diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 0c90f7e9732..ae12e196af7 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -95,7 +95,7 @@ H.temporarilyRemoveItemFromInventory(H.wear_suit, TRUE) H.update_inv_wear_suit() H.update_inv_head() - H.update_hair() + H.update_hair(is_creating = TRUE) if(blood_on_castoff) H.add_splatter_floor() diff --git a/code/modules/antagonists/creep/creep.dm b/code/modules/antagonists/creep/creep.dm index 9d485013c08..83d6b6e6b9d 100644 --- a/code/modules/antagonists/creep/creep.dm +++ b/code/modules/antagonists/creep/creep.dm @@ -41,7 +41,7 @@ var/mob/living/carbon/human/dummy/consistent/victim_dummy = new victim_dummy.hair_color = "#bb9966" // Brown victim_dummy.hairstyle = "Messy" - victim_dummy.update_hair() + victim_dummy.update_hair(is_creating = TRUE) var/icon/obsessed_icon = render_preview_outfit(preview_outfit) obsessed_icon.Blend(icon('icons/effects/blood.dmi', "uniformblood"), ICON_OVERLAY) diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm index 1824771ce21..d55c1ad8a53 100644 --- a/code/modules/antagonists/revolution/revolution.dm +++ b/code/modules/antagonists/revolution/revolution.dm @@ -206,7 +206,7 @@ /datum/antagonist/rev/head/proc/make_assistant_icon(hairstyle) var/mob/living/carbon/human/dummy/consistent/assistant = new assistant.hairstyle = hairstyle - assistant.update_hair() + assistant.update_hair(is_creating = TRUE) var/icon/assistant_icon = render_preview_outfit(/datum/outfit/job/assistant/consistent, assistant) assistant_icon.ChangeOpacity(0.5) diff --git a/code/modules/antagonists/thief/thief.dm b/code/modules/antagonists/thief/thief.dm index 24a01d1e0c1..181185ed6ac 100644 --- a/code/modules/antagonists/thief/thief.dm +++ b/code/modules/antagonists/thief/thief.dm @@ -169,7 +169,6 @@ thief.dna.update_ui_block(DNA_GENDER_BLOCK) thief.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK) thief.dna.update_ui_block(DNA_SKIN_TONE_BLOCK) - thief.update_hair(is_creating = TRUE) thief.update_body(is_creating = TRUE) // This outfit is used by the assets SS, which is ran before the atoms SS diff --git a/code/modules/clothing/outfits/event.dm b/code/modules/clothing/outfits/event.dm index 7fdc712038b..e17d725d7f5 100644 --- a/code/modules/clothing/outfits/event.dm +++ b/code/modules/clothing/outfits/event.dm @@ -25,4 +25,4 @@ H.facial_hairstyle = "Beard (Full)" H.hair_color = "#FFFFFF" H.facial_hair_color = "#FFFFFF" - H.update_hair() + H.update_hair(is_creating = TRUE) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 5e02ee1b154..3005e0dc511 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -664,7 +664,7 @@ emote("scream") facial_hairstyle = "Shaved" hairstyle = "Bald" - update_hair() + update_hair(is_creating = TRUE) ADD_TRAIT(src, TRAIT_DISFIGURED, TRAIT_GENERIC) update_damage_overlays() diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index 7871e5a7541..6f2e3b26aa5 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -74,8 +74,7 @@ There are several things that need to be remembered: /mob/living/carbon/human/regenerate_icons() if(!..()) - update_body() - update_hair() + update_body(is_creating = TRUE) update_inv_w_uniform() update_inv_wear_id() update_inv_gloves() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 267017a39ad..cc4aa251ecf 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -783,7 +783,7 @@ GLOBAL_LIST_EMPTY(features_by_species) ///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) human_mob.hairstyle = random_hairstyle(human_mob.gender) - human_mob.update_hair() + human_mob.update_hair(is_creating = TRUE) ///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) @@ -1032,7 +1032,7 @@ GLOBAL_LIST_EMPTY(features_by_species) return target.facial_hairstyle = "Shaved" target.hairstyle = "Bald" - target.update_hair() + target.update_hair(is_creating = TRUE) ////////////////// // ATTACK PROCS // diff --git a/code/modules/mob/living/carbon/human/species_types/felinid.dm b/code/modules/mob/living/carbon/human/species_types/felinid.dm index b4331a06986..244f864b559 100644 --- a/code/modules/mob/living/carbon/human/species_types/felinid.dm +++ b/code/modules/mob/living/carbon/human/species_types/felinid.dm @@ -103,7 +103,7 @@ /datum/species/human/felinid/prepare_human_for_preview(mob/living/carbon/human/human) human.hairstyle = "Hime Cut" human.hair_color = "#ffcccc" // pink - human.update_hair() + human.update_hair(is_creating = TRUE) var/obj/item/organ/internal/ears/cat/cat_ears = human.getorgan(/obj/item/organ/internal/ears/cat) if (cat_ears) diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index f08ca038bd1..8172575b592 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -19,7 +19,7 @@ /datum/species/human/prepare_human_for_preview(mob/living/carbon/human/human) human.hairstyle = "Business Hair" human.hair_color = "#bb9966" // brown - human.update_hair() + human.update_hair(is_creating = TRUE) /datum/species/human/get_scream_sound(mob/living/carbon/human/human) if(human.gender == MALE) diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index 6db07990ae9..2348bef2a1f 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -74,8 +74,7 @@ spawned_human.skin_tone = skin_tone else spawned_human.skin_tone = random_skin_tone() - spawned_human.update_hair() - spawned_human.update_body() + spawned_human.update_body(is_creating = TRUE) /obj/effect/mob_spawn/proc/name_mob(mob/living/spawned_mob, forced_name) var/chosen_name diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index dd8b2914a70..e13186b5f01 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -2388,12 +2388,12 @@ All effects don't start immediately, but rather get worse over time; the rate is if(metabolizer.age > 70) metabolizer.facial_hair_color = "#cccccc" metabolizer.hair_color = "#cccccc" - metabolizer.update_hair() + metabolizer.update_hair(is_creating = TRUE) if(metabolizer.age > 100) metabolizer.become_nearsighted(type) if(metabolizer.gender == MALE) metabolizer.facial_hairstyle = "Beard (Very Long)" - metabolizer.update_hair() + metabolizer.update_hair(is_creating = TRUE) if(metabolizer.age > 969) //Best not let people get older than this or i might incur G-ds wrath metabolizer.visible_message(span_notice("[metabolizer] becomes older than any man should be.. and crumbles into dust!")) diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 797efddc8a9..40c5a926a8e 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -121,7 +121,7 @@ var/mob/living/carbon/human/H = M H.facial_hairstyle = "Shaved" H.hairstyle = "Bald" - H.update_hair() // makes you loose hair as well + H.update_hair(is_creating = TRUE) // makes you loose hair as well M.set_species(/datum/species/human/krokodil_addict) M.adjustBruteLoss(50*REM, 0) // holy shit your skin just FELL THE FUCK OFF ..() @@ -692,7 +692,6 @@ druggy_dna.species.species_traits += NOBLOODOVERLAY invisible_man.update_body() - invisible_man.update_hair() invisible_man.remove_from_all_data_huds() invisible_man.sound_environment_override = SOUND_ENVIROMENT_PHASED diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index e9700c75212..ead19d86b8b 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -2208,7 +2208,7 @@ to_chat(exposed_human, span_notice("Hair starts sprouting from your scalp.")) exposed_human.hairstyle = picked_hair exposed_human.facial_hairstyle = picked_beard - exposed_human.update_hair() + exposed_human.update_hair(is_creating = TRUE) /datum/reagent/concentrated_barbers_aid name = "Concentrated Barber's Aid" @@ -2228,7 +2228,29 @@ to_chat(exposed_human, span_notice("Your hair starts growing at an incredible speed!")) exposed_human.hairstyle = "Very Long Hair" exposed_human.facial_hairstyle = "Beard (Very Long)" - exposed_human.update_hair() + exposed_human.update_hair(is_creating = TRUE) + +/datum/reagent/concentrated_barbers_aid/on_mob_life(mob/living/carbon/M, delta_time, times_fired) + . = ..() + if(current_cycle > 20 / creation_purity) + if(!ishuman(M)) + return + var/mob/living/carbon/human/human_mob = M + if(creation_purity == 1 && human_mob.has_quirk(/datum/quirk/item_quirk/bald)) + human_mob.remove_quirk(/datum/quirk/item_quirk/bald) + var/datum/species/species_datum = human_mob.dna?.species + if(!species_datum) + return + if(species_datum.species_traits.Find(HAIR)) + return + species_datum.species_traits |= HAIR + var/message + if(HAS_TRAIT(M, TRAIT_BALD)) + message = span_warning("You feel your scalp mutate, but you are still hopelessly bald.") + else + message = span_notice("Your scalp mutates, a full head of hair sprouting from it.") + to_chat(M, message) + human_mob.update_hair(is_creating = TRUE) /datum/reagent/baldium name = "Baldium" @@ -2248,7 +2270,7 @@ to_chat(exposed_human, span_danger("Your hair is falling out in clumps!")) exposed_human.hairstyle = "Bald" exposed_human.facial_hairstyle = "Shaved" - exposed_human.update_hair() + exposed_human.update_hair(is_creating = TRUE) /datum/reagent/saltpetre name = "Saltpetre" diff --git a/code/modules/reagents/withdrawal/generic_addictions.dm b/code/modules/reagents/withdrawal/generic_addictions.dm index d6b704f625e..8280950034b 100644 --- a/code/modules/reagents/withdrawal/generic_addictions.dm +++ b/code/modules/reagents/withdrawal/generic_addictions.dm @@ -111,7 +111,7 @@ if(affected_human.gender == MALE) to_chat(affected_human, span_warning("Your chin itches.")) affected_human.facial_hairstyle = "Beard (Full)" - affected_human.update_hair() + affected_human.update_hair(is_creating = TRUE) //Only like gross food affected_human.dna?.species.liked_food = GROSS affected_human.dna?.species.disliked_food = NONE diff --git a/code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png b/code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png index 50be89b8a80..d339c634eba 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png and b/code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png differ diff --git a/code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png b/code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png index 50be89b8a80..d339c634eba 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png and b/code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png differ