Removes Dynamic Hair Suffixes (#12100)

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-03-18 03:14:42 +00:00
committed by GitHub
co-authored by tralezab
parent 0def9693df
commit 5b05a6062c
29 changed files with 29 additions and 110 deletions
-1
View File
@@ -53,7 +53,6 @@
flags_inv = NONE
icon_state = "cage"
inhand_icon_state = "cage"
dynamic_hair_suffix = ""
worn_y_offset = 7
/obj/item/clothing/head/helmet/chaplain/ancient
-7
View File
@@ -42,13 +42,6 @@
var/pocket_storage_component_path
//These allow head/mask items to dynamically alter the user's hair
// and facial hair, checking hair_extensions.dmi and facialhair_extensions.dmi
// for a state matching hair_state+dynamic_hair_suffix
// THESE OVERRIDE THE HIDEHAIR FLAGS
var/dynamic_hair_suffix = ""//head > mask for head hair
var/dynamic_fhair_suffix = ""//mask > head for facial hair
/// How much clothing damage has been dealt to each of the limbs of the clothing, assuming it covers more than one limb
var/list/damage_by_parts
/// How much integrity is in a specific limb before that limb is disabled (for use in [/obj/item/clothing/proc/take_damage_zone], and only if we cover multiple zones.) Set to 0 to disable shredding.
-7
View File
@@ -7,13 +7,6 @@
slot_flags = ITEM_SLOT_HEAD
var/blockTracking = 0 //For AI tracking
var/can_toggle = null
dynamic_hair_suffix = "+generic"
/obj/item/clothing/head/Initialize(mapload)
. = ..()
if(ishuman(loc) && dynamic_hair_suffix)
var/mob/living/carbon/human/H = loc
H.update_hair()
///Special throw_impact for hats to frisbee hats at people to place them on their heads/attempt to de-hat them.
/obj/item/clothing/head/throw_impact(atom/hit_atom, datum/thrownthing/thrownthing)
-2
View File
@@ -3,7 +3,6 @@
desc = "A pair of kitty ears. Meow!"
icon_state = "kitty"
color = "#999999"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/kitty
@@ -25,6 +24,5 @@
name = "rabbit ears"
desc = "Wearing these makes you look useless, and only good for your sex appeal."
icon_state = "bunny"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/rabbit
+4 -6
View File
@@ -26,7 +26,6 @@
desc = "A rare chef's hat meant for hat collectors!"
icon_state = "chef"
inhand_icon_state = "chef"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/chef
@@ -55,7 +54,6 @@
name = "collectable police officer's hat"
desc = "A collectable police officer's Hat. This hat emphasizes that you are THE LAW."
icon_state = "policehelm"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/warden
@@ -82,7 +80,7 @@
icon_state = "headslime"
inhand_icon_state = "headslime"
clothing_flags = SNUG_FIT
dynamic_hair_suffix = ""
/obj/item/clothing/head/collectable/flatcap
name = "collectable flat cap"
@@ -106,7 +104,7 @@
desc = "The fur feels... a bit too realistic."
icon_state = "kitty"
inhand_icon_state = "kitty"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/kitty
@@ -115,7 +113,7 @@
desc = "Not as lucky as the feet!"
icon_state = "bunny"
inhand_icon_state = "bunny"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/rabbit
@@ -139,7 +137,7 @@
name = "collectable HoS hat"
desc = "Now you too can beat prisoners, set silly sentences, and arrest for no reason!"
icon_state = "hoscap"
dynamic_hair_suffix = ""
/obj/item/clothing/head/collectable/hop
name = "collectable HoP hat"
+1 -1
View File
@@ -12,7 +12,7 @@
attack_verb_continuous = list("warns", "cautions", "smashes")
attack_verb_simple = list("warn", "caution", "smash")
resistance_flags = NONE
dynamic_hair_suffix = ""
/obj/item/clothing/head/cone/worn_overlays(mutable_appearance/standing, isinhands, icon_file)
. = ..()
+1 -1
View File
@@ -88,7 +88,7 @@
flags_inv = HIDEHAIR //bald
icon_state = "shrine_wig"
inhand_icon_state = "shrine_wig"
dynamic_hair_suffix = ""
worn_y_offset = 1
/obj/item/clothing/head/cardborg
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "crown"
armor = list(MELEE = 15, BULLET = 0, LASER = 0,ENERGY = 10, BOMB = 0, BIO = 0, FIRE = 100, ACID = 50, WOUND = 5)
resistance_flags = FIRE_PROOF
dynamic_hair_suffix = ""
/obj/item/clothing/head/crown/fancy
name = "magnificent crown"
+1 -1
View File
@@ -5,7 +5,7 @@
greyscale_config = /datum/greyscale_config/beret
greyscale_config_worn = /datum/greyscale_config/beret/worn
greyscale_colors = "#972A2A"
dynamic_hair_suffix = ""
/obj/item/clothing/head/frenchberet/equipped(mob/M, slot)
. = ..()
+2 -2
View File
@@ -8,7 +8,7 @@
actions_types = list(/datum/action/item_action/toggle_helmet_light)
clothing_flags = SNUG_FIT | PLASMAMAN_HELMET_EXEMPT
resistance_flags = FIRE_PROOF
dynamic_hair_suffix = "+generic"
light_system = MOVABLE_LIGHT_DIRECTIONAL
light_range = 4
light_power = 0.8
@@ -248,6 +248,6 @@
flags_inv = 0
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)
light_range = 1 //luminosity when on
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/reindeer
+3 -3
View File
@@ -39,7 +39,7 @@
name = "nurse's hat"
desc = "It allows quick identification of trained medical personnel."
icon_state = "nursehat"
dynamic_hair_suffix = ""
dog_fashion = /datum/dog_fashion/head/nurse
@@ -48,7 +48,7 @@
desc = "Gentleman, elite aboard!"
icon_state = "bowler"
inhand_icon_state = "bowler"
dynamic_hair_suffix = ""
/obj/item/clothing/head/bearpelt
name = "bear pelt hat"
@@ -117,7 +117,7 @@
name = "jester hat"
desc = "A hat with bells, to add some merriness to the suit."
icon_state = "jester_hat"
dynamic_hair_suffix = ""
/obj/item/clothing/head/jester/alt
icon_state = "jester2"
+1 -1
View File
@@ -227,7 +227,7 @@
name = "police officer's hat"
desc = "A police officer's Hat. This hat emphasizes that you are THE LAW."
icon_state = "policehelm"
dynamic_hair_suffix = ""
/obj/item/clothing/head/helmet/constable
name = "constable helmet"
+2 -3
View File
@@ -12,7 +12,7 @@
desc = "The commander in chef's head wear."
strip_delay = 10
equip_delay_other = 10
dynamic_hair_suffix = ""
pocket_storage_component_path = /datum/component/storage/concrete/pockets/chefhat
dog_fashion = /datum/dog_fashion/head/chef
///the chance that the movements of a mouse inside of this hat get relayed to the human wearing the hat
@@ -125,7 +125,7 @@
desc = "A beret, a mime's favorite headwear."
icon_state = "beret"
dog_fashion = /datum/dog_fashion/head/beret
dynamic_hair_suffix = ""
greyscale_config = /datum/greyscale_config/beret
greyscale_config_worn = /datum/greyscale_config/beret/worn
greyscale_colors = "#972A2A"
@@ -140,7 +140,6 @@
armor = list(MELEE = 40, BULLET = 30, LASER = 25, ENERGY = 35, BOMB = 25, BIO = 10, FIRE = 50, ACID = 60, WOUND = 10)
icon_state = "hoscap"
strip_delay = 80
dynamic_hair_suffix = ""
//SKYRAT EDIT ADDITION START
unique_reskin = list(
"Sheriff" = list(
+1 -1
View File
@@ -40,7 +40,7 @@
desc = "Yarr."
icon_state = "bandana"
inhand_icon_state = "bandana"
dynamic_hair_suffix = ""
/obj/item/clothing/head/bandana/armored
armor = list(MELEE = 30, BULLET = 50, LASER = 30,ENERGY = 40, BOMB = 30, BIO = 30, FIRE = 60, ACID = 75)
@@ -11,8 +11,7 @@
permeability_coefficient = 0.01
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 80, ACID = 70)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
dynamic_hair_suffix = ""
dynamic_fhair_suffix = ""
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
heat_protection = HEAD
@@ -5,8 +5,7 @@
greyscale_config_worn = /datum/greyscale_config/beret_badge/worn
icon_state = "beret_badge"
greyscale_colors = "#972A2A#F2F2F2"
dynamic_hair_suffix = "+generic"
dynamic_fhair_suffix = "+generic"
flags_inv = 0
armor = list(MELEE = 80, BULLET = 80, LASER = 50, ENERGY = 60, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 15)
strip_delay = 130
+1 -1
View File
@@ -320,7 +320,7 @@
body_parts_covered = HEAD
clothing_flags = THICKMATERIAL
flags_inv = HIDEHAIR|HIDEEARS
dynamic_hair_suffix = ""
/obj/item/clothing/suit/hooded/bloated_human //OH MY GOD WHAT HAVE YOU DONE!?!?!?
name = "bloated human suit"
+1 -1
View File
@@ -84,7 +84,7 @@
/obj/item/clothing/head/hooded
var/obj/item/clothing/suit/hooded/suit
dynamic_hair_suffix = ""
/obj/item/clothing/head/hooded/Destroy()
suit = null
+1 -2
View File
@@ -63,8 +63,7 @@
clothing_flags = THICKMATERIAL | SNUG_FIT
armor = list(MELEE = 20, BULLET = 0, LASER = 20,ENERGY = 30, BOMB = 100, BIO = 0, FIRE = 80, ACID = 50)
flags_inv = HIDEFACE|HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
dynamic_hair_suffix = ""
dynamic_fhair_suffix = ""
cold_protection = HEAD
min_cold_protection_temperature = HELMET_MIN_TEMP_PROTECT
heat_protection = HEAD
@@ -370,10 +370,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)
@@ -547,9 +547,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 && !(ROBOTIC_LIMBS in species_traits)) //SKYRAT EDIT CHANGE - CUSTOMIZATION
return
@@ -557,41 +554,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)
@@ -608,12 +583,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)
@@ -621,29 +596,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
@@ -654,22 +620,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
+1 -1
View File
@@ -8,7 +8,7 @@
body_parts_covered = HEAD
heat_protection = HEAD
cold_protection = HEAD
dynamic_hair_suffix = ""
obj_flags = IMMUTABLE_SLOW
var/alternate_layer = NECK_LAYER
var/obj/item/mod/control/mod
@@ -101,7 +101,7 @@ Slimecrossing Armor
slot_flags = ITEM_SLOT_HEAD
clothing_traits = list(TRAIT_PACIFISM)
body_parts_covered = NONE
dynamic_hair_suffix = ""
force = 0
throwforce = 0
w_class = WEIGHT_CLASS_TINY
Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

@@ -35,8 +35,6 @@
target_clothing.worn_icon_muzzled = initial(picked_clothing.worn_icon_muzzled)
target_clothing.flags_inv = initial(picked_clothing.flags_inv)
target_clothing.visor_flags_cover = initial(picked_clothing.visor_flags_cover)
target_clothing.dynamic_hair_suffix = initial(picked_clothing.dynamic_hair_suffix)
target_clothing.dynamic_fhair_suffix = initial(picked_clothing.dynamic_fhair_suffix)
target_clothing.slowdown = 0
// var/slow = initial(picked_clothing.slowdown) /// DISABLED UNTIL YOU CAN MAKE THIS WORK WITH THE BROKEN CHAMELEON CLOTHES!!!
// if(slow)
@@ -93,8 +93,6 @@
mutant_variants = NONE
///////////////////////////////////////////////////////////////////////HEAD
/obj/item/clothing/head/bio_hood
dynamic_hair_suffix = ""
/obj/item/clothing/head/bio_hood/general
worn_icon = 'modular_skyrat/modules/aesthetics/clothing/head.dmi'
@@ -63,7 +63,6 @@
name = "maid headband"
desc = "Maid in China."
icon_state = "maid"
dynamic_hair_suffix = ""
mutant_variants = NONE
@@ -1181,7 +1181,6 @@
worn_icon = 'modular_skyrat/master_files/icons/donator/mob/clothing/head.dmi'
icon_state = "occulthood"
mutant_variants = NONE
dynamic_hair_suffix = "+generic"
// Donation reward for gamerguy14948
/obj/item/clothing/suit/hooded/occult