diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 956f7c149a5..162783a481c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -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.")) 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(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 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index e02fffac21c..6187e8791f8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -200,7 +200,7 @@ stat("Internal Atmosphere Info", internal.name) stat("Tank Pressure", internal.air_contents.return_pressure()) stat("Distribution Pressure", internal.distribute_pressure) - + var/obj/item/organ/internal/cell/IC = internal_organs_by_name[BP_CELL] if(IC && IC.cell) stat("Battery charge:", "[IC.get_charge()]/[IC.cell.maxcharge]") @@ -2054,4 +2054,11 @@ set hidden = 1 set name = "click_suit_storage" if(s_store) - s_store.Click() \ No newline at end of file + 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() \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/security/camera.dm b/code/modules/modular_computers/file_system/programs/security/camera.dm index 8e386ec8870..7b55c6526ba 100644 --- a/code/modules/modular_computers/file_system/programs/security/camera.dm +++ b/code/modules/modular_computers/file_system/programs/security/camera.dm @@ -125,6 +125,10 @@ A.client.eye = A.eyeobj 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) user.machine = ui_host() user.reset_view(current_camera) diff --git a/code/modules/organs/internal/species/tajara.dm b/code/modules/organs/internal/species/tajara.dm index 21aaf85e7f5..423e6ada27c 100644 --- a/code/modules/organs/internal/species/tajara.dm +++ b/code/modules/organs/internal/species/tajara.dm @@ -42,6 +42,12 @@ if(!vision_mechanical_color && (status & ORGAN_ROBOT)) 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) enable_night_vision() else diff --git a/html/changelogs/alberyk-nightvisiontweak.yml b/html/changelogs/alberyk-nightvisiontweak.yml new file mode 100644 index 00000000000..38c104c0e6d --- /dev/null +++ b/html/changelogs/alberyk-nightvisiontweak.yml @@ -0,0 +1,5 @@ +author: Alberyk + +delete-after: True +changes: + - tweak: "Species' night vision can no longer be used with cameras and binoculars."