Skip to content

Commit

Permalink
bugfix: new clothing sprite layer "above boots" for dresses. (#3994)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeberdir authored Dec 12, 2023
1 parent ebe0967 commit 40259f1
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 23 deletions.
29 changes: 15 additions & 14 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,20 @@
#define MFOAM_IRON 2

//Human Overlays Indexes/////////
#define BODY_LAYER 42
#define MUTANTRACE_LAYER 41
#define WING_UNDERLIMBS_LAYER 40
#define TAIL_UNDERLIMBS_LAYER 39 //Tail split-rendering.
#define LIMBS_LAYER 38
#define INTORGAN_LAYER 37
#define MARKINGS_LAYER 36
#define UNDERWEAR_LAYER 35
#define MUTATIONS_LAYER 34
#define H_DAMAGE_LAYER 33
#define UNIFORM_LAYER 32
#define ID_LAYER 31
#define SHOES_LAYER 30
#define BODY_LAYER 43
#define MUTANTRACE_LAYER 42
#define WING_UNDERLIMBS_LAYER 41
#define TAIL_UNDERLIMBS_LAYER 40 //Tail split-rendering.
#define LIMBS_LAYER 39
#define INTORGAN_LAYER 38
#define MARKINGS_LAYER 37
#define UNDERWEAR_LAYER 36
#define MUTATIONS_LAYER 35
#define H_DAMAGE_LAYER 34
#define UNIFORM_LAYER 33
#define SHOES_LAYER 32
#define OVER_SHOES_LAYER 31
#define ID_LAYER 30
#define GLOVES_LAYER 29
#define EARS_LAYER 28
#define SUIT_LAYER 27
Expand Down Expand Up @@ -221,7 +222,7 @@
#define FIRE_LAYER 3 //If you're on fire
#define MISC_LAYER 2
#define FROZEN_LAYER 1
#define TOTAL_LAYERS 42
#define TOTAL_LAYERS 43

///Access Region Codes///
#define REGION_ALL 0
Expand Down
14 changes: 8 additions & 6 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -740,15 +740,17 @@ BLIND // can't see anything

var/has_sensor = TRUE//For the crew computer 2 = unable to change mode
var/sensor_mode = SENSOR_OFF
var/random_sensor = TRUE
/*
1 = Report living/dead
2 = Report detailed damages
3 = Report location
SENSOR_OFF = Report nothing
SENSOR_LIVING = Report living/dead
SENSOR_VITALS = Report detailed damages
SENSOR_COORDS = Report location
*/
var/random_sensor = TRUE
var/displays_id = TRUE
var/over_shoes = FALSE
var/rolled_down = FALSE
var/list/accessories = list()
var/displays_id = 1
var/rolled_down = 0
var/basecolor

/obj/item/clothing/under/rank/New()
Expand Down
15 changes: 15 additions & 0 deletions code/modules/clothing/under/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@
desc = "A fancy orange gown for those who like to show leg."
icon_state = "dress_orange"
item_color = "dress_orange"
over_shoes = TRUE

/obj/item/clothing/under/dress/dress_pink
name = "pink dress"
Expand Down Expand Up @@ -536,30 +537,35 @@
desc = "A big and puffy orange dress."
icon_state = "bride_orange"
item_color = "bride_orange"
over_shoes = TRUE

/obj/item/clothing/under/wedding/bride_purple
name = "purple wedding dress"
desc = "A big and puffy purple dress."
icon_state = "bride_purple"
item_color = "bride_purple"
over_shoes = TRUE

/obj/item/clothing/under/wedding/bride_blue
name = "blue wedding dress"
desc = "A big and puffy blue dress."
icon_state = "bride_blue"
item_color = "bride_blue"
over_shoes = TRUE

/obj/item/clothing/under/wedding/bride_red
name = "red wedding dress"
desc = "A big and puffy red dress."
icon_state = "bride_red"
item_color = "bride_red"
over_shoes = TRUE

/obj/item/clothing/under/wedding/bride_white
name = "white wedding dress"
desc = "A white wedding gown made from the finest silk."
icon_state = "bride_white"
item_color = "bride_white"
over_shoes = TRUE

/obj/item/clothing/under/sundress
name = "sundress"
Expand Down Expand Up @@ -624,6 +630,7 @@
icon_state = "ysing"
item_state = "ysing"
item_color = "ysing"
over_shoes = TRUE

/obj/item/clothing/under/singerb
name = "blue performer's outfit"
Expand Down Expand Up @@ -759,6 +766,7 @@
icon_state = "black_tango"
item_state = "wcoat"
item_color = "black_tango"
over_shoes = TRUE

/obj/item/clothing/under/stripeddress
name = "striped dress"
Expand All @@ -780,6 +788,7 @@
icon_state = "red_evening_gown"
item_state = "redeveninggown"
item_color = "red_evening_gown"
over_shoes = TRUE

/obj/item/clothing/under/suit_jacket/checkered
name = "checkered suit"
Expand Down Expand Up @@ -864,12 +873,14 @@
item_state = "victorianblackdress"
item_color = "victorianblackdress"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
over_shoes = TRUE

/obj/item/clothing/under/victdress/red
name = "red victorian dress"
icon_state = "victorianreddress"
item_state = "victorianreddress"
item_color = "victorianreddress"
over_shoes = TRUE

/obj/item/clothing/under/victsuit
name = "victorian suit"
Expand Down Expand Up @@ -962,24 +973,28 @@
icon_state = "red_chaps"
icon_state = "red_chaps"
item_color = "red_chaps"
over_shoes = TRUE

/obj/item/clothing/under/white_chaps
name = "white chaps"
desc = "A stylish chaps that will make you look like one of that cool guys from old movies."
icon_state = "white_chaps"
icon_state = "white_chaps"
item_color = "white_chaps"
over_shoes = TRUE

/obj/item/clothing/under/tan_chaps
name = "tan chaps"
desc = "A stylish chaps that will make you look like a real sheriff."
icon_state = "tan_chaps"
icon_state = "tan_chaps"
item_color = "tan_chaps"
over_shoes = TRUE

/obj/item/clothing/under/brown_chaps
name = "brown chaps"
desc = "A stylish chaps that will make you look like a real cowboy."
icon_state = "brown_chaps"
icon_state = "brown_chaps"
item_color = "brown_chaps"
over_shoes = TRUE
1 change: 1 addition & 0 deletions code/modules/customitems/item_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@
icon_state = "fallout_dress"
item_state = "fallout_dress"
item_color = "fallout_dress"
over_shoes = TRUE

/obj/item/clothing/under/fluff/soviet_casual_uniform // Norstead : Natalya Sokolova
icon = 'icons/obj/custom_items.dmi'
Expand Down
13 changes: 10 additions & 3 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)

/mob/living/carbon/human/update_inv_w_uniform()
remove_overlay(UNIFORM_LAYER)
remove_overlay(OVER_SHOES_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_w_uniform]
if(inv)
Expand Down Expand Up @@ -598,7 +599,14 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
standing.overlays += image("icon" = 'icons/mob/clothing/ties.dmi', "icon_state" = "[tie_color]")
standing.alpha = w_uniform.alpha
standing.color = w_uniform.color
overlays_standing[UNIFORM_LAYER] = standing
if(w_uniform.over_shoes) //Select which layer to use based on the properties of the hair style. Hair styles with hair that don't overhang the arms of the glasses should have glasses_over set to a positive value.
standing.layer = -OVER_SHOES_LAYER
overlays_standing[OVER_SHOES_LAYER] = standing
apply_overlay(OVER_SHOES_LAYER)
else
overlays_standing[UNIFORM_LAYER] = standing
apply_overlay(UNIFORM_LAYER)


// Saved for history .\_/.

Expand Down Expand Up @@ -628,7 +636,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
thing.dropped(src) //
thing.layer = initial(thing.layer)
thing.plane = initial(thing.plane)*/
apply_overlay(UNIFORM_LAYER)

/mob/living/carbon/human/update_inv_wear_id()
remove_overlay(ID_LAYER)
Expand All @@ -642,7 +649,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
wear_id.screen_loc = ui_id
client.screen += wear_id

if(w_uniform && w_uniform:displays_id)
if(w_uniform?.displays_id)
overlays_standing[ID_LAYER] = mutable_appearance('icons/mob/mob.dmi', "id", layer = -ID_LAYER)
apply_overlay(ID_LAYER)

Expand Down

0 comments on commit 40259f1

Please sign in to comment.