.loc = to forceMove() (#4937)

As requested, this PR is changed to only include all .loc = to forceMove() changes.
This commit is contained in:
BurgerLUA
2018-08-03 15:48:58 -07:00
committed by Erki
parent 187613428e
commit 8519dcc393
376 changed files with 968 additions and 1261 deletions
+2 -3
View File
@@ -168,8 +168,7 @@
if(cell)
user << "The drill already has a cell installed."
else
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
cell = O
component_parts += O
user << "You install \the [O]."
@@ -323,7 +322,7 @@
var/obj/structure/ore_box/B = locate() in orange(1)
if(B)
for(var/obj/item/weapon/ore/O in contents)
O.loc = B
O.forceMove(B)
usr << "<span class='notice'>You unload the drill's storage cache into the ore box.</span>"
else
for(var/obj/item/weapon/ore/O in contents)
+2 -3
View File
@@ -95,7 +95,7 @@
if(href_list["choice"])
if(istype(inserted_id))
if(href_list["choice"] == "eject")
inserted_id.loc = loc
inserted_id.forceMove(loc)
if(!usr.get_active_hand())
usr.put_in_hands(inserted_id)
inserted_id = null
@@ -113,8 +113,7 @@
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
I.loc = src
usr.drop_from_inventory(I,src)
inserted_id = I
else usr << "<span class='warning'>No valid ID.</span>"
+2 -2
View File
@@ -31,7 +31,7 @@
var/i = 0
for (var/obj/item/weapon/ore/O in BOX.contents)
BOX.contents -= O
O.loc = output.loc
O.forceMove(output.loc)
i++
if (i>=10)
return
@@ -41,7 +41,7 @@
for (i = 0; i<10; i++)
O = locate(/obj/item, input.loc)
if (O)
O.loc = src.output.loc
O.forceMove(src.output.loc)
else
return
return
+3 -5
View File
@@ -135,7 +135,7 @@ var/global/list/minevendor_list = list( //keep in order of price
if(href_list["choice"])
if(istype(inserted_id))
if(href_list["choice"] == "eject")
inserted_id.loc = loc
inserted_id.forceMove(loc)
if(ishuman(usr))
if(!usr.get_active_hand())
usr.put_in_hands(inserted_id)
@@ -145,8 +145,7 @@ var/global/list/minevendor_list = list( //keep in order of price
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
I.loc = src
usr.drop_from_inventory(I,src)
inserted_id = I
else usr << "<span class='danger'>No valid ID.</span>"
if(href_list["purchase"])
@@ -210,8 +209,7 @@ var/global/list/minevendor_list = list( //keep in order of price
if(istype(I,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = usr.get_active_hand()
if(istype(C) && !istype(inserted_id))
usr.drop_item()
C.loc = src
usr.drop_from_inventory(C,src)
inserted_id = C
interact(user)
return
+3 -4
View File
@@ -606,8 +606,7 @@
/obj/vehicle/train/cargo/engine/mining/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/key/minecarts))
if(!key)
user.drop_item()
W.forceMove(src)
user.drop_from_inventory(W,src)
key = W
verbs += /obj/vehicle/train/cargo/engine/verb/remove_key
return
@@ -941,7 +940,7 @@ var/list/total_extraction_beacons = list()
var/list/flooring_near_beacon = list()
for(var/turf/simulated/floor/floor in orange(1, beacon))
flooring_near_beacon += floor
A.loc = pick(flooring_near_beacon)
A.forceMove(pick(flooring_near_beacon))
single_spark(A.loc)
if(uses_left <= 0)
qdel(src)
@@ -1289,7 +1288,7 @@ var/list/total_extraction_beacons = list()
icon_state = "fitnessweight-c"
user.dir = SOUTH
user.Stun(4)
user.loc = src.loc
user.forceMove(src.loc)
var/image/W = image('icons/obj/mining.dmi',"fitnessweight-w")
W.layer = 5.1
add_overlay(W)
+2 -1
View File
@@ -48,6 +48,7 @@
/obj/item/weapon/moneybag/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
//TODO: Check this code
if (istype(W, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = W
user << "<span class='notice'>You add the [C.name] into the bag.</span>"
@@ -82,7 +83,7 @@
COIN = locate(/obj/item/weapon/coin/uranium,src.contents)
if(!COIN)
return
COIN.loc = src.loc
COIN.forceMove(src.loc)
return
+2 -2
View File
@@ -92,7 +92,7 @@
for (var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = src.loc
O.forceMove(src.loc)
usr << "<span class='notice'>You empty the ore box</span>"
return
@@ -100,7 +100,7 @@
/obj/structure/ore_box/ex_act(severity)
if(severity == 1.0 || (severity < 3.0 && prob(50)))
for (var/obj/item/weapon/ore/O in contents)
O.loc = src.loc
O.forceMove(src.loc)
O.ex_act(severity++)
CHECK_TICK