Fixes some peculiarities with hands layer overlapping stuff

This commit is contained in:
Ghommie
2019-10-18 10:23:43 +02:00
parent 26617ba780
commit 281f4e29dc
6 changed files with 37 additions and 32 deletions

View File

@@ -13,8 +13,7 @@
var/needs_processing = FALSE
var/body_zone //BODY_ZONE_CHEST, BODY_ZONE_L_ARM, etc , used for def_zone
var/aux_zone // used for hands
var/aux_layer
var/list/aux_icons // associative list, currently used for hands
var/body_part = null //bitflag used to check which clothes cover this bodypart
var/use_digitigrade = NOT_DIGITIGRADE //Used for alternate legs, useless elsewhere
var/list/embedded_objects = list()
@@ -434,9 +433,9 @@
. += image(body_markings_icon, "[body_markings]_[digitigrade_type]_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
var/image/limb = image(layer = -BODYPARTS_LAYER, dir = image_dir)
var/image/aux
var/list/aux
var/image/marking
var/image/auxmarking
var/list/auxmarking
. += limb
@@ -502,15 +501,17 @@
// Citadel End
if(aux_zone)
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
else
auxmarking = image(body_markings_icon, "[body_markings]_[aux_zone]", -aux_layer, image_dir)
. += aux
. += auxmarking
if(aux_icons)
for(var/I in aux_icons)
var/aux_layer = aux_icons[I]
aux += image(limb.icon, "[species_id]_[I]", -aux_layer, image_dir)
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking += image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[I]", -aux_layer, image_dir)
else
auxmarking += image(body_markings_icon, "[body_markings]_[I]", -aux_layer, image_dir)
. += aux
. += auxmarking
else
limb.icon = icon
@@ -519,15 +520,17 @@
else
limb.icon_state = "[body_zone]"
if(aux_zone)
aux = image(limb.icon, "[aux_zone]", -aux_layer, image_dir)
. += aux
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
else
auxmarking = image(body_markings_icon, "[body_markings]_[aux_zone]", -aux_layer, image_dir)
. += auxmarking
if(aux_icons)
for(var/I in aux_icons)
var/aux_layer = aux_icons[I]
aux += image(limb.icon, "[I]", -aux_layer, image_dir)
. += aux
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking += image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[I]", -aux_layer, image_dir)
else
auxmarking += image(body_markings_icon, "[body_markings]_[I]", -aux_layer, image_dir)
. += auxmarking
if(!isnull(body_markings))
if(species_id == "husk")
@@ -549,13 +552,17 @@
var/draw_color = mutation_color || species_color || (skin_tone && skintone2hex(skin_tone))
if(draw_color)
limb.color = "#[draw_color]"
if(aux_zone)
aux.color = "#[draw_color]"
if(aux_icons)
for(var/a in aux)
var/image/I = a
I.color = "#[draw_color]"
if(!isnull(aux_marking))
if(species_id == "husk")
auxmarking.color = "#141414"
else
auxmarking.color = list(markings_color)
for(var/a in auxmarking)
var/image/I = a
if(species_id == "husk")
I.color = "#141414"
else
I.color = list(markings_color)
if(!isnull(body_markings))
if(species_id == "husk")
@@ -633,8 +640,7 @@
max_stamina_damage = 50
body_zone = BODY_ZONE_L_ARM
body_part = ARM_LEFT
aux_zone = BODY_ZONE_PRECISE_L_HAND
aux_layer = HANDS_PART_LAYER
aux_icons = list(BODY_ZONE_PRECISE_L_HAND = HANDS_PART_LAYER, "l_hand_behind" = BODY_BEHIND_LAYER)
body_damage_coeff = 0.75
held_index = 1
px_x = -6
@@ -697,8 +703,7 @@
max_damage = 50
body_zone = BODY_ZONE_R_ARM
body_part = ARM_RIGHT
aux_zone = BODY_ZONE_PRECISE_R_HAND
aux_layer = HANDS_PART_LAYER
aux_icons = list(BODY_ZONE_PRECISE_R_HAND = HANDS_PART_LAYER, "r_hand_behind" = BODY_BEHIND_LAYER)
body_damage_coeff = 0.75
held_index = 2
px_x = 6