Refactors that mess of a code for alternate worn clothing sprites for digitigrade and taurs.

This commit is contained in:
Ghommie
2019-12-08 09:02:41 +01:00
parent 8bc5580a01
commit 8ec4bdaef5
52 changed files with 336 additions and 529 deletions
+5 -45
View File
@@ -9,56 +9,16 @@
var/blood_overlay_type = "suit"
var/togglename = null
var/suittoggled = FALSE
mutantrace_variation = STYLE_DIGITIGRADE
var/adjusted = NORMAL_STYLE
mutantrace_variation = MUTANTRACE_VARIATION
var/tauric = FALSE //Citadel Add for tauric hardsuits
var/taurmode = NOT_TAURIC
var/dimension_x = 32
var/dimension_y = 32
var/center = FALSE //Should we center the sprite?
/obj/item/clothing/suit/equipped(mob/user, slot)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(mutantrace_variation)
if(DIGITIGRADE in H.dna.species.species_traits)
adjusted = ALT_STYLE
H.update_inv_wear_suit()
else if(adjusted == ALT_STYLE)
adjusted = NORMAL_STYLE
if(("taur" in H.dna.species.mutant_bodyparts) && (H.dna.features["taur"] != "None"))
if(H.dna.features["taur"] in GLOB.noodle_taurs)
taurmode = SNEK_TAURIC
if(tauric == TRUE)
center = TRUE
dimension_x = 64
else if(H.dna.features["taur"] in GLOB.paw_taurs)
taurmode = PAW_TAURIC
if(tauric == TRUE)
center = TRUE
dimension_x = 64
else
taurmode = NOT_TAURIC
if(tauric == TRUE)
center = FALSE
dimension_x = 32
H.update_inv_wear_suit()
/obj/item/clothing/suit/worn_overlays(isinhands = FALSE)
. = list()
/obj/item/clothing/suit/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = ..()
if(!isinhands)
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]")
if(blood_DNA)
if(tauric && taurmode >= SNEK_TAURIC)
. += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color())
else
. += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color())
var/file2use = (style_flags & STYLE_ALL_TAURIC) ? 'modular_citadel/icons/mob/64x32_effects.dmi' : 'icons/effects/blood.dmi'
. += mutable_appearance(file2use, "[blood_overlay_type]blood", color = blood_DNA_to_color())
var/mob/living/carbon/human/M = loc
if(ishuman(M) && M.w_uniform)
var/obj/item/clothing/under/U = M.w_uniform
+2 -2
View File
@@ -9,7 +9,7 @@
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT
resistance_flags = ACID_PROOF
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/suit/bio_suit
name = "bio suit"
@@ -28,7 +28,7 @@
strip_delay = 70
equip_delay_other = 70
resistance_flags = ACID_PROOF
tauric = TRUE //Citadel Add for tauric hardsuits
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC
//Standard biosuit, orange stripe
/obj/item/clothing/head/bio_hood/general
+2 -2
View File
@@ -207,7 +207,7 @@
item_state = "techpriest"
body_parts_covered = CHEST|GROIN|LEGS|ARMS
hoodtype = /obj/item/clothing/head/hooded/techpriest
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/head/hooded/techpriest
name = "techpriest's hood"
@@ -216,4 +216,4 @@
item_state = "techpriesthood"
body_parts_covered = HEAD
flags_inv = HIDEHAIR|HIDEEARS
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
+1 -1
View File
@@ -816,7 +816,7 @@
blood_overlay_type = "armor"
body_parts_covered = CHEST
resistance_flags = NONE
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 5, "bio" = 0, "rad" = 0, "fire" = -5, "acid" = -15) //nylon sucks against acid
/obj/item/clothing/suit/assu_suit
+1 -14
View File
@@ -179,8 +179,7 @@
RemoveHelmet()
/obj/item/clothing/suit/space/hardsuit/proc/ToggleHelmet()
var/mob/living/carbon/human/H = src.loc
var/datum/species/pref_species = H.dna.species
var/mob/living/carbon/human/H = loc
if(!helmettype)
return
if(!helmet)
@@ -194,18 +193,6 @@
to_chat(H, "<span class='warning'>You're already wearing something on your head!</span>")
return
else if(H.equip_to_slot_if_possible(helmet,SLOT_HEAD,0,0,1))
if(helmet.mutantrace_variation)
if("mam_snouts" in pref_species.default_features)
if(H.dna.features["mam_snouts"] != "None")
helmet.muzzle_var = ALT_STYLE
else if("snout" in pref_species.default_features)
if(H.dna.features["snout"] != "None")
helmet.muzzle_var = ALT_STYLE
else
helmet.muzzle_var = NORMAL_STYLE
H.update_inv_head()
to_chat(H, "<span class='notice'>You engage the helmet on the hardsuit.</span>")
suittoggled = TRUE
H.update_inv_wear_suit()
+9 -6
View File
@@ -21,7 +21,7 @@
allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/extinguisher, /obj/item/crowbar)
slowdown = 1
armor = list("melee" = 15, "bullet" = 5, "laser" = 20, "energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAUR
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
@@ -30,11 +30,12 @@
strip_delay = 60
equip_delay_other = 60
resistance_flags = FIRE_PROOF
tauric = TRUE //Citadel Add for tauric hardsuits
/obj/item/clothing/suit/fire/firefighter
icon_state = "firesuit"
item_state = "firefighter"
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAUR
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC
/obj/item/clothing/suit/fire/heavy
@@ -50,6 +51,8 @@
icon_state = "atmos_firesuit"
item_state = "firesuit_atmos"
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAUR
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC
/*
* Bomb protection
@@ -71,7 +74,7 @@
equip_delay_other = 70
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
resistance_flags = NONE
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/suit/bomb_suit
@@ -94,7 +97,7 @@
strip_delay = 70
equip_delay_other = 70
resistance_flags = NONE
tauric = TRUE //Citadel Add for tauric hardsuits
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC
/obj/item/clothing/head/bomb_hood/security
@@ -131,7 +134,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
resistance_flags = NONE
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
mutantrace_variation = MUTANTRACE_VARIATION
mutantrace_variation = STYLE_MUZZLE
/obj/item/clothing/suit/radiation
name = "radiation suit"
@@ -151,4 +154,4 @@
flags_inv = HIDEJUMPSUIT|HIDETAUR
resistance_flags = NONE
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
tauric = TRUE //Citadel Add for tauric hardsuits
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_ALL_TAURIC
+14 -14
View File
@@ -9,7 +9,7 @@
siemens_coefficient = 0.5
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/armor/xcomsquaddie/dredd
name = "Judge Armor"
@@ -18,7 +18,7 @@
item_state = "dredd-suit"
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/armor/xcomarmor
@@ -32,7 +32,7 @@
siemens_coefficient = 0.5
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/armor/vest/neorussian
name = "neo-Russian vest"
@@ -41,7 +41,7 @@
item_state = "nr_vest"
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/armor/doomguy
name = "Doomguy's armor"
@@ -53,7 +53,7 @@
armor = list(melee = 50, bullet = 30, laser = 20, energy = 20, bomb = 30, bio = 0, rad = 0)
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/kaminacape
@@ -63,7 +63,7 @@
body_parts_covered = 0
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/officercoat
name = "Officer's Coat"
@@ -71,7 +71,7 @@
icon_state = "officersuit"
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/soldiercoat
name = "Soldier's Coat"
@@ -79,7 +79,7 @@
icon_state = "soldiersuit"
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/russofurcoat
name = "russian fur coat"
@@ -89,7 +89,7 @@
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/doshjacket
name = "Plasterer's Jacket"
@@ -98,7 +98,7 @@
body_parts_covered = CHEST|GROIN|ARMS
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/maidapron
name = "Apron"
@@ -107,7 +107,7 @@
body_parts_covered = CHEST|GROIN
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/clownpiece
name = "small fairy wings"
@@ -116,7 +116,7 @@
body_parts_covered = 0
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/clownpiece/flying
name = "small fairy wings"
@@ -124,7 +124,7 @@
icon_state = "clownpiece-fly"
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE
/obj/item/clothing/suit/raincoat
name = "Raincoat"
@@ -133,6 +133,6 @@
body_parts_covered =CHEST|GROIN|LEGS|ARMS|HANDS
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
alternate_worn_icon = 'modular_citadel/icons/mob/citadel/suit.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
mutantrace_variation = NONE