Skip to content

Commit

Permalink
night vision
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 committed Aug 25, 2023
1 parent 090ab64 commit 2114933
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/game/objects/structures/vulture_spotter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
RegisterSignal(user, list(COMSIG_MOB_PICKUP_ITEM, COMSIG_MOB_RESISTED), PROC_REF(do_unscope))
user.client.change_view(scope_zoom, src)
user.see_in_dark += darkness_view
user.lighting_alpha = 127
user.sync_lighting_plane_alpha()
user.overlay_fullscreen("vulture_spotter", /atom/movable/screen/fullscreen/vulture/spotter)
user.freeze()
user.status_flags |= IMMOBILE_ACTION
Expand Down Expand Up @@ -207,6 +209,8 @@
if(scope_user)
var/mob/living/carbon/human/user = scope_user.resolve()
user.see_in_dark -= darkness_view
user.lighting_alpha = user.default_lighting_alpha
user.sync_lighting_plane_alpha()
user.clear_fullscreen("vulture_spotter")
UnregisterSignal(user, list(COMSIG_MOB_PICKUP_ITEM, COMSIG_MOB_RESISTED))
user.pixel_x = 0
Expand Down
4 changes: 4 additions & 0 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,8 @@ Defined in conflicts.dm of the #defines folder.
scope_element = new(src)
gun_user.client.screen += scope_element
gun_user.see_in_dark += darkness_view
gun_user.lighting_alpha = 127
gun_user.sync_lighting_plane_alpha()
RegisterSignal(gun, list(
COMSIG_ITEM_DROPPED,
COMSIG_ITEM_UNWIELD,
Expand All @@ -1469,6 +1471,8 @@ Defined in conflicts.dm of the #defines folder.
scoper.clear_fullscreen("vulture")
scoper.client.screen -= scope_element
scoper.see_in_dark -= darkness_view
scoper.lighting_alpha = 127
scoper.sync_lighting_plane_alpha()
QDEL_NULL(scope_element)
recalculate_scope_pos()
scope_user = null
Expand Down

0 comments on commit 2114933

Please sign in to comment.