Replaced loc setting with forceMove. (#11490)

* Replaced loc setting with forceMove.

* Update forceMove to permit moving to null loc.

Also fixed atom locking with offsets not following properly.
This commit is contained in:
ComicIronic
2016-08-29 12:40:45 +01:00
committed by clusterfack
parent b0e22029ab
commit b35eaa65d8
348 changed files with 1019 additions and 1016 deletions

View File

@@ -158,7 +158,7 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri
temp = null
if("eject")
if(scanning)
scanning.loc = loc
scanning.forceMove(loc)
scanning = null
else
temp = "Eject Failed: No Object"
@@ -168,7 +168,7 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri
if(I && istype(I))
if(istype(I, /obj/item/weapon/evidencebag))
scanning = I.contents[1]
scanning.loc = src
scanning.forceMove(src)
I.overlays -= scanning
I.icon_state = "evidenceobj"
else
@@ -188,7 +188,7 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri
if(card.amount > 1 || !card.fingerprints.len)
to_chat(usr, "<span class='warning'>ERROR: No prints/too many cards.</span>")
if(card.loc == src)
card.loc = src.loc
card.forceMove(src.loc)
card = null
return
if(M.drop_item(I, src))
@@ -633,7 +633,7 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri
else
to_chat(usr, "<span class='warning'>ERROR: No prints/too many cards.</span>")
if(card.loc == src)
card.loc = src.loc
card.forceMove(src.loc)
card = null
return
return

View File

@@ -53,7 +53,7 @@
overlays += image(icon = icon, icon_state = "evidence") //should look nicer for transparent stuff. not really that important, but hey.
desc = "An evidence bag containing [I]. [I.desc]"
I.loc = src
I.forceMove(src)
w_class = I.w_class
return