Returns Darksight Functionality

Returns the ability to see in the dark. see_in_dark determines how far you can see into absolute darkness, both for examining tile contents and visuals.
This commit is contained in:
KasparoVy
2019-05-31 01:59:51 -04:00
parent 42c0702a6a
commit 3d646deb4d
10 changed files with 23 additions and 2 deletions
@@ -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()
sync_lighting_plane_alpha()
sync_nightvision_screen()
+1
View File
@@ -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()
@@ -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)
@@ -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
+1
View File
@@ -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()
+1
View File
@@ -1314,3 +1314,4 @@ var/list/ai_verbs_default = list(
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
sync_nightvision_screen()
@@ -1453,4 +1453,5 @@ var/list/robot_verbs_default = list(
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
sync_nightvision_screen()
+14 -1
View File
@@ -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]"