Replaced location setting with forceMove()

I'm restricting this only to the machine's I'm affecting with this fix.
Refactoring the rest of the code to use it would be for a different
thing.
This commit is contained in:
Crazylemon
2015-09-29 11:09:38 -07:00
parent a1636b3b24
commit 9678fe09ec
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -218,7 +218,7 @@
beaker = item
if(user.drop_item())
item.loc = src
item.forceMove(src)
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
return
else
+2 -2
View File
@@ -299,9 +299,9 @@
/obj/machinery/sleeper/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
if(istype(G, /obj/item/weapon/reagent_containers/glass))
if(!beaker)
beaker = G
if (user.drop_item())
G.loc = src
beaker = G
G.forceMove(src)
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
src.updateUsrDialog()
return
+1 -1
View File
@@ -280,7 +280,7 @@
beaker = G
if(user.drop_item())
G.loc = src
G.forceMove(src)
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
else
user << "The [G] is stuck to you!"
+1 -1
View File
@@ -64,7 +64,7 @@
return
if(user.drop_item())
W.loc = src
W.forceMove(src)
src.beaker = W
user << "You attach \the [W] to \the [src]."
src.update_icon()
+1 -1
View File
@@ -219,7 +219,7 @@
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks))
src.beaker = B
if(user.drop_item())
B.loc = src
B.forceMove(src)
user << "You set [B] on the machine."
nanomanager.update_uis(src) // update all UIs attached to src
if(!icon_beaker)