mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
Tweaks species night vision (#11416)
This commit is contained in:
@@ -696,6 +696,10 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
|||||||
to_chat(M, SPAN_WARNING("You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better."))
|
to_chat(M, SPAN_WARNING("You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better."))
|
||||||
cannotzoom = 1
|
cannotzoom = 1
|
||||||
|
|
||||||
|
if(ishuman(M)) //this code is here to stop species night vision from being used on the cameras, since it does not make sense since cameras are just images. this is probably not the best way to do this, but it works
|
||||||
|
var/mob/living/carbon/human/H = M
|
||||||
|
H.disable_organ_night_vision()
|
||||||
|
|
||||||
if(!zoom && !cannotzoom)
|
if(!zoom && !cannotzoom)
|
||||||
if(M.hud_used.hud_shown)
|
if(M.hud_used.hud_shown)
|
||||||
M.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
|
M.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
|
||||||
|
|||||||
@@ -2055,3 +2055,10 @@
|
|||||||
set name = "click_suit_storage"
|
set name = "click_suit_storage"
|
||||||
if(s_store)
|
if(s_store)
|
||||||
s_store.Click()
|
s_store.Click()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/disable_organ_night_vision()
|
||||||
|
var/obj/item/organ/E = internal_organs_by_name[BP_EYES]
|
||||||
|
if (istype(E, /obj/item/organ/internal/eyes/night))
|
||||||
|
var/obj/item/organ/internal/eyes/night/N = E
|
||||||
|
if(N.night_vision )
|
||||||
|
N.disable_night_vision()
|
||||||
@@ -125,6 +125,10 @@
|
|||||||
A.client.eye = A.eyeobj
|
A.client.eye = A.eyeobj
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
if(ishuman(user)) //this code is here to stop species night vision from being used on the cameras, since it does not make sense since cameras are just images. this is probably not the best way to do this, but it works
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
H.disable_organ_night_vision()
|
||||||
|
|
||||||
set_current(C)
|
set_current(C)
|
||||||
user.machine = ui_host()
|
user.machine = ui_host()
|
||||||
user.reset_view(current_camera)
|
user.reset_view(current_camera)
|
||||||
|
|||||||
@@ -42,6 +42,12 @@
|
|||||||
if(!vision_mechanical_color && (status & ORGAN_ROBOT))
|
if(!vision_mechanical_color && (status & ORGAN_ROBOT))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(owner.client && ((owner.client.view != world.view) || (owner.client.pixel_x != 0) || (owner.client.pixel_y != 0))) //using binoculars
|
||||||
|
return
|
||||||
|
|
||||||
|
if(owner.machine && owner.machine.check_eye(owner) >= 0 && owner.client.eye != owner) //using cameras
|
||||||
|
return
|
||||||
|
|
||||||
if(!night_vision)
|
if(!night_vision)
|
||||||
enable_night_vision()
|
enable_night_vision()
|
||||||
else
|
else
|
||||||
|
|||||||
5
html/changelogs/alberyk-nightvisiontweak.yml
Normal file
5
html/changelogs/alberyk-nightvisiontweak.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
author: Alberyk
|
||||||
|
|
||||||
|
delete-after: True
|
||||||
|
changes:
|
||||||
|
- tweak: "Species' night vision can no longer be used with cameras and binoculars."
|
||||||
Reference in New Issue
Block a user