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:
@@ -27,28 +27,33 @@
|
||||
extra2 = TRUE
|
||||
center = TRUE
|
||||
dimension_x = 64
|
||||
var/taur_mode = NOT_TAURIC
|
||||
var/taur_mode = NONE //Must be a single specific tauric suit variation bitflag. Don't do FLAG_1|FLAG_2
|
||||
var/alt_taur_mode = NONE //Same as above.
|
||||
color_src = MATRIXED
|
||||
|
||||
/datum/sprite_accessory/taur/none
|
||||
dimension_x = 32
|
||||
center = FALSE
|
||||
name = "None"
|
||||
icon_state = "None"
|
||||
|
||||
/datum/sprite_accessory/taur/cow
|
||||
name = "Cow"
|
||||
icon_state = "cow"
|
||||
taur_mode = HOOF_TAURIC
|
||||
taur_mode = STYLE_HOOF_TAURIC
|
||||
alt_taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/deer
|
||||
name = "Deer"
|
||||
icon_state = "deer"
|
||||
taur_mode = HOOF_TAURIC
|
||||
taur_mode = STYLE_HOOF_TAURIC
|
||||
alt_taur_mode = STYLE_PAW_TAURIC
|
||||
color_src = MUTCOLORS
|
||||
|
||||
/datum/sprite_accessory/taur/drake
|
||||
name = "Drake"
|
||||
icon_state = "drake"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/drider
|
||||
name = "Drider"
|
||||
@@ -58,67 +63,68 @@
|
||||
/datum/sprite_accessory/taur/eevee
|
||||
name = "Eevee"
|
||||
icon_state = "eevee"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
color_src = MUTCOLORS
|
||||
|
||||
/datum/sprite_accessory/taur/fox
|
||||
name = "Fox"
|
||||
icon_state = "fox"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/husky
|
||||
name = "Husky"
|
||||
icon_state = "husky"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/horse
|
||||
name = "Horse"
|
||||
icon_state = "horse"
|
||||
taur_mode = HOOF_TAURIC
|
||||
taur_mode = STYLE_HOOF_TAURIC
|
||||
alt_taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/lab
|
||||
name = "Lab"
|
||||
icon_state = "lab"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/naga
|
||||
name = "Naga"
|
||||
icon_state = "naga"
|
||||
taur_mode = SNEK_TAURIC
|
||||
taur_mode = STYLE_SNEK_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/otie
|
||||
name = "Otie"
|
||||
icon_state = "otie"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/pede
|
||||
name = "Scolipede"
|
||||
icon_state = "pede"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
color_src = MUTCOLORS
|
||||
|
||||
/datum/sprite_accessory/taur/panther
|
||||
name = "Panther"
|
||||
icon_state = "panther"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/shepherd
|
||||
name = "Shepherd"
|
||||
icon_state = "shepherd"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/tentacle
|
||||
name = "Tentacle"
|
||||
icon_state = "tentacle"
|
||||
taur_mode = SNEK_TAURIC
|
||||
taur_mode = STYLE_SNEK_TAURIC
|
||||
color_src = MUTCOLORS
|
||||
|
||||
/datum/sprite_accessory/taur/tiger
|
||||
name = "Tiger"
|
||||
icon_state = "tiger"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
/datum/sprite_accessory/taur/wolf
|
||||
name = "Wolf"
|
||||
icon_state = "wolf"
|
||||
taur_mode = PAW_TAURIC
|
||||
taur_mode = STYLE_PAW_TAURIC
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH
|
||||
layer = MOB_LAYER
|
||||
max_integrity = 100
|
||||
mutantrace_variation = MUTANTRACE_VARIATION
|
||||
mutantrace_variation = STYLE_MUZZLE
|
||||
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
// this needs to be FIRST because qdel calls update_body which checks if we have DIGITIGRADE legs or not and if not then removes DIGITIGRADE from species_traits
|
||||
if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
|
||||
species_traits += DIGITIGRADE
|
||||
species_traits |= DIGITIGRADE
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(FALSE)
|
||||
|
||||
@@ -611,34 +611,34 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
var/tauric = H.dna.features["taur"] && H.dna.features["taur"] != "None"
|
||||
|
||||
if("tail_lizard" in mutant_bodyparts)
|
||||
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
|
||||
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
|
||||
bodyparts_to_add -= "tail_lizard"
|
||||
|
||||
if("waggingtail_lizard" in mutant_bodyparts)
|
||||
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
|
||||
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
|
||||
bodyparts_to_add -= "waggingtail_lizard"
|
||||
else if ("tail_lizard" in mutant_bodyparts)
|
||||
bodyparts_to_add -= "waggingtail_lizard"
|
||||
|
||||
if("tail_human" in mutant_bodyparts)
|
||||
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
|
||||
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
|
||||
bodyparts_to_add -= "tail_human"
|
||||
|
||||
|
||||
if("waggingtail_human" in mutant_bodyparts)
|
||||
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
|
||||
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
|
||||
bodyparts_to_add -= "waggingtail_human"
|
||||
else if ("tail_human" in mutant_bodyparts)
|
||||
bodyparts_to_add -= "waggingtail_human"
|
||||
|
||||
if("spines" in mutant_bodyparts)
|
||||
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT))
|
||||
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR))
|
||||
bodyparts_to_add -= "spines"
|
||||
|
||||
if("waggingspines" in mutant_bodyparts)
|
||||
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT))
|
||||
if(!H.dna.features["spines"] || H.dna.features["spines"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR))
|
||||
bodyparts_to_add -= "waggingspines"
|
||||
else if ("tail" in mutant_bodyparts)
|
||||
bodyparts_to_add -= "waggingspines"
|
||||
@@ -688,11 +688,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
//Other Races
|
||||
if("mam_tail" in mutant_bodyparts)
|
||||
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
|
||||
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
|
||||
bodyparts_to_add -= "mam_tail"
|
||||
|
||||
if("mam_waggingtail" in mutant_bodyparts)
|
||||
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
|
||||
if((H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)) || tauric)
|
||||
bodyparts_to_add -= "mam_waggingtail"
|
||||
else if ("mam_tail" in mutant_bodyparts)
|
||||
bodyparts_to_add -= "mam_waggingtail"
|
||||
@@ -706,7 +706,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
bodyparts_to_add -= "mam_snouts"
|
||||
|
||||
if("taur" in mutant_bodyparts)
|
||||
if(!H.dna.features["taur"] || H.dna.features["taur"] == "None" || (H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)))
|
||||
if(!tauric || (H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)))
|
||||
bodyparts_to_add -= "taur"
|
||||
|
||||
//END EDIT
|
||||
@@ -723,10 +723,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
species_traits += DIGITIGRADE
|
||||
var/should_be_squished = FALSE
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit.mutantrace_variation == NO_MUTANTRACE_VARIATION) //we got digitigrade suits now fam
|
||||
if(!(H.wear_suit.mutantrace_variation & STYLE_DIGITIGRADE) || (tauric && (H.wear_suit.mutantrace_variation & STYLE_ALL_TAURIC))) //digitigrade/taur suits
|
||||
should_be_squished = TRUE
|
||||
if(H.w_uniform && !H.wear_suit)
|
||||
if(H.w_uniform.mutantrace_variation == NO_MUTANTRACE_VARIATION)
|
||||
if(!(H.w_uniform.mutantrace_variation & STYLE_DIGITIGRADE))
|
||||
should_be_squished = TRUE
|
||||
if(O.use_digitigrade == FULL_DIGITIGRADE && should_be_squished)
|
||||
O.use_digitigrade = SQUISHED_DIGITIGRADE
|
||||
|
||||
@@ -70,20 +70,6 @@
|
||||
damage_overlay_type = "xeno"
|
||||
liked_food = MEAT
|
||||
|
||||
/datum/species/xeno/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
|
||||
if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
|
||||
species_traits += DIGITIGRADE
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(FALSE)
|
||||
. = ..()
|
||||
|
||||
/datum/species/xeno/on_species_loss(mob/living/carbon/human/C, datum/species/new_species)
|
||||
if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Plantigrade")
|
||||
species_traits -= DIGITIGRADE
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(TRUE)
|
||||
. = ..()
|
||||
|
||||
//Praise the Omnissiah, A challange worthy of my skills - HS
|
||||
|
||||
//EXOTIC//
|
||||
|
||||
@@ -73,19 +73,6 @@
|
||||
mutant_bodyparts |= "spines"
|
||||
H.update_body()
|
||||
|
||||
/datum/species/lizard/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
|
||||
if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
|
||||
species_traits += DIGITIGRADE
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(FALSE)
|
||||
return ..()
|
||||
|
||||
/datum/species/lizard/on_species_loss(mob/living/carbon/human/C, datum/species/new_species)
|
||||
if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Plantigrade")
|
||||
species_traits -= DIGITIGRADE
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(TRUE)
|
||||
|
||||
/*
|
||||
Lizard subspecies: ASHWALKERS
|
||||
*/
|
||||
|
||||
@@ -119,24 +119,25 @@ There are several things that need to be remembered:
|
||||
var/t_color = U.item_color
|
||||
if(!t_color)
|
||||
t_color = U.icon_state
|
||||
if(U.suit_style == NORMAL_SUIT_STYLE)
|
||||
if(U.adjusted == ALT_STYLE)
|
||||
t_color = "[t_color]_d"
|
||||
if(U.adjusted == ALT_STYLE)
|
||||
t_color = "[t_color]_d"
|
||||
|
||||
var/alt_worn = U.alternate_worn_icon
|
||||
var/alt_worn = U.alternate_worn_icon || 'icons/mob/uniform.dmi'
|
||||
var/variant_flag = NONE
|
||||
|
||||
if(!U.force_alternate_icon && U.mutantrace_variation && U.suit_style == DIGITIGRADE_SUIT_STYLE)
|
||||
if((DIGITIGRADE in dna.species.species_traits) && U.mutantrace_variation & STYLE_DIGITIGRADE)
|
||||
alt_worn = 'icons/mob/uniform_digi.dmi'
|
||||
variant_flag |= STYLE_DIGITIGRADE
|
||||
|
||||
var/mutable_appearance/uniform_overlay
|
||||
|
||||
if(dna && dna.species.sexes)
|
||||
var/G = (gender == FEMALE) ? "f" : "m"
|
||||
if(G == "f" && U.fitted != NO_FEMALE_UNIFORM)
|
||||
uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = (alt_worn ? alt_worn : 'icons/mob/uniform.dmi'), isinhands = FALSE, femaleuniform = U.fitted)
|
||||
uniform_overlay = U.build_worn_icon(t_color, UNIFORM_LAYER, alt_worn, FALSE, U.fitted, variant_flag, FALSE)
|
||||
|
||||
if(!uniform_overlay)
|
||||
uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = (alt_worn ? alt_worn : 'icons/mob/uniform.dmi'), isinhands = FALSE)
|
||||
uniform_overlay = U.build_worn_icon(t_color, UNIFORM_LAYER, alt_worn, FALSE, NO_FEMALE_UNIFORM, variant_flag, FALSE)
|
||||
|
||||
|
||||
if(OFFSET_UNIFORM in dna.species.offset_features)
|
||||
@@ -164,7 +165,7 @@ There are several things that need to be remembered:
|
||||
update_observer_view(wear_id)
|
||||
|
||||
//TODO: add an icon file for ID slot stuff, so it's less snowflakey
|
||||
id_overlay = wear_id.build_worn_icon(state = wear_id.item_state, default_layer = ID_LAYER, default_icon_file = ((wear_id.alternate_worn_icon) ? wear_id.alternate_worn_icon : 'icons/mob/mob.dmi'))
|
||||
id_overlay = wear_id.build_worn_icon(state = wear_id.item_state, default_layer = ID_LAYER, default_icon_file = 'icons/mob/mob.dmi')
|
||||
if(OFFSET_ID in dna.species.offset_features)
|
||||
id_overlay.pixel_x += dna.species.offset_features[OFFSET_ID][1]
|
||||
id_overlay.pixel_y += dna.species.offset_features[OFFSET_ID][2]
|
||||
@@ -199,7 +200,7 @@ There are several things that need to be remembered:
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state)
|
||||
t_state = gloves.icon_state
|
||||
overlays_standing[GLOVES_LAYER] = gloves.build_worn_icon(state = t_state, default_layer = GLOVES_LAYER, default_icon_file = ((gloves.alternate_worn_icon) ? gloves.alternate_worn_icon : 'icons/mob/hands.dmi'))
|
||||
overlays_standing[GLOVES_LAYER] = gloves.build_worn_icon(state = t_state, default_layer = GLOVES_LAYER, default_icon_file = 'icons/mob/hands.dmi')
|
||||
gloves_overlay = overlays_standing[GLOVES_LAYER]
|
||||
if(OFFSET_GLOVES in dna.species.offset_features)
|
||||
gloves_overlay.pixel_x += dna.species.offset_features[OFFSET_GLOVES][1]
|
||||
@@ -225,7 +226,7 @@ There are several things that need to be remembered:
|
||||
client.screen += glasses //Either way, add the item to the HUD
|
||||
update_observer_view(glasses,1)
|
||||
if(!(head && (head.flags_inv & HIDEEYES)) && !(wear_mask && (wear_mask.flags_inv & HIDEEYES)))
|
||||
overlays_standing[GLASSES_LAYER] = glasses.build_worn_icon(state = glasses.icon_state, default_layer = GLASSES_LAYER, default_icon_file = ((glasses.alternate_worn_icon) ? glasses.alternate_worn_icon : 'icons/mob/eyes.dmi'))
|
||||
overlays_standing[GLASSES_LAYER] = glasses.build_worn_icon(state = glasses.icon_state, default_layer = GLASSES_LAYER, default_icon_file = 'icons/mob/eyes.dmi')
|
||||
var/mutable_appearance/glasses_overlay = overlays_standing[GLASSES_LAYER]
|
||||
if(glasses_overlay)
|
||||
if(OFFSET_GLASSES in dna.species.offset_features)
|
||||
@@ -252,7 +253,7 @@ There are several things that need to be remembered:
|
||||
client.screen += ears //add it to the client's screen
|
||||
update_observer_view(ears,1)
|
||||
|
||||
overlays_standing[EARS_LAYER] = ears.build_worn_icon(state = ears.icon_state, default_layer = EARS_LAYER, default_icon_file = ((ears.alternate_worn_icon) ? ears.alternate_worn_icon : 'icons/mob/ears.dmi'))
|
||||
overlays_standing[EARS_LAYER] = ears.build_worn_icon(state = ears.icon_state, default_layer = EARS_LAYER, default_icon_file = 'icons/mob/ears.dmi')
|
||||
var/mutable_appearance/ears_overlay = overlays_standing[EARS_LAYER]
|
||||
if(OFFSET_EARS in dna.species.offset_features)
|
||||
ears_overlay.pixel_x += dna.species.offset_features[OFFSET_EARS][1]
|
||||
@@ -270,32 +271,6 @@ There are several things that need to be remembered:
|
||||
if(client && hud_used)
|
||||
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_SHOES]
|
||||
inv.update_icon()
|
||||
/*
|
||||
if(!shoes && bloody_feet)
|
||||
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyfeet", -SHOES_LAYER, color = blood_DNA_to_color())
|
||||
if(dna.features["taur"] != "None")
|
||||
if(dna.features["taur"] in GLOB.noodle_taurs)
|
||||
bloody_overlay = mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "snekbloodyfeet", -SHOES_LAYER, color = blood_DNA_to_color())
|
||||
if(get_num_legs() < 2)
|
||||
if(has_left_leg())
|
||||
bloody_overlay.icon_state = "snekbloodyfeet_left"
|
||||
else if(has_right_leg())
|
||||
bloody_overlay.icon_state = "snekbloodyfeet_right"
|
||||
else if(dna.features["taur"] in GLOB.paw_taurs)
|
||||
bloody_overlay = mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "pawbloodyfeet", -SHOES_LAYER, color = blood_DNA_to_color())
|
||||
if(get_num_legs() < 2)
|
||||
if(has_left_leg())
|
||||
bloody_overlay.icon_state = "pawbloodyfeet_left"
|
||||
else if(has_right_leg())
|
||||
bloody_overlay.icon_state = "pawbloodyfeet_right"
|
||||
else
|
||||
if(get_num_legs() < 2)
|
||||
if(has_left_leg())
|
||||
bloody_overlay.icon_state = "bloodyfeet_left"
|
||||
else if(has_right_leg())
|
||||
bloody_overlay.icon_state = "bloodyfeet_right"
|
||||
|
||||
overlays_standing[GLOVES_LAYER] = bloody_overlay*/
|
||||
|
||||
if(shoes)
|
||||
var/obj/item/clothing/shoes/S = shoes
|
||||
@@ -304,15 +279,17 @@ There are several things that need to be remembered:
|
||||
if(hud_used.inventory_shown) //if the inventory is open
|
||||
client.screen += shoes //add it to client's screen
|
||||
update_observer_view(shoes,1)
|
||||
if(S.mutantrace_variation)
|
||||
if(S.adjusted == ALT_STYLE)
|
||||
S.alternate_worn_icon = 'icons/mob/feet_digi.dmi'
|
||||
else
|
||||
S.alternate_worn_icon = null
|
||||
|
||||
var/alt_icon = S.alternate_worn_icon || 'icons/mob/feet.dmi'
|
||||
var/variation_flag = NONE
|
||||
if((DIGITIGRADE in dna.species.species_traits) && S.mutantrace_variation & STYLE_DIGITIGRADE)
|
||||
alt_icon = 'icons/mob/feet_digi.dmi'
|
||||
variation_flag |= STYLE_DIGITIGRADE
|
||||
|
||||
var/t_state = shoes.item_state
|
||||
if (!t_state)
|
||||
t_state = shoes.icon_state
|
||||
overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(state = t_state, default_layer = SHOES_LAYER, default_icon_file = ((shoes.alternate_worn_icon) ? shoes.alternate_worn_icon : 'icons/mob/feet.dmi'))
|
||||
overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(t_state, SHOES_LAYER, alt_icon, FALSE, NO_FEMALE_UNIFORM, variation_flag, FALSE)
|
||||
var/mutable_appearance/shoes_overlay = overlays_standing[SHOES_LAYER]
|
||||
if(OFFSET_SHOES in dna.species.offset_features)
|
||||
shoes_overlay.pixel_x += dna.species.offset_features[OFFSET_SHOES][1]
|
||||
@@ -350,13 +327,18 @@ There are several things that need to be remembered:
|
||||
if(head)
|
||||
remove_overlay(HEAD_LAYER)
|
||||
var/obj/item/clothing/head/H = head
|
||||
if(H.mutantrace_variation)
|
||||
if(H.muzzle_var == ALT_STYLE)
|
||||
H.alternate_worn_icon = 'icons/mob/head_muzzled.dmi'
|
||||
else
|
||||
H.alternate_worn_icon = null
|
||||
var/alt_icon = H.alternate_worn_icon || 'icons/mob/head.dmi'
|
||||
var/muzzled = FALSE
|
||||
var/variation_flag = NONE
|
||||
if(("mam_snouts" in dna.species.default_features) && dna.features["mam_snouts"] != "None")
|
||||
muzzled = TRUE
|
||||
if(!muzzled && ("snout" in dna.species.default_features) && dna.features["snout"] != "None")
|
||||
muzzled = TRUE
|
||||
if(muzzled && H.mutantrace_variation & STYLE_MUZZLE)
|
||||
alt_icon = 'icons/mob/head_muzzled.dmi'
|
||||
variation_flag |= STYLE_MUZZLE
|
||||
|
||||
overlays_standing[HEAD_LAYER] = H.build_worn_icon(state = H.icon_state, default_layer = HEAD_LAYER, default_icon_file = ((head.alternate_worn_icon) ? H.alternate_worn_icon : 'icons/mob/head.dmi'))
|
||||
overlays_standing[HEAD_LAYER] = H.build_worn_icon(H.icon_state, HEAD_LAYER, alt_icon, FALSE, NO_FEMALE_UNIFORM, variation_flag, FALSE)
|
||||
var/mutable_appearance/head_overlay = overlays_standing[HEAD_LAYER]
|
||||
|
||||
if(OFFSET_HEAD in dna.species.offset_features)
|
||||
@@ -382,7 +364,7 @@ There are several things that need to be remembered:
|
||||
if(!t_state)
|
||||
t_state = belt.icon_state
|
||||
|
||||
overlays_standing[BELT_LAYER] = belt.build_worn_icon(state = t_state, default_layer = BELT_LAYER, default_icon_file = ((belt.alternate_worn_icon) ? belt.alternate_worn_icon : 'icons/mob/belt.dmi'))
|
||||
overlays_standing[BELT_LAYER] = belt.build_worn_icon(state = t_state, default_layer = BELT_LAYER, default_icon_file = 'icons/mob/belt.dmi')
|
||||
var/mutable_appearance/belt_overlay = overlays_standing[BELT_LAYER]
|
||||
if(OFFSET_BELT in dna.species.offset_features)
|
||||
belt_overlay.pixel_x += dna.species.offset_features[OFFSET_BELT][1]
|
||||
@@ -409,30 +391,41 @@ There are several things that need to be remembered:
|
||||
client.screen += wear_suit
|
||||
update_observer_view(wear_suit,1)
|
||||
|
||||
if(!item_level_support && !S.force_alternate_icon)
|
||||
if(S.mutantrace_variation) //Just make sure we've got this checked too
|
||||
if(S.taurmode == NOT_TAURIC && S.adjusted == ALT_STYLE) //are we not a taur, but we have Digitigrade legs? Run this check first, then.
|
||||
S.alternate_worn_icon = 'icons/mob/suit_digi.dmi'
|
||||
else
|
||||
S.alternate_worn_icon = null
|
||||
var/worn_icon = wear_suit.alternate_worn_icon || 'icons/mob/suit.dmi'
|
||||
var/center = FALSE
|
||||
var/dimension_x = 32
|
||||
var/dimension_y = 32
|
||||
var/variation_flag = NONE
|
||||
var/datum/sprite_accessory/taur/T
|
||||
if("taur" in dna.species.mutant_bodyparts)
|
||||
T = GLOB.taur_list[dna.features["taur"]]
|
||||
|
||||
if(S.tauric == TRUE) //Are we a suit with tauric mode possible?
|
||||
if(S.taurmode == SNEK_TAURIC)
|
||||
S.alternate_worn_icon = 'icons/mob/taur_naga.dmi'
|
||||
if(S.taurmode == PAW_TAURIC)
|
||||
S.alternate_worn_icon = 'icons/mob/taur_canine.dmi'
|
||||
if(S.taurmode == NOT_TAURIC && S.adjusted == ALT_STYLE)
|
||||
S.alternate_worn_icon = 'icons/mob/suit_digi.dmi'
|
||||
else if(S.taurmode == NOT_TAURIC && S.adjusted == NORMAL_STYLE)
|
||||
S.alternate_worn_icon = null
|
||||
if(!item_level_support && S.mutantrace_variation)
|
||||
if(T?.taur_mode)
|
||||
var/init_worn_icon = worn_icon
|
||||
variation_flag |= S.mutantrace_variation & T.taur_mode || S.mutantrace_variation & T.alt_taur_mode
|
||||
switch(variation_flag)
|
||||
if(STYLE_HOOF_TAURIC)
|
||||
worn_icon = 'icons/mob/taur_hooved.dmi'
|
||||
if(STYLE_SNEK_TAURIC)
|
||||
worn_icon = 'icons/mob/taur_naga.dmi'
|
||||
if(STYLE_PAW_TAURIC)
|
||||
worn_icon = 'icons/mob/taur_canine.dmi'
|
||||
if(worn_icon != init_worn_icon) //worn icon sprite was changed, taur offsets will have to be applied.
|
||||
center = T.center
|
||||
dimension_x = T.dimension_x
|
||||
dimension_y = T.dimension_y
|
||||
else if((DIGITIGRADE in dna.species.species_traits) && S.mutantrace_variation & STYLE_DIGITIGRADE) //not a taur, but digitigrade legs.
|
||||
worn_icon = 'icons/mob/suit_digi.dmi'
|
||||
variation_flag |= STYLE_DIGITIGRADE
|
||||
|
||||
overlays_standing[SUIT_LAYER] = S.build_worn_icon(state = wear_suit.icon_state, default_layer = SUIT_LAYER, default_icon_file = ((wear_suit.alternate_worn_icon) ? S.alternate_worn_icon : 'icons/mob/suit.dmi'))
|
||||
overlays_standing[SUIT_LAYER] = S.build_worn_icon(wear_suit.icon_state, SUIT_LAYER, worn_icon, FALSE, NO_FEMALE_UNIFORM, variation_flag, FALSE)
|
||||
var/mutable_appearance/suit_overlay = overlays_standing[SUIT_LAYER]
|
||||
if(OFFSET_SUIT in dna.species.offset_features)
|
||||
suit_overlay.pixel_x += dna.species.offset_features[OFFSET_SUIT][1]
|
||||
suit_overlay.pixel_y += dna.species.offset_features[OFFSET_SUIT][2]
|
||||
if(!item_level_support && S.center)
|
||||
suit_overlay = center_image(suit_overlay, S.dimension_x, S.dimension_y)
|
||||
if(center)
|
||||
suit_overlay = center_image(suit_overlay, dimension_x, dimension_y)
|
||||
overlays_standing[SUIT_LAYER] = suit_overlay
|
||||
update_hair()
|
||||
update_mutant_bodyparts()
|
||||
@@ -468,13 +461,18 @@ There are several things that need to be remembered:
|
||||
if(wear_mask)
|
||||
var/obj/item/clothing/mask/M = wear_mask
|
||||
remove_overlay(FACEMASK_LAYER)
|
||||
if(M.mutantrace_variation)
|
||||
if(M.muzzle_var == ALT_STYLE)
|
||||
M.alternate_worn_icon = 'icons/mob/mask_muzzled.dmi'
|
||||
else
|
||||
M.alternate_worn_icon = null
|
||||
var/alt_icon = M.alternate_worn_icon || 'icons/mob/mask.dmi'
|
||||
var/muzzled = FALSE
|
||||
var/variation_flag = NONE
|
||||
if(("mam_snouts" in dna.species.default_features) && dna.features["mam_snouts"] != "None")
|
||||
muzzled = TRUE
|
||||
if(!muzzled && ("snout" in dna.species.default_features) && dna.features["snout"] != "None")
|
||||
muzzled = TRUE
|
||||
if(muzzled && M.mutantrace_variation & STYLE_MUZZLE)
|
||||
alt_icon = 'icons/mob/mask_muzzled.dmi'
|
||||
variation_flag |= STYLE_MUZZLE
|
||||
|
||||
overlays_standing[FACEMASK_LAYER] = M.build_worn_icon(state = wear_mask.icon_state, default_layer = FACEMASK_LAYER, default_icon_file = ((wear_mask.alternate_worn_icon) ? M.alternate_worn_icon : 'icons/mob/mask.dmi'))
|
||||
overlays_standing[FACEMASK_LAYER] = M.build_worn_icon(wear_mask.icon_state, FACEMASK_LAYER, alt_icon, FALSE, NO_FEMALE_UNIFORM, variation_flag, FALSE)
|
||||
var/mutable_appearance/mask_overlay = overlays_standing[FACEMASK_LAYER]
|
||||
|
||||
if(OFFSET_FACEMASK in dna.species.offset_features)
|
||||
@@ -496,11 +494,11 @@ There are several things that need to be remembered:
|
||||
apply_overlay(BACK_LAYER)
|
||||
|
||||
/proc/wear_female_version(t_color, icon, layer, type)
|
||||
var/index = t_color
|
||||
var/index = "[t_color]-[icon]"
|
||||
var/icon/female_clothing_icon = GLOB.female_clothing_icons[index]
|
||||
if(!female_clothing_icon) //Create standing/laying icons if they don't exist
|
||||
generate_female_clothing(index,t_color,icon,type)
|
||||
return mutable_appearance(GLOB.female_clothing_icons[t_color], layer = -layer)
|
||||
return mutable_appearance(GLOB.female_clothing_icons[index], layer = -layer)
|
||||
|
||||
/mob/living/carbon/human/proc/get_overlays_copy(list/unwantedLayers)
|
||||
var/list/out = new
|
||||
@@ -572,11 +570,11 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
|
||||
|
||||
*/
|
||||
/obj/item/proc/build_worn_icon(var/state = "", var/default_layer = 0, var/default_icon_file = null, var/isinhands = FALSE, var/femaleuniform = NO_FEMALE_UNIFORM)
|
||||
/obj/item/proc/build_worn_icon(state = "", default_layer = 0, default_icon_file = null, isinhands = FALSE, femaleuniform = NO_FEMALE_UNIFORM, style_flags = NONE, use_alt_icon = TRUE)
|
||||
|
||||
//Find a valid icon file from variables+arguments
|
||||
var/file2use
|
||||
if(!isinhands && alternate_worn_icon)
|
||||
if(!isinhands && alternate_worn_icon && use_alt_icon)
|
||||
file2use = alternate_worn_icon
|
||||
if(!file2use)
|
||||
file2use = default_icon_file
|
||||
@@ -596,7 +594,7 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
|
||||
//Get the overlays for this item when it's being worn
|
||||
//eg: ammo counters, primed grenade flashes, etc.
|
||||
var/list/worn_overlays = worn_overlays(isinhands, file2use)
|
||||
var/list/worn_overlays = worn_overlays(isinhands, file2use, style_flags)
|
||||
if(worn_overlays && worn_overlays.len)
|
||||
standing.overlays.Add(worn_overlays)
|
||||
|
||||
@@ -675,6 +673,8 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
. += "-robotic"
|
||||
if(BP.use_digitigrade)
|
||||
. += "-digitigrade[BP.use_digitigrade]"
|
||||
if(BP.digitigrade_type)
|
||||
. += "-[BP.digitigrade_type]"
|
||||
if(BP.dmg_overlay_type)
|
||||
. += "-[BP.dmg_overlay_type]"
|
||||
if(BP.body_markings)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
//Overlays for the worn overlay so you can overlay while you overlay
|
||||
//eg: ammo counters, primed grenade flashing, etc.
|
||||
//"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file
|
||||
/obj/item/proc/worn_overlays(isinhands = FALSE, icon_file)
|
||||
/obj/item/proc/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user