From 40776d5ee5e227de6d5231696f7f5a339f9c9a4b Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 26 Mar 2018 19:03:48 -0700 Subject: [PATCH 1/2] Security records consoles now uploads the center 32x32 of a photo when putting photos in (#36597) * Sec console centering photos * Update security.dm * whoever coded this before me is triple meme --- code/game/machinery/computer/security.dm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 8b08824c44..0b5ba9ad46 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -608,9 +608,16 @@ What a mess.*/ var/obj/item/photo/P = active1.fields["photo_front"] P.show(usr) if("upd_photo_front") - var/icon/photo = get_photo(usr) + var/obj/item/photo/photo = get_photo(usr) if(photo) qdel(active1.fields["photo_front"]) + //Lets center it to a 32x32. + var/icon/I = photo.img + var/w = I.Width() + var/h = I.Height() + var/dw = w - 32 + var/dh = w - 32 + I.Crop(dw/2, dh/2, w - dw/2, h - dh/2) active1.fields["photo_front"] = photo if("print_photo_front") if(active1.fields["photo_front"]) @@ -623,9 +630,16 @@ What a mess.*/ var/obj/item/photo/P = active1.fields["photo_side"] P.show(usr) if("upd_photo_side") - var/icon/photo = get_photo(usr) + var/obj/item/photo/photo = get_photo(usr) if(photo) qdel(active1.fields["photo_side"]) + //Lets center it to a 32x32. + var/icon/I = photo.img + var/w = I.Width() + var/h = I.Height() + var/dw = w - 32 + var/dh = w - 32 + I.Crop(dw/2, dh/2, w - dw/2, h - dh/2) active1.fields["photo_side"] = photo if("print_photo_side") if(active1.fields["photo_side"])