From 483eb0cf2b40e69b942c09ee5f4f0a08aed7d793 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Thu, 29 Dec 2016 20:39:39 -0500 Subject: [PATCH 1/3] Fixes #6041 --- code/game/machinery/atmoalter/canister.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index a7d62d74b94..b6fba3cc5ad 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -181,6 +181,7 @@ update_flag if(src.destroyed) src.overlays = 0 src.icon_state = text("[]-1", src.canister_color["prim"])//yes, I KNOW the colours don't reflect when the can's borked, whatever. + return if(icon_state != src.canister_color["prim"]) icon_state = src.canister_color["prim"] @@ -420,9 +421,9 @@ update_flag data["hasHoldingTank"] = holding ? 1 : 0 if(holding) - data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure())) - - return data + data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure())) + + return data /obj/machinery/portable_atmospherics/canister/Topic(href, href_list) if(..()) From eba3d1096608ec229a72e5d6b3f7a98c9a4970d2 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Thu, 29 Dec 2016 20:40:57 -0500 Subject: [PATCH 2/3] 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() From 27e7dabed7b387ca751b0ad3544a0c6e53c4ed7c Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Thu, 29 Dec 2016 21:46:20 -0500 Subject: [PATCH 3/3] Pick up that paper Photocopiers and Fax Machines will now attempt to place the removed source material into the hand of the user... if they are human only. --- code/modules/paperwork/faxmachine.dm | 3 +++ code/modules/paperwork/photocopier.dm | 3 +++ 2 files changed, 6 insertions(+) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index f06856b6069..6fbd805f6b0 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -110,6 +110,9 @@ var/list/alldepartments = list() if(href_list["paper"]) if(copyitem) copyitem.forceMove(get_turf(src)) + if(ishuman(usr)) + if(!usr.get_active_hand()) + usr.put_in_hands(copyitem) to_chat(usr, "You eject \the [copyitem] from \the [src].") copyitem = null else diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index c32aa4b3979..d333ed1cf47 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -80,6 +80,9 @@ else if(href_list["remove"]) if(copyitem) copyitem.forceMove(get_turf(src)) + if(ishuman(usr)) + if(!usr.get_active_hand()) + usr.put_in_hands(copyitem) to_chat(usr, "You take \the [copyitem] out of \the [src].") copyitem = null updateUsrDialog()