Concentrated barbers aid can give hairless species hair + fixes hair updating once and for all (probably) (#68580)

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
This commit is contained in:
Y0SH1M4S73R
2022-07-25 03:21:23 -07:00
committed by GitHub
co-authored by Kapu1178
parent 0b2741dfc3
commit 196250c8f7
24 changed files with 50 additions and 32 deletions
-1
View File
@@ -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)
+1 -1
View File
@@ -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()
@@ -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()
+1 -1
View File
@@ -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)
@@ -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)
-1
View File
@@ -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
+1 -1
View File
@@ -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)
@@ -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()
@@ -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()
@@ -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 //
@@ -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)
@@ -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)
+1 -2
View File
@@ -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
@@ -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!"))
@@ -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
@@ -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"
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB