mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Glasses/Goggles Layers (#11633)
This commit is contained in:
@@ -31,6 +31,7 @@ BLIND // can't see anything
|
||||
var/obj/screen/overlay = null
|
||||
var/obj/item/clothing/glasses/hud/hud = null // Hud glasses, if any
|
||||
var/activated_color = null
|
||||
var/normal_layer = TRUE
|
||||
sprite_sheets = list(
|
||||
BODYTYPE_VAURCA_WARFORM = 'icons/mob/species/warriorform/eyes.dmi'
|
||||
)
|
||||
@@ -42,6 +43,14 @@ BLIND // can't see anything
|
||||
/obj/item/clothing/glasses/proc/Look(var/atom/A, mob/user, var/proximity)
|
||||
return 0 // return 1 to cancel attack_hand/RangedAttack()
|
||||
|
||||
/obj/item/clothing/glasses/verb/change_layer()
|
||||
set category = "Object"
|
||||
set name = "Change Glasses Layer"
|
||||
set src in usr
|
||||
|
||||
normal_layer = !normal_layer
|
||||
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [normal_layer ? "under" : "over"] your hair."))
|
||||
|
||||
/obj/item/clothing/glasses/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
|
||||
@@ -94,28 +94,29 @@ There are several things that need to be remembered:
|
||||
#define UNIFORM_LAYER 7
|
||||
#define ID_LAYER 8
|
||||
#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 L_EAR_LAYER 20
|
||||
#define R_EAR_LAYER 21
|
||||
#define FACEMASK_LAYER 22
|
||||
#define HEAD_LAYER 23
|
||||
#define COLLAR_LAYER 24
|
||||
#define HANDCUFF_LAYER 25
|
||||
#define LEGCUFF_LAYER 26
|
||||
#define L_HAND_LAYER 27
|
||||
#define R_HAND_LAYER 28
|
||||
#define WRISTS_LAYER 29
|
||||
#define FIRE_LAYER 30 //If you're on fire
|
||||
#define TOTAL_LAYERS 30
|
||||
#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 UNDERSCORE_OR_NULL(target) "[target ? "[target]_" : ""]"
|
||||
@@ -711,7 +712,25 @@ There are several things that need to be remembered:
|
||||
|
||||
if(glasses_overlay)
|
||||
glasses_overlay.appearance_flags = RESET_ALPHA
|
||||
overlays_raw[GLASSES_LAYER] = glasses_overlay
|
||||
|
||||
if(!glasses)
|
||||
overlays_raw[GLASSES_LAYER] = null
|
||||
overlays_raw[GLASSES_LAYER_ALT] = null
|
||||
if(update_icons)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
var/normal_layer = TRUE
|
||||
if(istype(glasses, /obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
normal_layer = G.normal_layer
|
||||
|
||||
if(normal_layer)
|
||||
overlays_raw[GLASSES_LAYER] = glasses_overlay
|
||||
overlays_raw[GLASSES_LAYER_ALT] = null
|
||||
else
|
||||
overlays_raw[GLASSES_LAYER] = null
|
||||
overlays_raw[GLASSES_LAYER_ALT] = glasses_overlay
|
||||
|
||||
if(update_icons)
|
||||
update_icon()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Added the abilty to change the layering of glasses/goggles, to make them go over or under your hair, via a right click menu. By default, they'll go under."
|
||||
Reference in New Issue
Block a user