From eba3d1096608ec229a72e5d6b3f7a98c9a4970d2 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Thu, 29 Dec 2016 20:40:57 -0500 Subject: [PATCH] Fixes #6029 Also applies to photocopiers (which fax machines are a subtype of), and replaces a bunch of thing.loc = src.loc and thing.loc = src with proper forceMove calls --- code/modules/paperwork/faxmachine.dm | 15 +++++++-------- code/modules/paperwork/photocopier.dm | 17 ++++++++--------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 27a671590db..f06856b6069 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -109,16 +109,15 @@ var/list/alldepartments = list() if(href_list["paper"]) if(copyitem) - copyitem.loc = usr.loc - usr.put_in_hands(copyitem) - to_chat(usr, "You take \the [copyitem] out of \the [src].") + copyitem.forceMove(get_turf(src)) + to_chat(usr, "You eject \the [copyitem] from \the [src].") copyitem = null else var/obj/item/I = usr.get_active_hand() if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/photo) || istype(I, /obj/item/weapon/paper_bundle)) usr.drop_item() copyitem = I - I.loc = src + I.forceMove(src) to_chat(usr, "You insert \the [I] into \the [src].") flick(insert_anim, src) @@ -163,24 +162,24 @@ var/list/alldepartments = list() /obj/machinery/photocopier/faxmachine/proc/scan(var/obj/item/weapon/card/id/card = null) if(scan) // Card is in machine if(ishuman(usr)) - scan.loc = usr.loc + scan.forceMove(get_turf(usr)) if(!usr.get_active_hand()) usr.put_in_hands(scan) scan = null else - scan.loc = src.loc + scan.forceMove(get_turf(src)) scan = null else if(!card) var/obj/item/I = usr.get_active_hand() if(istype(I, /obj/item/weapon/card/id)) usr.drop_item() - I.loc = src + I.forceMove(src) scan = I else if(istype(card)) usr.drop_item() - card.loc = src + card.forceMove(src) scan = card nanomanager.update_uis(src) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 104de41520e..c32aa4b3979 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -79,8 +79,7 @@ updateUsrDialog() else if(href_list["remove"]) if(copyitem) - copyitem.loc = usr.loc - usr.put_in_hands(copyitem) + copyitem.forceMove(get_turf(src)) to_chat(usr, "You take \the [copyitem] out of \the [src].") copyitem = null updateUsrDialog() @@ -125,7 +124,7 @@ if(!copyitem) user.drop_item() copyitem = O - O.loc = src + O.forceMove(src) to_chat(user, "You insert \the [O] into \the [src].") flick(insert_anim, src) updateUsrDialog() @@ -150,10 +149,10 @@ if(ismob(G.affecting) && G.affecting != ass) var/mob/GM = G.affecting visible_message("[usr] drags [GM.name] onto the photocopier!") - GM.loc = get_turf(src) + GM.forceMove(get_turf(src)) ass = GM if(copyitem) - copyitem.loc = src.loc + copyitem.forceMove(get_turf(src)) copyitem = null updateUsrDialog() return @@ -290,10 +289,10 @@ W = copy(W) else if(istype(W, /obj/item/weapon/photo)) W = photocopy(W) - W.loc = p + W.forceMove(p) p.amount++ p.amount-- - p.loc = src.loc + p.forceMove(get_turf(src)) p.update_icon() p.icon_state = "paper_words" p.name = bundle.name @@ -313,10 +312,10 @@ if(target.anchored) return if(!ishuman(user)) return visible_message("[usr] drags [target.name] onto the photocopier!") - target.loc = get_turf(src) + target.forceMove(get_turf(src)) ass = target if(copyitem) - copyitem.loc = src.loc + copyitem.forceMove(get_turf(src)) visible_message("[copyitem] is shoved out of the way by [ass]!") copyitem = null updateUsrDialog()