.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

View File

@@ -379,13 +379,12 @@ var/list/cleanbot_types // Going to use this to generate a list of types once th
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/O, var/mob/user)
..()
if(istype(O, /obj/item/robot_parts/l_arm) || istype(O, /obj/item/robot_parts/r_arm))
user.drop_item()
user.drop_from_inventory(O,get_turf(src))
qdel(O)
var/turf/T = get_turf(loc)
var/mob/living/bot/cleanbot/A = new /mob/living/bot/cleanbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
user.drop_from_inventory(src)
qdel(src)
else if(istype(O, /obj/item/weapon/pen))

View File

@@ -88,7 +88,7 @@
switch(build_step)
if(0, 1)
if(istype(W, /obj/item/robot_parts/l_leg) || istype(W, /obj/item/robot_parts/r_leg))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the robot leg to [src].</span>"
@@ -103,7 +103,7 @@
if(2)
if(istype(W, /obj/item/clothing/suit/storage/vest))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the armor to [src].</span>"
@@ -122,7 +122,7 @@
return 1
if(4)
if(istype(W, /obj/item/clothing/head/helmet))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the helmet to [src].</span>"
@@ -133,7 +133,7 @@
if(5)
if(isprox(W))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the prox sensor to [src].</span>"
@@ -163,7 +163,7 @@
user << "<span class='notice'>You add [W] to [src].</span>"
item_state = "ed209_taser"
icon_state = "ed209_taser"
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
return 1
@@ -184,8 +184,7 @@
user << "<span class='notice'>You complete the ED-209.</span>"
var/turf/T = get_turf(src)
new /mob/living/bot/secbot/ed209(T,created_name,lasercolor)
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
user.drop_from_inventory(src)
qdel(src)
return 1

View File

@@ -266,7 +266,7 @@
new /obj/item/device/analyzer/plant_analyzer(Tsec)
if(tank)
tank.loc = Tsec
tank.forceMove(Tsec)
if(prob(50))
new /obj/item/robot_parts/l_arm(Tsec)
@@ -324,7 +324,6 @@
user << "You add the robot arm to [src]."
loc = A //Place the water tank into the assembly, it will be needed for the finished bot
user.drop_from_inventory(S)
qdel(S)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -333,7 +332,6 @@
build_step++
user << "You add the plant analyzer to [src]."
name = "farmbot assembly"
user.remove_from_mob(W)
qdel(W)
return 1
@@ -341,7 +339,6 @@
build_step++
user << "You add a bucket to [src]."
name = "farmbot assembly with bucket"
user.remove_from_mob(W)
qdel(W)
return 1//Prevents the object's afterattack from executing and causing runtime errors
@@ -358,7 +355,7 @@
user << "You complete the Farmbot! Beep boop."
var/mob/living/bot/farmbot/S = new /mob/living/bot/farmbot(get_turf(src))
for(var/obj/structure/reagent_dispensers/watertank/wTank in contents)
wTank.loc = S
wTank.forceMove(S)
S.tank = wTank
S.name = created_name
user.remove_from_mob(W)

View File

@@ -314,7 +314,6 @@
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
user.drop_from_inventory(src)
qdel(src)
else
user << "<span class='warning'>You need 10 floor tiles for a floorbot.</span>"
@@ -340,7 +339,6 @@
B.created_name = created_name
user.put_in_hands(B)
user << "<span class='notice'>You add the sensor to the toolbox and tiles!</span>"
user.drop_from_inventory(src)
qdel(src)
return 1
else if (istype(W, /obj/item/weapon/pen))
@@ -371,7 +369,6 @@
var/mob/living/bot/floorbot/A = new /mob/living/bot/floorbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>"
user.drop_from_inventory(src)
qdel(src)
return 1
else if(istype(W, /obj/item/weapon/pen))

View File

@@ -171,8 +171,7 @@
user << "<span class='notice'>There is already a beaker loaded.</span>"
return
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
reagent_glass = O
user << "<span class='notice'>You insert [O].</span>"
return 1
@@ -216,7 +215,7 @@
else if (href_list["eject"] && (!isnull(reagent_glass)))
if(!locked)
reagent_glass.loc = get_turf(src)
reagent_glass.forceMove(get_turf(src))
reagent_glass = null
else
usr << "<span class='notice'>You cannot eject the beaker because the panel is locked.</span>"
@@ -257,7 +256,7 @@
new /obj/item/robot_parts/l_arm(Tsec)
if(reagent_glass)
reagent_glass.loc = Tsec
reagent_glass.forceMove(Tsec)
reagent_glass = null
spark(src, 3, alldirs)
@@ -329,7 +328,6 @@
qdel(S)
user.put_in_hands(A)
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
user.drop_from_inventory(src)
qdel(src)
/obj/item/weapon/firstaid_arm_assembly
@@ -360,7 +358,7 @@
switch(build_step)
if(0)
if(istype(W, /obj/item/device/healthanalyzer))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the health sensor to [src].</span>"
@@ -370,13 +368,12 @@
if(1)
if(isprox(W))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
user << "<span class='notice'>You complete the Medibot! Beep boop.</span>"
var/turf/T = get_turf(src)
var/mob/living/bot/medbot/S = new /mob/living/bot/medbot(T)
S.skin = skin
S.name = created_name
user.drop_from_inventory(src)
qdel(src)
return 1

View File

@@ -552,28 +552,28 @@
return 1
else if(isprox(O) && (build_step == 1))
user.drop_item()
build_step = 2
user << "You add \the [O] to [src]."
add_overlay("hs_eye")
name = "helmet/signaler/prox sensor assembly"
user.drop_from_inventory(O,get_turf(src))
qdel(O)
return 1
else if((istype(O, /obj/item/robot_parts/l_arm) || istype(O, /obj/item/robot_parts/r_arm)) && build_step == 2)
user.drop_item()
build_step = 3
user << "You add \the [O] to [src]."
name = "helmet/signaler/prox sensor/robot arm assembly"
add_overlay("hs_arm")
user.drop_from_inventory(O,get_turf(src))
qdel(O)
return 1
else if(istype(O, /obj/item/weapon/melee/baton) && build_step == 3)
user.drop_item()
user << "You complete the Securitron! Beep boop."
var/mob/living/bot/secbot/S = new /mob/living/bot/secbot(get_turf(src))
S.name = created_name
user.drop_from_inventory(O,get_turf(src))
qdel(O)
qdel(src)
return 1