diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index f068b999039..809d51dc384 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -12,6 +12,10 @@ BLIND // can't see anything /obj/item/clothing/glasses name = "glasses" icon = 'icons/obj/clothing/glasses.dmi' + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_glasses.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_glasses.dmi' + ) w_class = 2.0 slot_flags = SLOT_EYES body_parts_covered = EYES @@ -48,6 +52,7 @@ BLIND // can't see anything if(active) active = 0 icon_state = off_state + item_state = off_state user.update_inv_glasses() flash_protection = FLASH_PROTECTION_NONE tint = TINT_NONE @@ -57,6 +62,7 @@ BLIND // can't see anything else active = 1 icon_state = initial(icon_state) + item_state = initial(icon_state) user.update_inv_glasses() if(activation_sound) sound_to(usr, activation_sound) @@ -65,13 +71,15 @@ BLIND // can't see anything to_chat(usr, "You activate the optical matrix on the [src].") if(activated_color) set_light(2, 0.4, activated_color) - user.update_action_buttons() + user.update_action_buttons() + user.update_inv_l_hand(0) + user.update_inv_r_hand(1) /obj/item/clothing/glasses/meson name = "optical meson scanner" desc = "Used for seeing walls, floors, and stuff through anything." icon_state = "meson" - item_state = "glasses" + item_state = "meson" action_button_name = "Toggle Goggles" origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2) toggleable = 1 @@ -93,8 +101,7 @@ BLIND // can't see anything name = "engineering aviators" desc = "Modified aviator glasses with a toggled meson interface. Comes with bonus prescription overlay." icon_state = "aviator_eng" - off_state = "aviator" - item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") + off_state = "aviator_eng_off" action_button_name = "Toggle HUD" activation_sound = 'sound/effects/pop.ogg' prescription = 1 @@ -111,8 +118,7 @@ BLIND // can't see anything name = "medical HUD aviators" desc = "Modified aviator glasses with a toggled health HUD. Comes with bonus prescription overlay." icon_state = "aviator_med" - off_state = "aviator" - item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") + off_state = "aviator_med_off" action_button_name = "Toggle Mode" toggleable = 1 activation_sound = 'sound/effects/pop.ogg' @@ -130,7 +136,7 @@ BLIND // can't see anything name = "science goggles" desc = "Used to protect your eyes against harmful chemicals!" icon_state = "purple" - item_state = "glasses" + item_state = "purple" toggleable = 1 unacidable = 1 item_flags = AIRTIGHT @@ -159,8 +165,7 @@ BLIND // can't see anything name = "aviators" desc = "Modified aviator glasses with a toggled night vision interface. Comes with prescription overlay." icon_state = "aviator_nv" - off_state = "aviator" - item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") + off_state = "aviator_off" action_button_name = "Toggle Mode" toggleable = 1 activation_sound = 'sound/effects/pop.ogg' @@ -178,6 +183,7 @@ BLIND // can't see anything name = "safety glasses" desc = "A simple pair of safety glasses. Thinner than their goggle counterparts, for those who can't decide between safety and style." icon_state = "plaingoggles" + item_state = "plaingoggles" item_flags = AIRTIGHT unacidable = 1 @@ -204,14 +210,12 @@ BLIND // can't see anything src.up = !src.up flags_inv |= HIDEEYES body_parts_covered |= EYES - item_state = initial(item_state) icon_state = initial(item_state) to_chat(usr, span("notice", "You flip \the [src] down to protect your eyes.")) else src.up = !src.up flags_inv &= ~HIDEEYES body_parts_covered &= ~EYES - item_state = "[initial(item_state)]_up" icon_state = "[initial(icon_state)]_up" to_chat(usr, span("notice", "You push \the [src] up out of your face.")) update_clothing_icon() @@ -248,14 +252,14 @@ BLIND // can't see anything name = "monocle" desc = "Such a dapper eyepiece!" icon_state = "monocle" - item_state = "headset" // lol + item_state = "monocle" body_parts_covered = 0 /obj/item/clothing/glasses/material name = "optical material scanner" desc = "Very confusing glasses." icon_state = "material" - item_state = "glasses" + item_state = "material" action_button_name = "Toggle Goggles" origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3) toggleable = 1 @@ -266,8 +270,7 @@ BLIND // can't see anything name = "material aviators" desc = "Modified aviator glasses with a toggled ability to make your head ache. Comes with bonus prescription interface." icon_state = "aviator_mat" - off_state = "aviator" - item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") + off_state = "aviator_off" action_button_name = "Toggle Mode" activation_sound = 'sound/effects/pop.ogg' prescription = 1 @@ -289,26 +292,26 @@ BLIND // can't see anything /obj/item/clothing/glasses/regular/attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/clothing/glasses/hud/health)) - user.drop_item() + user.drop_item(W) qdel(W) - to_chat(user, "You attach a set of medical HUDs to your glasses.") + to_chat(user, span("notice", "You attach a set of medical HUDs to your glasses.")) playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1) - var/turf/T = get_turf(src) - new /obj/item/clothing/glasses/hud/health/prescription(T) + var/obj/item/clothing/glasses/hud/health/prescription/P = new /obj/item/clothing/glasses/hud/health/prescription(user.loc) + user.put_in_hands(P) qdel(src) if(istype(W, /obj/item/clothing/glasses/hud/security)) - user.drop_item() + user.drop_item(W) qdel(W) - to_chat(user, "You attach a set of security HUDs to your glasses.") + to_chat(user, span("notice", "You attach a set of security HUDs to your glasses.")) playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1) - var/turf/T = get_turf(src) - new /obj/item/clothing/glasses/hud/security/prescription(T) + var/obj/item/clothing/glasses/hud/security/prescription/P = new /obj/item/clothing/glasses/hud/security/prescription(user.loc) + user.put_in_hands(P) qdel(src) /obj/item/clothing/glasses/regular/scanners name = "scanning goggles" desc = "A very oddly shaped pair of goggles with bits of wire poking out the sides. A soft humming sound emanates from it." - icon_state = "uzenwa_sissra_1" + icon_state = "scanning" /obj/item/clothing/glasses/regular/hipster name = "prescription glasses" @@ -334,7 +337,7 @@ BLIND // can't see anything desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes." name = "sunglasses" icon_state = "sun" - item_state = "sunglasses" + item_state = "sun" darkness_view = -1 flash_protection = FLASH_PROTECTION_MODERATE @@ -369,7 +372,6 @@ BLIND // can't see anything flags_inv |= HIDEEYES body_parts_covered |= EYES icon_state = initial(icon_state) - item_state = initial(item_state) flash_protection = initial(flash_protection) tint = initial(tint) to_chat(usr, "You flip \the [src] down to protect your eyes.") @@ -378,7 +380,6 @@ BLIND // can't see anything flags_inv &= ~HIDEEYES body_parts_covered &= ~EYES icon_state = "[initial(icon_state)]up" - item_state = "[initial(item_state)]up" flash_protection = FLASH_PROTECTION_NONE tint = TINT_NONE to_chat(usr, "You push \the [src] up out of your face.") @@ -404,7 +405,7 @@ BLIND // can't see anything name = "vaurcae blinders" desc = "Specially designed Vaurca blindfold, designed to let in just enough light to see." icon_state = "blinders" - item_state = "blinders" + item_state = "blindfold" drop_sound = 'sound/items/drop/gloves.ogg' /obj/item/clothing/glasses/sunglasses/blindfold/tape @@ -422,7 +423,7 @@ BLIND // can't see anything /obj/item/clothing/glasses/sunglasses/big desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks many flashes." icon_state = "bigsunglasses" - item_state = "bigsunglasses" + item_state = "sun" /obj/item/clothing/glasses/fakesunglasses //Sunglasses without flash immunity name = "stylish sunglasses" @@ -455,20 +456,21 @@ BLIND // can't see anything name = "tactical HUD" desc = "Flash-resistant goggles with inbuilt combat and security information." icon_state = "swatgoggles" + item_state = "swatgoggles" item_flags = AIRTIGHT /obj/item/clothing/glasses/sunglasses/sechud/head name = "advanced aviators" desc = "Snazzy, advanced aviators with inbuilt combat and security information." - item_state = "hosglasses" icon_state = "hosglasses" + item_state = "hosglasses" prescription = 1 /obj/item/clothing/glasses/sunglasses/sechud/aviator name = "HUD aviators" desc = "Modified aviator glasses that can be switched between HUD and flash protection modes. Comes with bonus prescription overlay." - icon_state = "sec_hud" - off_state = "sec_flash" + icon_state = "aviator_sec" + off_state = "aviator_sec_off" item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") action_button_name = "Toggle Mode" var/on = TRUE @@ -521,7 +523,7 @@ BLIND // can't see anything name = "optical thermal scanner" desc = "Thermals in the shape of glasses." icon_state = "thermal" - item_state = "glasses" + item_state = "thermal" action_button_name = "Toggle Goggles" origin_tech = list(TECH_MAGNET = 3) toggleable = 1 @@ -563,9 +565,10 @@ BLIND // can't see anything item_flags = AIRTIGHT /obj/item/clothing/glasses/thermal/plain/monocle - name = "thermoncle" + name = "thermonocle" desc = "A monocle thermal." - icon_state = "thermoncle" + icon_state = "thermonocle" + item_state = "thermonocle" flags = null //doesn't protect eyes because it's a monocle, duh item_flags = null body_parts_covered = 0 @@ -581,7 +584,7 @@ BLIND // can't see anything name = "aviators" desc = "Modified aviator glasses with a toggled thermal-vision mode. Comes with bonus prescription overlay." icon_state = "aviator_thr" - off_state = "aviator" + off_state = "aviator_off" item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") action_button_name = "Toggle HUD" activation_sound = 'sound/effects/pop.ogg' @@ -746,7 +749,6 @@ BLIND // can't see anything flags_inv |= HIDEEYES body_parts_covered |= EYES icon_state = initial(icon_state) - item_state = initial(item_state) item_flags |= AIRTIGHT to_chat(usr, "You flip \the [src] down over your eyes.") else @@ -754,7 +756,6 @@ BLIND // can't see anything flags_inv &= ~HIDEEYES body_parts_covered &= ~EYES icon_state = "[initial(icon_state)]up" - item_state = "[initial(item_state)]up" item_flags &= ~AIRTIGHT to_chat(usr, "You push \the [src] up off your eyes.") update_clothing_icon() diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index a64fc9f5f8c..08c59a0a7e2 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -16,6 +16,7 @@ name = "health scanner HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." icon_state = "healthhud" + item_state = "healthhud" body_parts_covered = 0 @@ -30,11 +31,12 @@ item_state = "healthhudpresc" /obj/item/clothing/glasses/hud/health/prescription/attack_self(mob/user) - to_chat(user, "You detach a set of medical HUDs form your glasses.") + to_chat(user, span("notice", "You detach a set of medical HUDs from your glasses.")) playsound(src.loc, 'sound/weapons/blade_close.ogg', 50, 1) - var/turf/T = get_turf(src) - new /obj/item/clothing/glasses/hud/health(T) - new /obj/item/clothing/glasses/regular(T) + var/obj/item/clothing/glasses/regular/R = new /obj/item/clothing/glasses/regular(user.loc) + user.put_in_hands(R) + var/obj/item/clothing/glasses/hud/health/H = new /obj/item/clothing/glasses/hud/health(user.loc) + user.put_in_hands(H) user.drop_item(src) qdel(src) @@ -42,6 +44,7 @@ name = "security HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records." icon_state = "securityhud" + item_state = "securityhud" body_parts_covered = 0 var/global/list/jobs[0] @@ -53,11 +56,12 @@ item_state = "sechudpresc" /obj/item/clothing/glasses/hud/security/prescription/attack_self(mob/user) - to_chat(user, "You detach a set of security HUDs form your glasses.") + to_chat(user, span("notice", "You detach a set of security HUDs from your glasses.")) playsound(src.loc, 'sound/weapons/blade_close.ogg', 50, 1) - var/turf/T = get_turf(src) - new /obj/item/clothing/glasses/hud/health(T) - new /obj/item/clothing/glasses/regular(T) + var/obj/item/clothing/glasses/regular/R = new /obj/item/clothing/glasses/regular(user.loc) + user.put_in_hands(R) + var/obj/item/clothing/glasses/hud/security/S = new /obj/item/clothing/glasses/hud/security(user.loc) + user.put_in_hands(S) user.drop_item(src) qdel(src) diff --git a/html/changelogs/wezzy_glasses_resprite.yml b/html/changelogs/wezzy_glasses_resprite.yml new file mode 100644 index 00000000000..de69e430399 --- /dev/null +++ b/html/changelogs/wezzy_glasses_resprite.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - imageadd: "New sprites and inhands for glasses! You should see them when you're holding them in your hands, and changing your glasses mode will change the sprite too." + - imageadd: "Adds new sprites and inhands for mesons. They should be more representative of what they actually do. (Try turning on mesons on and off in your hand and see the magic!)" + - tweak: "You will no longer clumsily drop your glasses everytime you combine HUDs with them." diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index c1260002c7c..1092d9ad9d3 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index b5e0ed167c7..9415a131335 100644 Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ diff --git a/icons/mob/items/lefthand_glasses.dmi b/icons/mob/items/lefthand_glasses.dmi new file mode 100644 index 00000000000..0ae34ef31ac Binary files /dev/null and b/icons/mob/items/lefthand_glasses.dmi differ diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi index b5e0fc0ccc1..1bc48617751 100644 Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ diff --git a/icons/mob/items/righthand_glasses.dmi b/icons/mob/items/righthand_glasses.dmi new file mode 100644 index 00000000000..888d004f0a8 Binary files /dev/null and b/icons/mob/items/righthand_glasses.dmi differ diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index cfaad88d6e9..6770f2ebec5 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ