Merge pull request #10112 from Ghommie/Ghommie-cit447

Refactors that mess of a code for alternate worn clothing sprites for digitigrade and taurs.
This commit is contained in:
Lin
2020-01-10 01:31:20 +00:00
committed by GitHub
70 changed files with 366 additions and 577 deletions
+1 -27
View File
@@ -8,8 +8,6 @@
var/blockTracking = 0 //For AI tracking
var/can_toggle = null
dynamic_hair_suffix = "+generic"
var/muzzle_var = NORMAL_STYLE
mutantrace_variation = NO_MUTANTRACE_VARIATION //not all hats have muzzles
/obj/item/clothing/head/Initialize()
. = ..()
@@ -17,30 +15,6 @@
var/mob/living/carbon/human/H = loc
H.update_hair()
/obj/item/clothing/head/equipped(mob/user, slot)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/datum/species/pref_species = H.dna.species
if(mutantrace_variation)
if("mam_snouts" in pref_species.default_features)
if(H.dna.features["mam_snouts"] != "None")
muzzle_var = ALT_STYLE
else
muzzle_var = NORMAL_STYLE
else if("snout" in pref_species.default_features)
if(H.dna.features["snout"] != "None")
muzzle_var = ALT_STYLE
else
muzzle_var = NORMAL_STYLE
else
muzzle_var = NORMAL_STYLE
H.update_inv_head()
///Special throw_impact for hats to frisbee hats at people to place them on their heads.
/obj/item/clothing/head/throw_impact(atom/hit_atom, datum/thrownthing/thrownthing)
. = ..()
@@ -74,7 +48,7 @@
/obj/item/clothing/head/worn_overlays(isinhands = FALSE)
/obj/item/clothing/head/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = list()
if(!isinhands)
if(damaged_clothes)
+2 -2
View File
@@ -91,7 +91,7 @@
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
cold_protection = HEAD
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/head/hardhat/weldhat
name = "welding hard hat"
@@ -125,7 +125,7 @@
playsound(src, 'sound/mecha/mechmove03.ogg', 50, TRUE) //Visors don't just come from nothing
update_icon()
/obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands)
/obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands, icon_file, style_flags = NONE)
. = ..()
if(!isinhands)
. += mutable_appearance('icons/mob/head.dmi', "weldhelmet")
+3 -3
View File
@@ -76,7 +76,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
dog_fashion = null
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/head/helmet/attack_self(mob/user)
if(can_toggle && !user.incapacitated())
@@ -217,7 +217,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 80
dog_fashion = null
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/head/helmet/knight/Initialize(mapload)
@@ -246,7 +246,7 @@
icon_state = "skull"
item_state = "skull"
strip_delay = 100
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
//LightToggle
+1 -1
View File
@@ -66,7 +66,7 @@
item_state = "syndicate-helm-black-red"
desc = "A plastic replica of a Syndicate agent's space helmet. You'll look just like a real murderous Syndicate agent in this! This is a toy, it is not made for use in space!"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/head/cueball
name = "cueball helmet"
+2 -2
View File
@@ -28,7 +28,7 @@
visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
resistance_flags = FIRE_PROOF
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/head/welding/attack_self(mob/user)
weldingvisortoggle(user)
@@ -206,7 +206,7 @@
M.color = hair_color
add_overlay(M)
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, file2use)
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = list()
if(!isinhands)
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]