Refactor sync_nightvision_screen() into sync_lighting_plane_alpha()

Done to avoid having to manually write in the call of the proc since it is needed everywhere sync_lighting_plane_alph() is anyhow.
This commit is contained in:
KasparoVy
2019-05-31 02:00:43 -04:00
parent eaad2697c4
commit 2f29bbe0f7
9 changed files with 4 additions and 11 deletions
+2 -1
View File
@@ -1357,7 +1357,6 @@ 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)
@@ -1365,6 +1364,8 @@ var/list/slot_equipment_priority = list( \
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)