Merge pull request #11484 from KasparoVy/double_down

Re-add The Ability to Natively See in the Dark
This commit is contained in:
Fox McCloud
2019-08-04 18:47:08 -04:00
committed by GitHub
3 changed files with 16 additions and 2 deletions
@@ -1456,4 +1456,4 @@ var/list/robot_verbs_default = list(
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
+15 -1
View File
@@ -1370,5 +1370,19 @@ var/list/slot_equipment_priority = list( \
/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
sync_nightvision_screen() //Sync up the overlay used for nightvision to the amount of see_in_dark a mob has. This needs to be called everywhere sync_lighting_plane_alpha() is.
/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]"