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-08 01:55:30 -04:00
parent eaad2697c4
commit 2f29bbe0f7
9 changed files with 4 additions and 11 deletions
@@ -301,5 +301,4 @@ 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()
sync_nightvision_screen()
sync_lighting_plane_alpha()
-1
View File
@@ -1165,4 +1165,3 @@ 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()
@@ -567,7 +567,6 @@
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)
@@ -717,7 +717,6 @@ 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
-1
View File
@@ -235,7 +235,6 @@
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()
-1
View File
@@ -1314,4 +1314,3 @@ var/list/ai_verbs_default = list(
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
sync_nightvision_screen()
@@ -1453,5 +1453,4 @@ var/list/robot_verbs_default = list(
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
sync_nightvision_screen()
+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)