Night Vision Goggles update (#84594)

## About The Pull Request
This is a reboot of #84550 but with way less unbearable: mesons are off
the table and I've made the night vision tonalities lighter now, while
also improving the darkness cutoffs of some of them. Btw, you can also
turn night vision googles on/off now. Each pair of departmental night
vision goggles now comes with their own tint to boot.

As always, this doesn't affect nukies and ninjas. They're almost
garaunteed to keep their googles equipped and on at all time, so it
would honestly adulterate the overall experience a little.

Now, for some pictures...

In the dark, **top** row is **old**, **bottom** row is **new**. from
left to right: security, science, standard/meson, diagnostic, health:

![dank](https://github.com/tgstation/tgstation/assets/42542238/4eb0dc3d-5b3a-47b1-ad65-d3da138a9213)

In the light: security, science, no goggles, standard/meson, diagnostic,
health:

![lite](https://github.com/tgstation/tgstation/assets/42542238/6e56262f-8ed6-4ea9-bab7-2110bc589d65)

The screenshots were taken from varedited goggles on the servers because
it's bit faster than booting up a local server, plus I had to finetune a
few things.

## Why It's Good For The Game
So, I kinda wanted to give a bit of screen colors to goggles that was
not some sort of "optional, by default turned off" kind of crap nobody
cares about, however my previous PR was met with a lot of criticism,
which made me rethink how to do it. I honestly don't want it to be a
burden, but I do want to make them a bit fancier tho.

Also the the medical NVs (and perhaps sec NVs) were a bit crappier than
the rest.

## Changelog

🆑
add: Night vision goggles now subtly tint your screen.
add: You can turn your night vision goggles off. Doing so removes the
tint and the eye protection malus.
/🆑
This commit is contained in:
Ghom
2024-07-07 21:17:37 +02:00
committed by GitHub
parent 84231ac8db
commit a1366fc905
15 changed files with 107 additions and 19 deletions

View File

@@ -116,3 +116,36 @@
/datum/action/item_action/call_link /datum/action/item_action/call_link
name = "Call MODlink" name = "Call MODlink"
/datum/action/item_action/toggle_nv
name = "Toggle Night Vision"
var/stored_cutoffs
var/stored_colour
/datum/action/item_action/toggle_nv/New(obj/item/clothing/glasses/target)
. = ..()
target.AddElement(/datum/element/update_icon_updates_onmob)
/datum/action/item_action/toggle_nv/Trigger(trigger_flags)
if(!istype(target, /obj/item/clothing/glasses))
return ..()
var/obj/item/clothing/glasses/goggles = target
var/mob/holder = goggles.loc
if(!istype(holder) || holder.get_slot_by_item(goggles) != ITEM_SLOT_EYES)
holder = null
if(stored_cutoffs)
goggles.color_cutoffs = stored_cutoffs
goggles.flash_protect = FLASH_PROTECTION_SENSITIVE
stored_cutoffs = null
if(stored_colour)
goggles.change_glass_color(stored_colour)
playsound(goggles, 'sound/items/night_vision_on.ogg', 30, TRUE, -3)
else
stored_cutoffs = goggles.color_cutoffs
stored_colour = goggles.glass_colour_type
goggles.color_cutoffs = list()
goggles.flash_protect = FLASH_PROTECTION_NONE
if(stored_colour)
goggles.change_glass_color(null)
playsound(goggles, 'sound/machines/click.ogg', 30, TRUE, -3)
holder?.update_sight()
goggles.update_appearance()

View File

@@ -300,7 +300,7 @@
new /obj/item/clothing/suit/armor/vest/marine/pmc(src) //The armor kit is comparable to the infiltrator, 6 TC new /obj/item/clothing/suit/armor/vest/marine/pmc(src) //The armor kit is comparable to the infiltrator, 6 TC
new /obj/item/clothing/head/helmet/marine/pmc(src) new /obj/item/clothing/head/helmet/marine/pmc(src)
new /obj/item/clothing/mask/gas/sechailer(src) new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/clothing/glasses/night(src) // 3~ TC new /obj/item/clothing/glasses/night/colorless(src) // 3~ TC
new /obj/item/clothing/gloves/krav_maga/combatglovesplus(src) //5TC new /obj/item/clothing/gloves/krav_maga/combatglovesplus(src) //5TC
new /obj/item/clothing/shoes/jackboots(src) new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/storage/belt/military/assault/fisher(src) //items in this belt easily costs 18 TC new /obj/item/storage/belt/military/assault/fisher(src) //items in this belt easily costs 18 TC

View File

@@ -20,7 +20,7 @@
/obj/structure/closet/syndicate/personal/PopulateContents() /obj/structure/closet/syndicate/personal/PopulateContents()
..() ..()
new /obj/item/trench_tool(src) new /obj/item/trench_tool(src)
new /obj/item/clothing/glasses/night(src) new /obj/item/clothing/glasses/night/colorless(src)
new /obj/item/ammo_box/magazine/m10mm(src) new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/storage/belt/military(src) new /obj/item/storage/belt/military(src)
new /obj/item/storage/belt/holster/nukie(src) new /obj/item/storage/belt/holster/nukie(src)

View File

@@ -634,6 +634,10 @@ Striking a noncultist, however, will tear their flesh."}
icon_state = "blindfold" icon_state = "blindfold"
inhand_icon_state = "blindfold" inhand_icon_state = "blindfold"
flash_protect = FLASH_PROTECTION_WELDER flash_protect = FLASH_PROTECTION_WELDER
actions_types = null
color_cutoffs = list(40, 0, 0) //red
glass_colour_type = null
forced_glass_color = FALSE
/obj/item/clothing/glasses/hud/health/night/cultblind/equipped(mob/living/user, slot) /obj/item/clothing/glasses/hud/health/night/cultblind/equipped(mob/living/user, slot)
..() ..()

View File

@@ -1,7 +1,7 @@
/datum/outfit/ninja /datum/outfit/ninja
name = "Space Ninja" name = "Space Ninja"
uniform = /obj/item/clothing/under/syndicate/ninja uniform = /obj/item/clothing/under/syndicate/ninja
glasses = /obj/item/clothing/glasses/night glasses = /obj/item/clothing/glasses/night/colorless
mask = /obj/item/clothing/mask/gas/ninja mask = /obj/item/clothing/mask/gas/ninja
ears = /obj/item/radio/headset ears = /obj/item/radio/headset
shoes = /obj/item/clothing/shoes/jackboots shoes = /obj/item/clothing/shoes/jackboots

View File

@@ -67,7 +67,7 @@
/datum/outfit/syndicate/full /datum/outfit/syndicate/full
name = "Syndicate Operative - Full Kit" name = "Syndicate Operative - Full Kit"
glasses = /obj/item/clothing/glasses/night glasses = /obj/item/clothing/glasses/night/colorless
mask = /obj/item/clothing/mask/gas/syndicate mask = /obj/item/clothing/mask/gas/syndicate
back = /obj/item/mod/control/pre_equipped/nuclear back = /obj/item/mod/control/pre_equipped/nuclear
r_pocket = /obj/item/tank/internals/emergency_oxygen/engi r_pocket = /obj/item/tank/internals/emergency_oxygen/engi

View File

@@ -180,9 +180,15 @@
/datum/client_colour/glass_colour/yellow /datum/client_colour/glass_colour/yellow
colour = "#ffff66" colour = "#ffff66"
/datum/client_colour/glass_colour/lightyellow
colour = "#ffffaa"
/datum/client_colour/glass_colour/red /datum/client_colour/glass_colour/red
colour = "#ffaaaa" colour = "#ffaaaa"
/datum/client_colour/glass_colour/lightred
colour = "#ffcccc"
/datum/client_colour/glass_colour/darkred /datum/client_colour/glass_colour/darkred
colour = "#bb5555" colour = "#bb5555"
@@ -195,6 +201,9 @@
/datum/client_colour/glass_colour/purple /datum/client_colour/glass_colour/purple
colour = "#ff99ff" colour = "#ff99ff"
/datum/client_colour/glass_colour/lightpurple
colour = "#ffccff"
/datum/client_colour/glass_colour/gray /datum/client_colour/glass_colour/gray
colour = "#cccccc" colour = "#cccccc"

View File

@@ -92,8 +92,14 @@
inhand_icon_state = "nvgmeson" inhand_icon_state = "nvgmeson"
flash_protect = FLASH_PROTECTION_SENSITIVE flash_protect = FLASH_PROTECTION_SENSITIVE
// Night vision mesons get the same but more intense // Night vision mesons get the same but more intense
color_cutoffs = list(10, 30, 10) color_cutoffs = list(10, 35, 10)
glass_colour_type = /datum/client_colour/glass_colour/green glass_colour_type = /datum/client_colour/glass_colour/lightgreen
actions_types = list(/datum/action/item_action/toggle_nv)
forced_glass_color = TRUE
/obj/item/clothing/glasses/meson/night/update_icon_state()
. = ..()
icon_state = length(color_cutoffs) ? initial(icon_state) : "nvgmeson_off"
/obj/item/clothing/glasses/meson/gar /obj/item/clothing/glasses/meson/gar
name = "gar mesons" name = "gar mesons"
@@ -138,8 +144,14 @@
icon_state = "scihudnight" icon_state = "scihudnight"
flash_protect = FLASH_PROTECTION_SENSITIVE flash_protect = FLASH_PROTECTION_SENSITIVE
// Real vivid purple // Real vivid purple
color_cutoffs = list(50, 10, 30) color_cutoffs = list(30, 5, 15)
glass_colour_type = /datum/client_colour/glass_colour/green glass_colour_type = /datum/client_colour/glass_colour/lightpurple
actions_types = list(/datum/action/item_action/toggle_nv)
forced_glass_color = TRUE
/obj/item/clothing/glasses/science/night/update_icon_state()
. = ..()
icon_state = length(color_cutoffs) ? initial(icon_state) : "night_off"
/obj/item/clothing/glasses/night /obj/item/clothing/glasses/night
name = "night vision goggles" name = "night vision goggles"
@@ -149,8 +161,18 @@
flags_cover = GLASSESCOVERSEYES flags_cover = GLASSESCOVERSEYES
flash_protect = FLASH_PROTECTION_SENSITIVE flash_protect = FLASH_PROTECTION_SENSITIVE
// Dark green // Dark green
color_cutoffs = list(10, 30, 10) color_cutoffs = list(10, 25, 10)
glass_colour_type = /datum/client_colour/glass_colour/green glass_colour_type = /datum/client_colour/glass_colour/lightgreen
actions_types = list(/datum/action/item_action/toggle_nv)
forced_glass_color = TRUE
/obj/item/clothing/glasses/night/update_icon_state()
. = ..()
icon_state = length(color_cutoffs) ? initial(icon_state) : "night_off"
/obj/item/clothing/glasses/night/colorless
desc = parent_type::desc + " Now with 50% less green!"
forced_glass_color = FALSE
/obj/item/clothing/glasses/eyepatch /obj/item/clothing/glasses/eyepatch
name = "eyepatch" name = "eyepatch"

View File

@@ -67,8 +67,14 @@
flash_protect = FLASH_PROTECTION_SENSITIVE flash_protect = FLASH_PROTECTION_SENSITIVE
flags_cover = GLASSESCOVERSEYES flags_cover = GLASSESCOVERSEYES
// Blue green, dark // Blue green, dark
color_cutoffs = list(5, 15, 30) color_cutoffs = list(20, 20, 45)
glass_colour_type = /datum/client_colour/glass_colour/green glass_colour_type = /datum/client_colour/glass_colour/lightgreen
actions_types = list(/datum/action/item_action/toggle_nv)
forced_glass_color = TRUE
/obj/item/clothing/glasses/hud/health/night/update_icon_state()
. = ..()
icon_state = length(color_cutoffs) ? initial(icon_state) : "night_off"
/obj/item/clothing/glasses/hud/health/night/meson /obj/item/clothing/glasses/hud/health/night/meson
name = "night vision meson health scanner HUD" name = "night vision meson health scanner HUD"
@@ -79,7 +85,8 @@
name = "night vision medical science scanner HUD" name = "night vision medical science scanner HUD"
desc = "An clandestine medical science heads-up display that allows operatives to find \ desc = "An clandestine medical science heads-up display that allows operatives to find \
dying captains and the perfect poison to finish them off in complete darkness." dying captains and the perfect poison to finish them off in complete darkness."
clothing_traits = list(TRAIT_REAGENT_SCANNER) clothing_traits = list(TRAIT_REAGENT_SCANNER, TRAIT_MEDICAL_HUD)
forced_glass_color = FALSE
/obj/item/clothing/glasses/hud/health/sunglasses /obj/item/clothing/glasses/hud/health/sunglasses
name = "medical HUDSunglasses" name = "medical HUDSunglasses"
@@ -115,8 +122,14 @@
flash_protect = FLASH_PROTECTION_SENSITIVE flash_protect = FLASH_PROTECTION_SENSITIVE
flags_cover = GLASSESCOVERSEYES flags_cover = GLASSESCOVERSEYES
// Pale yellow // Pale yellow
color_cutoffs = list(30, 20, 5) color_cutoffs = list(25, 15, 5)
glass_colour_type = /datum/client_colour/glass_colour/green glass_colour_type = /datum/client_colour/glass_colour/lightyellow
actions_types = list(/datum/action/item_action/toggle_nv)
forced_glass_color = TRUE
/obj/item/clothing/glasses/hud/diagnostic/night/update_icon_state()
. = ..()
icon_state = length(color_cutoffs) ? initial(icon_state) : "night_off"
/obj/item/clothing/glasses/hud/diagnostic/sunglasses /obj/item/clothing/glasses/hud/diagnostic/sunglasses
name = "diagnostic sunglasses" name = "diagnostic sunglasses"
@@ -187,8 +200,14 @@
flash_protect = FLASH_PROTECTION_SENSITIVE flash_protect = FLASH_PROTECTION_SENSITIVE
flags_cover = GLASSESCOVERSEYES flags_cover = GLASSESCOVERSEYES
// Red with a tint of green // Red with a tint of green
color_cutoffs = list(35, 5, 5) color_cutoffs = list(40, 15, 10)
glass_colour_type = /datum/client_colour/glass_colour/green glass_colour_type = /datum/client_colour/glass_colour/lightred
actions_types = list(/datum/action/item_action/toggle_nv)
forced_glass_color = TRUE
/obj/item/clothing/glasses/hud/security/night/update_icon_state()
. = ..()
icon_state = length(color_cutoffs) ? initial(icon_state) : "night_off"
/obj/item/clothing/glasses/hud/security/sunglasses/gars /obj/item/clothing/glasses/hud/security/sunglasses/gars
name = "\improper HUD gar glasses" name = "\improper HUD gar glasses"

View File

@@ -242,7 +242,7 @@
/obj/item/storage/box/lights/mixed = 1, /obj/item/storage/box/lights/mixed = 1,
) )
belt = /obj/item/storage/belt/janitor/full belt = /obj/item/storage/belt/janitor/full
glasses = /obj/item/clothing/glasses/night glasses = /obj/item/clothing/glasses/night/colorless
l_pocket = /obj/item/grenade/chem_grenade/cleaner l_pocket = /obj/item/grenade/chem_grenade/cleaner
r_pocket = /obj/item/grenade/chem_grenade/cleaner r_pocket = /obj/item/grenade/chem_grenade/cleaner
l_hand = /obj/item/storage/bag/trash/bluespace l_hand = /obj/item/storage/bag/trash/bluespace

View File

@@ -308,7 +308,7 @@
/datum/outfit/syndicatespace/syndicrew /datum/outfit/syndicatespace/syndicrew
name = "Syndicate Ship Crew Member" name = "Syndicate Ship Crew Member"
glasses = /obj/item/clothing/glasses/night glasses = /obj/item/clothing/glasses/night/colorless
mask = /obj/item/clothing/mask/gas/syndicate mask = /obj/item/clothing/mask/gas/syndicate
l_pocket = /obj/item/gun/ballistic/automatic/pistol l_pocket = /obj/item/gun/ballistic/automatic/pistol
r_pocket = /obj/item/knife/combat/survival r_pocket = /obj/item/knife/combat/survival

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1 @@
night_vision_on.ogg by Syna-Max -- https://freesound.org/s/60345/ -- License: Attribution NonCommercial 4.0

Binary file not shown.