Skip to content

Commit

Permalink
Merge pull request #26 from Very-Soft/glasses
Browse files Browse the repository at this point in the history
big round glasses
  • Loading branch information
Very-Soft authored Oct 23, 2023
2 parents 2ab4994 + 45d061c commit 68b3809
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 16 deletions.
10 changes: 10 additions & 0 deletions code/modules/client/preference_setup/loadout/loadout_eyes_rs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/datum/gear/eyes/big_round
display_name = "big round glasses selection"
path = /obj/item/clothing/glasses/big_round

/datum/gear/eyes/big_round/New()
..()
var/list/big_round_glasses = list()
for(var/obj/item/clothing/glasses/big_round/glasses as anything in typesof(/obj/item/clothing/glasses/big_round))
big_round_glasses[initial(glasses.name)] = glasses
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(big_round_glasses))
28 changes: 28 additions & 0 deletions code/modules/clothing/glasses/glasses_rs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/obj/item/clothing/glasses
var/glasses_layer_above = FALSE


/obj/item/clothing/glasses/big_round
name = "big round blue glasses"
desc = "A set of glasses! They are big, round, and very reflective, catching the light and obscuring the eyes!"
icon = 'icons/inventory/eyes/item_rs.dmi'
icon_override = 'icons/inventory/eyes/mob_rs.dmi'
icon_state = "bigroundglasses"
slot_flags = SLOT_EYES | SLOT_EARS
glasses_layer_above = TRUE

/obj/item/clothing/glasses/big_round/red
name = "big round red glasses"
icon_state = "bigroundglasses-red"
/obj/item/clothing/glasses/big_round/magenta
name = "big round magenta glasses"
icon_state = "bigroundglasses-magenta"
/obj/item/clothing/glasses/big_round/green
name = "big round green glasses"
icon_state = "bigroundglasses-green"
/obj/item/clothing/glasses/big_round/gold
name = "big round gold glasses"
icon_state = "bigroundglasses-gold"
/obj/item/clothing/glasses/big_round/cyan
name = "big round cyan glasses"
icon_state = "bigroundglasses-cyan"
40 changes: 24 additions & 16 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,21 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
#define EARS_LAYER 23 //Both ear-slot items (combined image)
#define EYES_LAYER 24 //Mob's eyes (used for glowing eyes)
#define FACEMASK_LAYER 25 //Mask-slot item
#define HEAD_LAYER 26 //Head-slot item
#define HANDCUFF_LAYER 27 //Handcuffs, if the human is handcuffed, in a secret inv slot
#define LEGCUFF_LAYER 28 //Same as handcuffs, for legcuffs
#define L_HAND_LAYER 29 //Left-hand item
#define R_HAND_LAYER 30 //Right-hand item
#define WING_LAYER 31 //Wings or protrusions over the suit.
#define TAIL_UPPER_LAYER_ALT 32 //Modified tail-sprite layer. Tend to be larger.
#define MODIFIER_EFFECTS_LAYER 33 //Effects drawn by modifiers
#define FIRE_LAYER 34 //'Mob on fire' overlay layer
#define MOB_WATER_LAYER 35 //'Mob submerged' overlay layer
#define TARGETED_LAYER 36 //'Aimed at' overlay layer
#define VORE_BELLY_LAYER 37 // RS edit
#define VORE_TAIL_LAYER 38 // RS edit
#define TOTAL_LAYERS 38 //VOREStation edit. <---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list.
#define GLASSES_LAYER_ALT 26
#define HEAD_LAYER 27 //Head-slot item
#define HANDCUFF_LAYER 28 //Handcuffs, if the human is handcuffed, in a secret inv slot
#define LEGCUFF_LAYER 29 //Same as handcuffs, for legcuffs
#define L_HAND_LAYER 30 //Left-hand item
#define R_HAND_LAYER 31 //Right-hand item
#define WING_LAYER 32 //Wings or protrusions over the suit.
#define TAIL_UPPER_LAYER_ALT 33 //Modified tail-sprite layer. Tend to be larger.
#define MODIFIER_EFFECTS_LAYER 34 //Effects drawn by modifiers
#define FIRE_LAYER 35 //'Mob on fire' overlay layer
#define MOB_WATER_LAYER 36 //'Mob submerged' overlay layer
#define TARGETED_LAYER 37 //'Aimed at' overlay layer
#define VORE_BELLY_LAYER 38 // RS edit
#define VORE_TAIL_LAYER 39 // RS edit
#define TOTAL_LAYERS 39 //VOREStation edit. <---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list.
//////////////////////////////////

/mob/living/carbon/human
Expand Down Expand Up @@ -745,13 +746,20 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
return

remove_layer(GLASSES_LAYER)
remove_layer(GLASSES_LAYER_ALT)

if(!glasses)
return //Not wearing glasses, no need to update anything.

overlays_standing[GLASSES_LAYER] = glasses.make_worn_icon(body_type = species.get_bodytype(src), slot_name = slot_gloves_str, default_icon = INV_EYES_DEF_ICON, default_layer = GLASSES_LAYER)
var/glasses_layer = GLASSES_LAYER
if(istype(glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/glasses/our_glasses = glasses
if(our_glasses.glasses_layer_above)
glasses_layer = GLASSES_LAYER_ALT

apply_layer(GLASSES_LAYER)
overlays_standing[glasses_layer] = glasses.make_worn_icon(body_type = species.get_bodytype(src), slot_name = slot_gloves_str, default_icon = INV_EYES_DEF_ICON, default_layer = glasses_layer)

apply_layer(glasses_layer)

/mob/living/carbon/human/update_inv_ears()
if(QDESTROYING(src))
Expand Down
Binary file added icons/inventory/eyes/item_rs.dmi
Binary file not shown.
Binary file added icons/inventory/eyes/mob_rs.dmi
Binary file not shown.
2 changes: 2 additions & 0 deletions vorestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,7 @@
#include "code\modules\client\preference_setup\loadout\loadout_cyberware.dm"
#include "code\modules\client\preference_setup\loadout\loadout_ears.dm"
#include "code\modules\client\preference_setup\loadout\loadout_eyes.dm"
#include "code\modules\client\preference_setup\loadout\loadout_eyes_rs.dm"
#include "code\modules\client\preference_setup\loadout\loadout_eyes_vr.dm"
#include "code\modules\client\preference_setup\loadout\loadout_fluffitems_vr.dm"
#include "code\modules\client\preference_setup\loadout\loadout_general.dm"
Expand Down Expand Up @@ -1996,6 +1997,7 @@
#include "code\modules\clothing\ears\earrings.dm"
#include "code\modules\clothing\ears\ears.dm"
#include "code\modules\clothing\glasses\glasses.dm"
#include "code\modules\clothing\glasses\glasses_rs.dm"
#include "code\modules\clothing\glasses\glasses_vr.dm"
#include "code\modules\clothing\glasses\hud.dm"
#include "code\modules\clothing\glasses\hud_vr.dm"
Expand Down

0 comments on commit 68b3809

Please sign in to comment.