mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Rewrites HUD Handling for Glasses
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
//var/invisa_view = 0
|
||||
var/prescription = 0
|
||||
var/see_darkness = 1
|
||||
var/HUDType = 0
|
||||
|
||||
/obj/item/clothing/glasses/meson
|
||||
name = "Optical Meson Scanner"
|
||||
@@ -258,17 +259,12 @@
|
||||
darkness_view = 1
|
||||
flash_protect = 1
|
||||
tint = 1
|
||||
var/obj/item/clothing/glasses/hud/security/hud = null
|
||||
HUDType = SECHUD
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
New()
|
||||
..()
|
||||
src.hud = new/obj/item/clothing/glasses/hud/security(src)
|
||||
return
|
||||
|
||||
/obj/item/clothing/glasses/thermal
|
||||
name = "Optical Thermal Scanner"
|
||||
desc = "Thermals in the shape of glasses."
|
||||
|
||||
@@ -3,23 +3,22 @@
|
||||
desc = "A heads-up display that provides important info in (almost) real time."
|
||||
flags = null //doesn't protect eyes because it's a monocle, duh
|
||||
origin_tech = "magnets=3;biotech=2"
|
||||
HUDType = SECHUD
|
||||
var/list/icon/current = list() //the current hud icons
|
||||
|
||||
proc
|
||||
process_hud(var/mob/M) return
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/hud/health
|
||||
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"
|
||||
HUDType = MEDHUD
|
||||
|
||||
/obj/item/clothing/glasses/hud/health_advanced
|
||||
name = "Advanced Health Scanner HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. Includes anti-flash filter."
|
||||
icon_state = "advmedhud"
|
||||
flash_protect = 1
|
||||
HUDType = MEDHUD
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/night
|
||||
name = "Night Vision Health Scanner HUD"
|
||||
@@ -29,12 +28,6 @@
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/process_hud(var/mob/M)
|
||||
process_med_hud(M,1)
|
||||
|
||||
/obj/item/clothing/glasses/hud/health_advanced/process_hud(var/mob/M)
|
||||
process_med_hud(M,1)
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/hud/security
|
||||
name = "Security HUD"
|
||||
@@ -57,18 +50,3 @@
|
||||
icon_state = "securityhudnight"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/process_hud(var/mob/M)
|
||||
|
||||
if(!M) return
|
||||
if(!M.client) return
|
||||
var/client/C = M.client
|
||||
for(var/mob/living/carbon/human/perp in view(get_turf(M)))
|
||||
if(M.see_invisible < perp.invisibility)
|
||||
continue
|
||||
if(!C) continue
|
||||
C.images += perp.hud_list[ID_HUD]
|
||||
C.images += perp.hud_list[WANTED_HUD]
|
||||
C.images += perp.hud_list[IMPTRACK_HUD]
|
||||
C.images += perp.hud_list[IMPLOYAL_HUD]
|
||||
C.images += perp.hud_list[IMPCHEM_HUD]
|
||||
|
||||
@@ -1192,18 +1192,16 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
/* 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
|
||||
|
||||
if(istype(glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
see_in_dark = 1
|
||||
if(istype(glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
var/obj/item/clothing/glasses/sunglasses/sechud/O = glasses
|
||||
if(O.hud) O.hud.process_hud(src)
|
||||
if(!druggy) see_invisible = (!O.see_darkness || O.vision_flags ? SEE_INVISIBLE_MINIMUM : SEE_INVISIBLE_LIVING) // So we can have meson/thermal/material sunglasses
|
||||
switch(G.HUDType)
|
||||
if(SECHUD)
|
||||
process_sec_hud(src,1)
|
||||
if(MEDHUD)
|
||||
process_med_hud(src,1)
|
||||
if(ANTAGHUD)
|
||||
process_antag_hud(src)
|
||||
|
||||
|
||||
|
||||
if(istype(glasses, /obj/item/clothing/glasses/hud))
|
||||
var/obj/item/clothing/glasses/hud/O = glasses
|
||||
O.process_hud(src)
|
||||
if(!druggy)
|
||||
see_invisible = (!O.see_darkness || O.vision_flags ? SEE_INVISIBLE_MINIMUM : SEE_INVISIBLE_LIVING)
|
||||
else if(!seer)
|
||||
see_in_dark = species.darksight
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
@@ -195,15 +195,11 @@
|
||||
|
||||
regular_hud_updates()
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud)
|
||||
hud.hud.process_hud(src)
|
||||
else
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1)
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
|
||||
Reference in New Issue
Block a user