diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 32e6487ca57..af5dc27f617 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -695,6 +695,7 @@ var/list/blood_splatter_icons = list() //the sight changes to give to the mob whose perspective is set to that atom (e.g. A mob with nightvision loses its nightvision while looking through a normal camera) /atom/proc/update_remote_sight(mob/living/user) user.sync_lighting_plane_alpha() + user.sync_nightvision_screen() return /atom/proc/checkpass(passflag) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index ee858138f70..ca2837693e8 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -301,4 +301,5 @@ Des: Removes all infected images from the alien. lighting_alpha = min(lighting_alpha, E.lighting_alpha) SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) - sync_lighting_plane_alpha() \ No newline at end of file + sync_lighting_plane_alpha() + sync_nightvision_screen() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 31788ecc8cf..dae35d7b03e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1165,3 +1165,4 @@ so that different stomachs can handle things in different ways VB*/ SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() + sync_nightvision_screen() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 2cd524f8a15..b6741282f0d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -567,6 +567,7 @@ dna.species.update_sight(src) SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() + sync_nightvision_screen() //Added a safety check in case you want to shock a human mob directly through electrocute_act. /mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 7dc6c042e0c..8f7869fd1d9 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -717,6 +717,7 @@ It'll return null if the organ doesn't correspond, so include null checks when u H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) H.sync_lighting_plane_alpha() + H.sync_nightvision_screen() /datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source) if(abs(temperature - M.bodytemperature) > 10) //If our water and mob temperature varies by more than 10K, cool or/ heat them appropriately diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index e0c58c484d8..9378f29e365 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -215,6 +215,7 @@ see_in_dark = 8 see_invisible = SEE_INVISIBLE_OBSERVER sync_lighting_plane_alpha() + sync_nightvision_screen() /mob/living/proc/handle_hud_icons() handle_hud_icons_health() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 80d644152f4..88bab9e4f1b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1314,3 +1314,4 @@ var/list/ai_verbs_default = list( SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() + sync_nightvision_screen() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 100dd1ffbba..93ce56344c6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1453,4 +1453,5 @@ var/list/robot_verbs_default = list( SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() + sync_nightvision_screen() \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index fb11e2ef277..79954955256 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1357,9 +1357,22 @@ var/list/slot_equipment_priority = list( \ /mob/proc/update_sight() SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() + sync_nightvision_screen() /mob/proc/sync_lighting_plane_alpha() if(hud_used) var/obj/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"] - if (L) + if(L) L.alpha = lighting_alpha + +/mob/proc/sync_nightvision_screen() + var/obj/screen/fullscreen/see_through_darkness/S = screens["see_through_darkness"] + if(S) + var/suffix = "" + switch(see_in_dark) + if(3 to 8) + suffix = "_[see_in_dark]" + if(8 to INFINITY) + suffix = "_8" + + S.icon_state = "[initial(S.icon_state)][suffix]" diff --git a/icons/mob/screen_full.dmi b/icons/mob/screen_full.dmi index 595b870a172..26483a3589b 100644 Binary files a/icons/mob/screen_full.dmi and b/icons/mob/screen_full.dmi differ