mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Fixes Nightvision Glasses
Nightvision glasses no longer have a snowflake check, instead all glasses have a see_darkness variable that determines if they see the darkness overlay.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
//var/darkness_view = 0//Base human is 2
|
||||
//var/invisa_view = 0
|
||||
var/prescription = 0
|
||||
var/see_darkness = 1
|
||||
|
||||
/obj/item/clothing/glasses/meson
|
||||
name = "Optical Meson Scanner"
|
||||
@@ -20,13 +21,14 @@
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/meson/night
|
||||
name = "Night Vision Optical Meson Scanner"
|
||||
desc = "An Optical Meson Scanner fitted with an amplified visible light spectrum overlay, providing greater visual clarity in darkness."
|
||||
icon_state = "nvgmeson"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
|
||||
/obj/item/clothing/glasses/meson/prescription
|
||||
name = "prescription mesons"
|
||||
@@ -49,7 +51,7 @@
|
||||
desc = "nothing"
|
||||
icon_state = "purple"
|
||||
item_state = "glasses"
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/janitor
|
||||
name = "Janitorial Goggles"
|
||||
desc = "These'll keep the soap out of your eyes."
|
||||
@@ -63,6 +65,7 @@
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
icon_state = "healthhudnight"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/process_hud(var/mob/M)
|
||||
process_med_hud(M,1)
|
||||
@@ -53,6 +54,7 @@
|
||||
desc = "An advanced heads-up display which provides id data and vision in complete darkness."
|
||||
icon_state = "securityhudnight"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/process_hud(var/mob/M)
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
if(enabled) // If the Ninja's suit is on and connected.
|
||||
if(usr.mind.special_role != "Ninja")
|
||||
usr << "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked."
|
||||
return
|
||||
|
||||
if(!user) // The user var is, so far as I can tell, required to refresh the window after each click.
|
||||
user = usr
|
||||
@@ -86,6 +87,7 @@
|
||||
|
||||
if(href_list["night"])
|
||||
darkness_view = (darkness_view ? 0 : 8)
|
||||
see_darkness = (darkness_view ? 0 : 1)
|
||||
energyConsumption += (darkness_view ? 2 : -2)
|
||||
usr << "Light amplification <span style='color: #0000ff;'><b>[(darkness_view ? "ENABLED" : "DISABLED")]</b></span>."
|
||||
|
||||
|
||||
@@ -1325,7 +1325,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
sight |= G.vision_flags
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(istype(G,/obj/item/clothing/glasses/night))
|
||||
if(!G.see_darkness)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
/* HUD shit goes here, as long as it doesn't modify sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
@@ -1341,9 +1341,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
var/obj/item/clothing/glasses/hud/O = glasses
|
||||
O.process_hud(src)
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
if(istype(O,/obj/item/clothing/glasses/hud/security/night) || istype(O,/obj/item/clothing/glasses/hud/health/night))
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
see_invisible = (O.see_darkness ? SEE_INVISIBLE_LIVING : SEE_INVISIBLE_MINIMUM)
|
||||
else if(!seer)
|
||||
see_in_dark = species.darksight
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
Reference in New Issue
Block a user