mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-01 13:02:02 +00:00
Tactical goggles can now be layered over headwear (#16898)
* hewpwpwpwpwpwpwpw * Adds new glasses layer, allows goggles to be layered over headwear * i think this fixes the changelog issue?????? * removes undefines * Update code/modules/mob/living/carbon/human/update_icons.dm Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> * Update code/__defines/icon_layering.dm Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> * Update html/changelogs/Clemchangelog.yml Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> --------- Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +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
|
||||
var/normal_layer = GLASSES_LAYER
|
||||
var/shatter_material = /obj/item/material/shard
|
||||
sprite_sheets = list(
|
||||
BODYTYPE_VAURCA_WARFORM = 'icons/mob/species/warriorform/eyes.dmi'
|
||||
@@ -49,8 +49,11 @@ BLIND // can't see anything
|
||||
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."))
|
||||
if(normal_layer == GLASSES_LAYER)
|
||||
normal_layer = GLASSES_LAYER_ALT
|
||||
else
|
||||
normal_layer = GLASSES_LAYER
|
||||
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [normal_layer == 21 ? "under" : "over"] your hair."))
|
||||
update_clothing_icon()
|
||||
|
||||
/obj/item/clothing/glasses/protects_eyestab(var/obj/stab_item, var/stabbed = FALSE)
|
||||
@@ -272,7 +275,7 @@ BLIND // can't see anything
|
||||
var/flip_down = "down to protect your eyes."
|
||||
var/flip_up = "up out of your face."
|
||||
var/up = 0
|
||||
normal_layer = FALSE
|
||||
normal_layer = GLASSES_LAYER_ALT
|
||||
|
||||
/obj/item/clothing/glasses/safety/goggles/Initialize(mapload, material_key)
|
||||
. = ..()
|
||||
@@ -310,6 +313,18 @@ BLIND // can't see anything
|
||||
/obj/item/clothing/glasses/safety/goggles/proc/handle_additional_changes()
|
||||
return
|
||||
|
||||
/obj/item/clothing/glasses/safety/goggles/change_layer()
|
||||
set category = "Object"
|
||||
set name = "Change Glasses Layer"
|
||||
set src in usr
|
||||
|
||||
var/list/options = list("Under Hair" = GLASSES_LAYER, "Over Hair" = GLASSES_LAYER_ALT, "Over Headwear" = GLASSES_LAYER_OVER)
|
||||
var/new_layer = input(usr, "Position Goggles", "Goggle style") as null|anything in options
|
||||
if(new_layer)
|
||||
normal_layer = options[new_layer]
|
||||
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [new_layer]."))
|
||||
update_clothing_icon()
|
||||
|
||||
/obj/item/clothing/glasses/safety/goggles/prescription
|
||||
name = "prescription safety goggles"
|
||||
desc = "A simple pair of safety goggles. It's general chemistry all over again. Comes with a prescription overlay."
|
||||
@@ -669,7 +684,7 @@ BLIND // can't see anything
|
||||
item_flags = THICKMATERIAL
|
||||
flash_protection = FLASH_PROTECTION_MAJOR
|
||||
tint = TINT_HEAVY
|
||||
normal_layer = FALSE
|
||||
normal_layer = GLASSES_LAYER_ALT
|
||||
|
||||
/obj/item/clothing/glasses/welding/attack_self()
|
||||
toggle()
|
||||
|
||||
@@ -84,46 +84,7 @@ There are several things that need to be remembered:
|
||||
The idea behind it is icons are regenerated only once, even if multiple events requested it.
|
||||
*/
|
||||
|
||||
// Human Overlays Indexes //
|
||||
// Layer 1 intentionally left empty.
|
||||
#define FIRE_LAYER_LOWER 2
|
||||
#define MUTATIONS_LAYER 3
|
||||
#define DAMAGE_LAYER 4
|
||||
#define SURGERY_LAYER 5
|
||||
#define UNDERWEAR_LAYER 6
|
||||
#define TAIL_SOUTH_LAYER 7
|
||||
#define TAIL_SOUTH_ACC_LAYER 8
|
||||
#define SHOES_LAYER_ALT 9
|
||||
#define UNIFORM_LAYER 10
|
||||
#define ID_LAYER 11
|
||||
#define SHOES_LAYER 12
|
||||
#define GLOVES_LAYER 13
|
||||
#define BELT_LAYER 14
|
||||
#define WRISTS_LAYER_ALT 15
|
||||
#define SUIT_LAYER 16
|
||||
#define ID_LAYER_ALT 17
|
||||
#define TAIL_NORTH_LAYER 18
|
||||
#define TAIL_NORTH_ACC_LAYER 19
|
||||
#define HAIR_LAYER_ALT 20
|
||||
#define GLASSES_LAYER 21
|
||||
#define BELT_LAYER_ALT 22
|
||||
#define SUIT_STORE_LAYER 23
|
||||
#define BACK_LAYER 24
|
||||
#define HAIR_LAYER 25
|
||||
#define GLASSES_LAYER_ALT 26
|
||||
#define L_EAR_LAYER 27
|
||||
#define R_EAR_LAYER 28
|
||||
#define FACEMASK_LAYER 29
|
||||
#define HEAD_LAYER 30
|
||||
#define COLLAR_LAYER 31
|
||||
#define HANDCUFF_LAYER 32
|
||||
#define LEGCUFF_LAYER 33
|
||||
#define L_HAND_LAYER 34
|
||||
#define R_HAND_LAYER 35
|
||||
#define WRISTS_LAYER 36
|
||||
#define FIRE_LAYER_UPPER 37
|
||||
#define TOTAL_LAYERS 37
|
||||
////////////////////////////
|
||||
|
||||
|
||||
#define GET_BODY_TYPE (cached_bodytype || (cached_bodytype = species.get_bodytype()))
|
||||
#define GET_TAIL_LAYER (dir == NORTH ? TAIL_NORTH_LAYER : TAIL_SOUTH_LAYER)
|
||||
@@ -725,20 +686,19 @@ There are several things that need to be remembered:
|
||||
|
||||
var/image/glasses_overlay = glasses.get_mob_overlay(src, mob_icon, mob_state, slot_glasses_str)
|
||||
|
||||
var/normal_layer = TRUE
|
||||
var/normal_layer = GLASSES_LAYER
|
||||
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
|
||||
overlays_raw[GLASSES_LAYER] = null
|
||||
overlays_raw[GLASSES_LAYER_ALT] = null
|
||||
overlays_raw[GLASSES_LAYER_OVER] = null
|
||||
overlays_raw[normal_layer] = glasses_overlay
|
||||
else
|
||||
overlays_raw[GLASSES_LAYER] = null
|
||||
overlays_raw[GLASSES_LAYER_ALT] = null
|
||||
overlays_raw[GLASSES_LAYER_OVER] = null
|
||||
|
||||
if(update_icons)
|
||||
update_icon()
|
||||
@@ -1544,38 +1504,6 @@ There are several things that need to be remembered:
|
||||
else
|
||||
return TRUE
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
#undef FIRE_LAYER_LOWER
|
||||
#undef MUTATIONS_LAYER
|
||||
#undef DAMAGE_LAYER
|
||||
#undef SURGERY_LAYER
|
||||
#undef UNIFORM_LAYER
|
||||
#undef ID_LAYER
|
||||
#undef SHOES_LAYER
|
||||
#undef GLOVES_LAYER
|
||||
#undef BELT_LAYER
|
||||
#undef WRISTS_LAYER_ALT
|
||||
#undef SUIT_LAYER
|
||||
#undef TAIL_NORTH_LAYER
|
||||
#undef TAIL_SOUTH_LAYER
|
||||
#undef GLASSES_LAYER
|
||||
#undef BELT_LAYER_ALT
|
||||
#undef SUIT_STORE_LAYER
|
||||
#undef BACK_LAYER
|
||||
#undef HAIR_LAYER
|
||||
#undef L_EAR_LAYER
|
||||
#undef R_EAR_LAYER
|
||||
#undef FACEMASK_LAYER
|
||||
#undef HEAD_LAYER
|
||||
#undef COLLAR_LAYER
|
||||
#undef HANDCUFF_LAYER
|
||||
#undef LEGCUFF_LAYER
|
||||
#undef L_HAND_LAYER
|
||||
#undef R_HAND_LAYER
|
||||
#undef WRISTS_LAYER
|
||||
#undef FIRE_LAYER_UPPER
|
||||
#undef TOTAL_LAYERS
|
||||
|
||||
#undef UNDERSCORE_OR_NULL
|
||||
#undef GET_BODY_TYPE
|
||||
#undef GET_TAIL_LAYER
|
||||
|
||||
Reference in New Issue
Block a user