From d69f9557ce84277c502c40aa2555ffeecf4fad75 Mon Sep 17 00:00:00 2001 From: Datraen Date: Thu, 17 Nov 2016 10:42:52 -0500 Subject: [PATCH] Make cameras great again --- code/modules/paperwork/photography.dm | 8 +++--- html/changelogs/Dat-MakeCameras.yml | 36 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 html/changelogs/Dat-MakeCameras.yml diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index bbaec173188..a0f81f0aee5 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -249,13 +249,11 @@ var/global/photo_count = 0 on = 1 /obj/item/device/camera/proc/can_capture_turf(turf/T, mob/user) - var/mob/dummy = new(T) //Go go visibility check dummy var/viewer = user if(user.client) //To make shooting through security cameras possible viewer = user.client.eye - var/can_see = (dummy in viewers(world.view, viewer)) + var/can_see = (T in view(viewer)) - qdel(dummy) return can_see /obj/item/device/camera/proc/captureimage(atom/target, mob/user, flag) @@ -264,8 +262,8 @@ var/global/photo_count = 0 var/z_c = target.z var/list/turfs = list() var/mobs = "" - for(var/i = 1; i <= size; i++) - for(var/j = 1; j <= size; j++) + for(var/i = 1 to size) + for(var/j = 1 to size) var/turf/T = locate(x_c, y_c, z_c) if(can_capture_turf(T, user)) turfs.Add(T) diff --git a/html/changelogs/Dat-MakeCameras.yml b/html/changelogs/Dat-MakeCameras.yml new file mode 100644 index 00000000000..06ec62629cf --- /dev/null +++ b/html/changelogs/Dat-MakeCameras.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Datraen + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Makes cameras faster, removing a large chunk of bloat relating to taking pictures. Specifically for taking pictures of angry cheetos."