From fa931ae9a9620af238c3fe07983ad22fbbde572c Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 30 Jan 2015 10:37:42 +0100 Subject: [PATCH] Photo cache improvements. According to http://www.byond.com/docs/ref/info.html#/proc/browse_rsc browse_rsc() does not resend already cached data, however there is likely also a check to ensure that this data is up to date (using checksums or otherwise) or clients would only ever see the first photo they viewed in a given round. This small change attempts to ensure that a given photo only has to be downloaded once by appending the photo id to the file name, reducing the risk of #7966 happening. --- code/modules/paperwork/photography.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 1a93e87539..2dc370406b 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -57,10 +57,10 @@ var/global/photo_count = 0 user << "It is too far away." /obj/item/weapon/photo/proc/show(mob/user as mob) - user << browse_rsc(img, "tmp_photo.png") + user << browse_rsc(img, "tmp_photo_[id].png") user << browse("[name]" \ + "" \ - + "" \ + + "" \ + "[scribble ? "
Written on the back:
[scribble]" : ""]"\ + "", "window=book;size=[64*photo_size]x[scribble ? 400 : 64*photo_size]") onclose(user, "[name]")