From 7c600b94af18a6ba33b316cfaf67549d2707bfe6 Mon Sep 17 00:00:00 2001 From: bgobandit Date: Wed, 4 May 2016 18:13:19 -0400 Subject: [PATCH 1/5] secret document photocopy actually works now --- code/modules/paperwork/photocopier.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 53096240c8f..8030839f6ad 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -127,7 +127,7 @@ else if(doccopy) for(var/i = 0, i < copies, i++) if(toner > 5 && !busy && doccopy) - new /obj/item/documents/photocopy(src, doccopy) + var/obj/item/documents/photocopy/P = new /obj/item/documents/photocopy(loc) toner-= 6 // the sprite shows 6 papers, yes I checked busy = 1 sleep(15) From d8995579930b28d36d6203ca4d99fd74da708bf2 Mon Sep 17 00:00:00 2001 From: bgobandit Date: Wed, 4 May 2016 21:12:23 -0400 Subject: [PATCH 2/5] Photocopying secret documents actually works now. --- code/modules/paperwork/photocopier.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 8030839f6ad..639e2a3e2e1 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -127,7 +127,7 @@ else if(doccopy) for(var/i = 0, i < copies, i++) if(toner > 5 && !busy && doccopy) - var/obj/item/documents/photocopy/P = new /obj/item/documents/photocopy(loc) + new /obj/item/documents/photocopy(loc) toner-= 6 // the sprite shows 6 papers, yes I checked busy = 1 sleep(15) @@ -191,6 +191,15 @@ usr << "You take [photocopy] out of [src]." photocopy = null updateUsrDialog() + else if(doccopy) + if(!istype(usr,/mob/living/silicon/ai)) // honk honk honk + doccopy.loc = usr.loc + usr.put_in_hands(doccopy) + else + doccopy.loc = src.loc + usr << "You take [doccopy] out of [src]." + doccopy = null + updateUsrDialog() else if(check_ass()) ass << "You feel a slight pressure on your ass." else if(href_list["min"]) From 4f88d248c1f9a350ab6c8c63d4093b623d6bccb3 Mon Sep 17 00:00:00 2001 From: bgobandit Date: Wed, 8 Jun 2016 07:11:06 -0400 Subject: [PATCH 3/5] makes requested changes, ends this endless meme --- code/modules/paperwork/photocopier.dm | 35 ++++++++++----------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 639e2a3e2e1..422072e8286 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -127,7 +127,7 @@ else if(doccopy) for(var/i = 0, i < copies, i++) if(toner > 5 && !busy && doccopy) - new /obj/item/documents/photocopy(loc) + new /obj/item/documents/photocopy(loc, src) toner-= 6 // the sprite shows 6 papers, yes I checked busy = 1 sleep(15) @@ -174,32 +174,14 @@ updateUsrDialog() else if(href_list["remove"]) if(copy) - if(!istype(usr,/mob/living/silicon/ai)) //surprised this check didn't exist before, putting stuff in AI's hand is bad - copy.loc = usr.loc - usr.put_in_hands(copy) - else - copy.loc = src.loc - usr << "You take [copy] out of [src]." + do_removal(copy) copy = null - updateUsrDialog() else if(photocopy) - if(!istype(usr,/mob/living/silicon/ai)) //same with this one, wtf - photocopy.loc = usr.loc - usr.put_in_hands(photocopy) - else - photocopy.loc = src.loc - usr << "You take [photocopy] out of [src]." + do_removal(photocopy) photocopy = null - updateUsrDialog() else if(doccopy) - if(!istype(usr,/mob/living/silicon/ai)) // honk honk honk - doccopy.loc = usr.loc - usr.put_in_hands(doccopy) - else - doccopy.loc = src.loc - usr << "You take [doccopy] out of [src]." + do_removal(doccopy) doccopy = null - updateUsrDialog() else if(check_ass()) ass << "You feel a slight pressure on your ass." else if(href_list["min"]) @@ -254,6 +236,15 @@ flick("photocopier1", src) updateUsrDialog() +/obj/machinery/photocopier/proc/do_removal(obj/item/O, mob/user) + if(!issilicon(user)) //surprised this check didn't exist before, putting stuff in AI's hand is bad + O.loc = user.loc + user.put_in_hands(O) + else + O.loc = src.loc + user << "You take [O] out of [src]." + updateUsrDialog() + /obj/machinery/photocopier/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/paper)) if(copier_empty()) From 4fe7a6f00c50edcfbe87d2af56852a1a9c979526 Mon Sep 17 00:00:00 2001 From: oranges Date: Thu, 9 Jun 2016 13:04:42 +1200 Subject: [PATCH 4/5] correctly forward on doccopy argument appease the cranky russian --- code/modules/paperwork/photocopier.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 422072e8286..a893636d9cd 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -127,7 +127,7 @@ else if(doccopy) for(var/i = 0, i < copies, i++) if(toner > 5 && !busy && doccopy) - new /obj/item/documents/photocopy(loc, src) + new /obj/item/documents/photocopy(loc, doccopy) toner-= 6 // the sprite shows 6 papers, yes I checked busy = 1 sleep(15) From 3bc56655e4aa62a81233e72a3bd25f1a22656949 Mon Sep 17 00:00:00 2001 From: oranges Date: Sat, 11 Jun 2016 12:54:00 +0000 Subject: [PATCH 5/5] Rename proc, move updateUsrDialog call Ensures the dialog is called after the photocopy/doccopy is removed and so the interface updates correctly --- code/modules/paperwork/photocopier.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index a893636d9cd..e924423a847 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -174,16 +174,17 @@ updateUsrDialog() else if(href_list["remove"]) if(copy) - do_removal(copy) + remove_photocopy(copy) copy = null else if(photocopy) - do_removal(photocopy) + remove_photocopy(photocopy) photocopy = null else if(doccopy) - do_removal(doccopy) + remove_photocopy(doccopy) doccopy = null else if(check_ass()) ass << "You feel a slight pressure on your ass." + updateUsrDialog() else if(href_list["min"]) if(copies > 1) copies-- @@ -236,14 +237,13 @@ flick("photocopier1", src) updateUsrDialog() -/obj/machinery/photocopier/proc/do_removal(obj/item/O, mob/user) +/obj/machinery/photocopier/proc/remove_photocopy(obj/item/O, mob/user) if(!issilicon(user)) //surprised this check didn't exist before, putting stuff in AI's hand is bad O.loc = user.loc user.put_in_hands(O) else O.loc = src.loc user << "You take [O] out of [src]." - updateUsrDialog() /obj/machinery/photocopier/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/paper))