mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Removes Dynamic Hair Suffixes (#65209)
About The Pull Request Removes Dynamic Hair Suffixes + Included files Why It's Good For The Game Facial hair suffixes went unused, @Twaticus and the spriting team are planning something new for hair that is not going to use this horribly underused and just kinda like, bad system Changelog not player facing
This commit is contained in:
@@ -274,10 +274,6 @@
|
||||
/mob/living/carbon/human/head_update(obj/item/I, forced)
|
||||
if((I.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || forced)
|
||||
update_hair()
|
||||
else
|
||||
var/obj/item/clothing/C = I
|
||||
if(istype(C) && C.dynamic_hair_suffix)
|
||||
update_hair()
|
||||
if(I.flags_inv & HIDEEYES || forced)
|
||||
update_inv_glasses()
|
||||
if(I.flags_inv & HIDEEARS || forced)
|
||||
|
||||
@@ -545,9 +545,6 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
var/hair_hidden = FALSE //ignored if the matching dynamic_X_suffix is non-empty
|
||||
var/facialhair_hidden = FALSE // ^
|
||||
|
||||
var/dynamic_hair_suffix = "" //if this is non-null, and hair+suffix matches an iconstate, then we render that hair instead
|
||||
var/dynamic_fhair_suffix = ""
|
||||
|
||||
//for augmented heads
|
||||
if(noggin.status == BODYPART_ROBOTIC)
|
||||
return
|
||||
@@ -555,41 +552,19 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
//we check if our hat or helmet hides our facial hair.
|
||||
if(H.head)
|
||||
var/obj/item/I = H.head
|
||||
if(isclothing(I))
|
||||
var/obj/item/clothing/C = I
|
||||
dynamic_fhair_suffix = C.dynamic_fhair_suffix
|
||||
if(I.flags_inv & HIDEFACIALHAIR)
|
||||
facialhair_hidden = TRUE
|
||||
|
||||
if(H.wear_mask)
|
||||
var/obj/item/I = H.wear_mask
|
||||
if(isclothing(I))
|
||||
var/obj/item/clothing/C = I
|
||||
dynamic_fhair_suffix = C.dynamic_fhair_suffix //mask > head in terms of facial hair
|
||||
if(I.flags_inv & HIDEFACIALHAIR)
|
||||
facialhair_hidden = TRUE
|
||||
|
||||
if(H.facial_hairstyle && (FACEHAIR in species_traits) && (!facialhair_hidden || dynamic_fhair_suffix))
|
||||
if(H.facial_hairstyle && (FACEHAIR in species_traits) && !facialhair_hidden)
|
||||
S = GLOB.facial_hairstyles_list[H.facial_hairstyle]
|
||||
if(S)
|
||||
|
||||
//List of all valid dynamic_fhair_suffixes
|
||||
var/static/list/fextensions
|
||||
if(!fextensions)
|
||||
var/icon/fhair_extensions = icon('icons/mob/facialhair_extensions.dmi')
|
||||
fextensions = list()
|
||||
for(var/s in fhair_extensions.IconStates(1))
|
||||
fextensions[s] = TRUE
|
||||
qdel(fhair_extensions)
|
||||
|
||||
//Is hair+dynamic_fhair_suffix a valid iconstate?
|
||||
var/fhair_state = S.icon_state
|
||||
var/fhair_file = S.icon
|
||||
if(fextensions[fhair_state+dynamic_fhair_suffix])
|
||||
fhair_state += dynamic_fhair_suffix
|
||||
fhair_file = 'icons/mob/facialhair_extensions.dmi'
|
||||
|
||||
var/mutable_appearance/facial_overlay = mutable_appearance(fhair_file, fhair_state, -HAIR_LAYER)
|
||||
var/mutable_appearance/facial_overlay = mutable_appearance(S.icon, S.icon_state, -HAIR_LAYER)
|
||||
var/mutable_appearance/gradient_overlay
|
||||
|
||||
if(!forced_colour)
|
||||
@@ -606,12 +581,12 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
var/grad_style = LAZYACCESS(H.grad_style, GRADIENT_FACIAL_HAIR_KEY)
|
||||
if(grad_style)
|
||||
var/grad_color = LAZYACCESS(H.grad_color, GRADIENT_FACIAL_HAIR_KEY)
|
||||
gradient_overlay = make_gradient_overlay(fhair_file, fhair_state, HAIR_LAYER, GLOB.facial_hair_gradients_list[grad_style], grad_color)
|
||||
gradient_overlay = make_gradient_overlay(S.icon, S.icon_state, HAIR_LAYER, GLOB.facial_hair_gradients_list[grad_style], grad_color)
|
||||
else
|
||||
facial_overlay.color = forced_colour
|
||||
|
||||
facial_overlay.alpha = hair_alpha
|
||||
facial_overlay.overlays += emissive_blocker(fhair_file, fhair_state, alpha = hair_alpha)
|
||||
facial_overlay.overlays += emissive_blocker(S.icon, S.icon_state, alpha = hair_alpha)
|
||||
|
||||
standing += facial_overlay
|
||||
if(gradient_overlay)
|
||||
@@ -619,29 +594,20 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
|
||||
if(H.head)
|
||||
var/obj/item/I = H.head
|
||||
if(isclothing(I))
|
||||
var/obj/item/clothing/C = I
|
||||
dynamic_hair_suffix = C.dynamic_hair_suffix
|
||||
if(I.flags_inv & HIDEHAIR)
|
||||
hair_hidden = TRUE
|
||||
|
||||
if(H.w_uniform)
|
||||
var/obj/item/item_uniform = H.w_uniform
|
||||
if(isclothing(item_uniform))
|
||||
var/obj/item/clothing/clothing_object = item_uniform
|
||||
dynamic_hair_suffix = clothing_object.dynamic_hair_suffix
|
||||
if(item_uniform.flags_inv & HIDEHAIR)
|
||||
hair_hidden = TRUE
|
||||
|
||||
if(H.wear_mask)
|
||||
var/obj/item/I = H.wear_mask
|
||||
if(!dynamic_hair_suffix && isclothing(I)) //head > mask in terms of head hair
|
||||
var/obj/item/clothing/C = I
|
||||
dynamic_hair_suffix = C.dynamic_hair_suffix
|
||||
if(I.flags_inv & HIDEHAIR)
|
||||
hair_hidden = TRUE
|
||||
|
||||
if(!hair_hidden || dynamic_hair_suffix)
|
||||
if(!hair_hidden)
|
||||
var/mutable_appearance/hair_overlay = mutable_appearance(layer = -HAIR_LAYER)
|
||||
var/mutable_appearance/gradient_overlay
|
||||
if(!hair_hidden && !H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
|
||||
@@ -652,22 +618,8 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
else if(H.hairstyle && (HAIR in species_traits))
|
||||
S = GLOB.hairstyles_list[H.hairstyle]
|
||||
if(S)
|
||||
|
||||
//List of all valid dynamic_hair_suffixes
|
||||
var/static/list/extensions
|
||||
if(!extensions)
|
||||
var/icon/hair_extensions = icon('icons/mob/hair_extensions.dmi') //hehe
|
||||
extensions = list()
|
||||
for(var/s in hair_extensions.IconStates(1))
|
||||
extensions[s] = TRUE
|
||||
qdel(hair_extensions)
|
||||
|
||||
//Is hair+dynamic_hair_suffix a valid iconstate?
|
||||
var/hair_state = S.icon_state
|
||||
var/hair_file = S.icon
|
||||
if(extensions[hair_state+dynamic_hair_suffix])
|
||||
hair_state += dynamic_hair_suffix
|
||||
hair_file = 'icons/mob/hair_extensions.dmi'
|
||||
|
||||
hair_overlay.icon = hair_file
|
||||
hair_overlay.icon_state = hair_state
|
||||
|
||||
Reference in New Issue
Block a user