mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
NVG Bugfix
Now they work, and also added a green hud element that tints the screen green when nvg's are worn.
This commit is contained in:
@@ -14,6 +14,7 @@ var/datum/global_hud/global_hud = new()
|
||||
var/obj/screen/blurry
|
||||
var/list/vimpaired
|
||||
var/list/darkMask
|
||||
var/obj/screen/nvg
|
||||
|
||||
/datum/global_hud/New()
|
||||
//420erryday psychedellic colours screen overlay for when you are high
|
||||
@@ -30,6 +31,13 @@ var/datum/global_hud/global_hud = new()
|
||||
blurry.layer = 17
|
||||
blurry.mouse_opacity = 0
|
||||
|
||||
nvg = new /obj/screen()
|
||||
nvg.screen_loc = "1,1"
|
||||
nvg.icon = 'icons/obj/nvg_hud_full.dmi'
|
||||
nvg.icon_state = "nvg_hud"
|
||||
nvg.layer = 17
|
||||
nvg.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/O
|
||||
var/i
|
||||
//that nasty looking dither you get when you're short-sighted
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
icon_state = "night"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2"
|
||||
darkness_view = 3
|
||||
darkness_view = 7
|
||||
|
||||
/obj/item/clothing/glasses/eyepatch
|
||||
name = "eyepatch"
|
||||
|
||||
@@ -1138,7 +1138,7 @@
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
client.images.Remove(hud)
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg)
|
||||
|
||||
update_action_buttons()
|
||||
|
||||
@@ -1277,8 +1277,9 @@
|
||||
see_in_dark += G.darkness_view
|
||||
if(G.vision_flags)
|
||||
sight |= G.vision_flags
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(istype(G,/obj/item/clothing/glasses/night))
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
client.screen += global_hud.nvg
|
||||
|
||||
/* 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
|
||||
@@ -1296,6 +1297,8 @@
|
||||
else if(!seer)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
|
||||
|
||||
if(healths)
|
||||
if (analgesic)
|
||||
healths.icon_state = "health_health_numb"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Reference in New Issue
Block a user