Adds new wrist layers (#12279)

This commit is contained in:
Casper3667
2021-08-17 17:08:55 +02:00
committed by GitHub
parent f39ed3ec4a
commit 6e4880e484
5 changed files with 69 additions and 22 deletions
+1
View File
@@ -51,6 +51,7 @@ BLIND // can't see anything
normal_layer = !normal_layer
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [normal_layer ? "under" : "over"] your hair."))
update_clothing_icon()
/obj/item/clothing/glasses/protects_eyestab(var/obj/stab_item, var/stabbed = FALSE)
if(stabbed && (body_parts_covered & EYES) && !(item_flags & THICKMATERIAL) && shatter_material && prob(stab_item.force * 5))
+10
View File
@@ -12,6 +12,7 @@
pickup_sound = 'sound/items/pickup/accessory.ogg'
siemens_coefficient = 1.0
var/flipped = 0
var/normal_layer = TRUE
/obj/item/clothing/wrists/update_clothing_icon()
if (ismob(src.loc))
@@ -45,6 +46,15 @@
playsound(src, drop_sound, DROP_SOUND_VOLUME)
update_clothing_icon()
/obj/item/clothing/wrists/proc/change_layer()
set category = "Object"
set name = "Change Wrist Layer"
set src in usr
normal_layer = !normal_layer
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [normal_layer ? "under" : "over"] your outerwear."))
update_clothing_icon()
/obj/item/clothing/wrists/bracelet
name = "bracelet"
desc = "Made out of some synthetic polymer. Management encourages you to not ask questions."
@@ -96,27 +96,28 @@ There are several things that need to be remembered:
#define SHOES_LAYER 9
#define GLOVES_LAYER 10
#define BELT_LAYER 11
#define SUIT_LAYER 12
#define ID_LAYER_ALT 13
#define TAIL_NORTH_LAYER 14
#define GLASSES_LAYER 15
#define BELT_LAYER_ALT 16
#define SUIT_STORE_LAYER 17
#define BACK_LAYER 18
#define HAIR_LAYER 19
#define GLASSES_LAYER_ALT 20
#define L_EAR_LAYER 21
#define R_EAR_LAYER 22
#define FACEMASK_LAYER 23
#define HEAD_LAYER 24
#define COLLAR_LAYER 25
#define HANDCUFF_LAYER 26
#define LEGCUFF_LAYER 27
#define L_HAND_LAYER 28
#define R_HAND_LAYER 29
#define WRISTS_LAYER 30
#define FIRE_LAYER 31 //If you're on fire
#define TOTAL_LAYERS 31
#define WRISTS_LAYER_ALT 12
#define SUIT_LAYER 13
#define ID_LAYER_ALT 14
#define TAIL_NORTH_LAYER 15
#define GLASSES_LAYER 16
#define BELT_LAYER_ALT 17
#define SUIT_STORE_LAYER 18
#define BACK_LAYER 19
#define HAIR_LAYER 20
#define GLASSES_LAYER_ALT 21
#define L_EAR_LAYER 22
#define R_EAR_LAYER 23
#define FACEMASK_LAYER 24
#define HEAD_LAYER 25
#define COLLAR_LAYER 26
#define HANDCUFF_LAYER 27
#define LEGCUFF_LAYER 28
#define L_HAND_LAYER 29
#define R_HAND_LAYER 30
#define WRISTS_LAYER 31
#define FIRE_LAYER 32 //If you're on fire
#define TOTAL_LAYERS 32
//////////////////////////////////
#define GET_BODY_TYPE (cached_bodytype || (cached_bodytype = species.get_bodytype()))
@@ -1165,7 +1166,22 @@ There are several things that need to be remembered:
else
mob_icon = INV_WRISTS_DEF_ICON
overlays_raw[WRISTS_LAYER] = wrists.get_mob_overlay(src, mob_icon, mob_state, slot_wrists_str)
var/image/wrists_overlay = wrists.get_mob_overlay(src, mob_icon, mob_state, slot_wrists_str)
var/normal_layer = TRUE
if(istype(wrists, /obj/item/clothing/wrists) || istype(wrists, /obj/item/device/radio/headset/wrist))
var/obj/item/clothing/wrists/W = wrists
normal_layer = W.normal_layer
if(normal_layer)
overlays_raw[WRISTS_LAYER] = wrists_overlay
overlays_raw[WRISTS_LAYER_ALT] = null
else
overlays_raw[WRISTS_LAYER] = null
overlays_raw[WRISTS_LAYER_ALT] = wrists_overlay
else
overlays_raw[WRISTS_LAYER] = null
overlays_raw[WRISTS_LAYER_ALT] = null
if(update_icons)
update_icon()
@@ -1419,6 +1435,7 @@ There are several things that need to be remembered:
#undef SHOES_LAYER
#undef GLOVES_LAYER
#undef BELT_LAYER
#undef WRISTS_LAYER_ALT
#undef SUIT_LAYER
#undef TAIL_NORTH_LAYER
#undef TAIL_SOUTH_LAYER