.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
+1 -1
View File
@@ -919,7 +919,7 @@ proc/admin_notice(var/message, var/rights)
set name = "Unprison"
if (M.z == 2)
if (config.allow_admin_jump)
M.loc = pick(latejoin)
M.forceMove(pick(latejoin))
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
@@ -29,10 +29,10 @@
//don't strip organs
H.drop_from_inventory(W)
//teleport person to cell
H.loc = pick(prisonwarp)
H.forceMove(pick(prisonwarp))
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(H), slot_shoes)
else
//teleport security person
H.loc = pick(prisonsecuritywarp)
H.forceMove(pick(prisonsecuritywarp))
prisonwarped += H
+5 -5
View File
@@ -639,7 +639,7 @@
sleep(5)
if(!M) return
M.loc = prison_cell
M.forceMove(prison_cell)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/prisoner = M
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
@@ -668,7 +668,7 @@
M.Paralyse(5)
sleep(5)
M.loc = pick(tdome1)
M.forceMove(pick(tdome1))
spawn(50)
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)",admin_key=key_name(usr),ckey=key_name(M))
@@ -693,7 +693,7 @@
M.Paralyse(5)
sleep(5)
M.loc = pick(tdome2)
M.forceMove(pick(tdome2))
spawn(50)
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)",admin_key=key_name(usr),ckey=key_name(M))
@@ -715,7 +715,7 @@
M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeadmin)
M.forceMove(pick(tdomeadmin))
spawn(50)
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)",admin_key=key_name(usr),ckey=key_name(M))
@@ -744,7 +744,7 @@
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(observer), slot_shoes)
M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeobserve)
M.forceMove(pick(tdomeobserve))
spawn(50)
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)",admin_key=key_name(usr),ckey=key_name(M))
+7 -7
View File
@@ -13,7 +13,7 @@
if(config.allow_admin_jump)
usr.on_mob_jump()
usr.loc = pick(get_area_turfs(A))
usr.forceMove(pick(get_area_turfs(A)))
log_admin("[key_name(usr)] jumped to [A]", admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
@@ -30,7 +30,7 @@
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
usr.on_mob_jump()
usr.loc = T
usr.forceMove(T)
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
@@ -52,7 +52,7 @@
if(isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.on_mob_jump()
A.loc = T
A.forceMove(T)
else
A << "This mob is not located in the game world."
else
@@ -97,7 +97,7 @@
log_admin("[key_name(usr)] jumped to [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
usr.on_mob_jump()
usr.loc = M.loc
usr.forceMove(M.loc)
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
@@ -112,7 +112,7 @@
log_admin("[key_name(usr)] teleported [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.on_mob_jump()
M.loc = get_turf(usr)
M.forceMove(get_turf(usr))
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
@@ -140,7 +140,7 @@
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
if(M)
M.on_mob_jump()
M.loc = get_turf(usr)
M.forceMove(get_turf(usr))
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
@@ -154,7 +154,7 @@
if(A)
if(config.allow_admin_jump)
M.on_mob_jump()
M.loc = pick(get_area_turfs(A))
M.forceMove(pick(get_area_turfs(A)))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]",admin_key=key_name(usr),ckey=key_name(M))
+1 -1
View File
@@ -910,7 +910,7 @@
Phoron.air_contents.gas["phoron"] = 70
Rad.drainratio = 0
Rad.P = Phoron
Phoron.loc = Rad
Phoron.forceMove(Rad)
if(!Rad.active)
Rad.toggle_power()
+1 -1
View File
@@ -135,7 +135,7 @@
if (!group.group_processing)
dead_groups += group
var/datum/air_group/dest_group = pick(dead_groups)
usr.loc = pick(dest_group.members)
usr.forceMove(pick(dest_group.members))
feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
*/
+3 -3
View File
@@ -19,7 +19,7 @@
if(!usr.control_object) //If you're not already possessing something...
usr.name_archive = usr.real_name
usr.loc = O
usr.forceMove(O)
usr.real_name = O.name
usr.name = O.name
usr.client.eye = O
@@ -29,7 +29,7 @@
/proc/release(obj/O as obj in range(world.view))
set name = "Release Obj"
set category = "Object"
//usr.loc = get_turf(usr)
//usr.forceMove(get_turf(usr)
if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object
usr.real_name = usr.name_archive
@@ -39,7 +39,7 @@
H.name = H.get_visible_name()
// usr.regenerate_icons() //So the name is updated properly
usr.loc = O.loc // Appear where the object you were controlling is -- TLE
usr.forceMove(O.loc) // Appear where the object you were controlling is -- TLE
usr.client.eye = usr
usr.control_object = null
feedback_add_details("admin_verb","RO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -32,7 +32,7 @@
//teleport person to cell
M.Paralyse(5)
sleep(5) //so they black out before warping
M.loc = pick(prisonwarp)
M.forceMove(pick(prisonwarp))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/prisoner = M
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
+4 -3
View File
@@ -30,11 +30,11 @@
user << "<span class='notice'>You disassemble [src].</span>"
bombassembly.loc = user.loc
bombassembly.forceMove(user.loc)
bombassembly.master = null
bombassembly = null
bombtank.loc = user.loc
bombtank.forceMove(user.loc)
bombtank.master = null
bombtank = null
@@ -84,13 +84,14 @@
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
//this is really bad code, TODO: Make it better
M.drop_item() //Remove the assembly from your hands
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
R.bombassembly = S //Tell the bomb about its assembly part
S.master = R //Tell the assembly about its new owner
S.loc = R //Move the assembly out of the fucking way
S.forceMove(R) //Move the assembly out of the fucking way
R.bombtank = src //Same for tank
master = R
+4 -4
View File
@@ -40,8 +40,8 @@
user.remove_from_mob(D2)
D:holder = src
D2:holder = src
D.loc = src
D2.loc = src
D.forceMove(src)
D2.forceMove(src)
a_left = D
a_right = D2
name = "[D.name]-[D2.name] assembly"
@@ -185,10 +185,10 @@
if(!T) return 0
if(a_left)
a_left:holder = null
a_left.loc = T
a_left.forceMove(T)
if(a_right)
a_right:holder = null
a_right.loc = T
a_right.forceMove(T)
QDEL_IN(src, 0)
return
+2 -2
View File
@@ -19,8 +19,8 @@
var/turf/T = loc
if(ismob(T))
T = T.loc
part1.loc = T
part2.loc = T
part1.forceMove(T)
part2.forceMove(T)
part1.master = null
part2.master = null
part1 = null
+3 -3
View File
@@ -121,13 +121,13 @@ obj/machinery/gateway/centerstation/process()
return
if(awaygate.calibrated)
M.loc = get_step(awaygate.loc, SOUTH)
M.forceMove(get_step(awaygate.loc, SOUTH))
M.set_dir(SOUTH)
return
else
var/obj/effect/landmark/dest = pick(awaydestinations)
if(dest)
M.loc = dest.loc
M.forceMove(dest.loc)
M.set_dir(SOUTH)
use_power(5000)
return
@@ -225,7 +225,7 @@ obj/machinery/gateway/centerstation/process()
if(E.imp_in == M)//Checking that it's actually implanted vs just in their pocket
M << "\black The station gate has detected your exile implant and is blocking your entry."
return
M.loc = get_step(stationgate.loc, SOUTH)
M.forceMove(get_step(stationgate.loc, SOUTH))
M.set_dir(SOUTH)
+1 -2
View File
@@ -236,8 +236,7 @@
if("brute")
if(prob(30) && !issilicon(user))
visible_message("<span class='danger'>\The [W] gets caught in the gelatinous folds of \the [src]</span>")
user.drop_from_inventory(W)
W.forceMove(src.loc)
user.drop_from_inventory(W,get_turf(src))
return
damage = (W.force / brute_resist)
+1 -1
View File
@@ -204,7 +204,7 @@
var/pname = "[firstLine]"
var/info = "[dat]"
P.set_content_unsafe(pname, info)
P.loc = get_turf(src.loc)
P.forceMove(get_turf(src.loc))
return
+2 -4
View File
@@ -178,12 +178,11 @@
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
if(istype(loc, /mob/living))
var/mob/living/M = loc
M.drop_from_inventory(src)
if(material.shard_type == SHARD_SHARD) // Wearing glass armor is a bad idea.
var/obj/item/weapon/material/shard/S = material.place_shard(T)
M.embed(S)
playsound(src, "shatter", 70, 1)
playsound(src.loc, "shatter", 70, 1)
qdel(src)
/obj/item/clothing/suit/armor/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
@@ -390,8 +389,7 @@
to_chat(user, "You are unable to wear \the [src] as \the [H.gloves] are in the way.")
ring = null
return 0
H.drop_from_inventory(ring) //Remove the ring (or other under-glove item in the hand slot?) so you can put on the gloves.
ring.forceMove(src)
H.drop_from_inventory(ring,src)
if(!..())
if(ring) //Put the ring back on if the check fails.
-2
View File
@@ -179,7 +179,6 @@ BLIND // can't see anything
user << "<span class='notice'>You attach a set of medical HUDs to your glasses.</span>"
var/turf/T = get_turf(src)
new /obj/item/clothing/glasses/hud/health/prescription(T)
user.drop_from_inventory(src)
qdel(src)
if(istype(W, /obj/item/clothing/glasses/hud/security))
user.drop_item()
@@ -187,7 +186,6 @@ BLIND // can't see anything
user << "<span class='notice'>You attach a set of security HUDs to your glasses.</span>"
var/turf/T = get_turf(src)
new /obj/item/clothing/glasses/hud/security/prescription(T)
user.drop_from_inventory(src)
qdel(src)
/obj/item/clothing/glasses/regular/scanners
+2 -3
View File
@@ -35,8 +35,7 @@
if(!wired)
user << "<span class='notice'>The [src] need to be wired first.</span>"
else if(!cell)
user.drop_item()
W.loc = src
user.drop_from_inventory(W,src)
cell = W
w_class = 3.0
user << "<span class='notice'>You attach the [cell] to the [src].</span>"
@@ -51,7 +50,7 @@
if(cell)
cell.update_icon()
user << "<span class='notice'>You cut the [cell] away from the [src].</span>"
cell.loc = get_turf(src.loc)
cell.forceMove(get_turf(src.loc))
cell = null
w_class = 2.0
update_icon()
+1 -2
View File
@@ -101,8 +101,7 @@
/obj/item/clothing/shoes/orange/proc/attach_cuffs(var/obj/item/weapon/handcuffs/cuffs, mob/user as mob)
if (src.chained) return
user.drop_item()
cuffs.loc = src
user.drop_from_inventory(cuffs,src)
src.chained = cuffs
src.slowdown = 15
src.icon_state = "orange1"
+1 -2
View File
@@ -62,8 +62,7 @@
user << "You are unable to wear \the [src] as \the [H.shoes] are in the way."
shoes = null
return 0
H.drop_from_inventory(shoes) //Remove the old shoes so you can put on the magboots.
shoes.forceMove(src)
H.drop_from_inventory(shoes,src) //Remove the old shoes so you can put on the magboots.
if(!..())
if(shoes) //Put the old shoes back on if the check fails.
@@ -55,7 +55,6 @@
return 0
user << "<font color='blue'><b>You slot \the [input_device] into the suit module.</b></font>"
user.drop_from_inventory(input_device)
qdel(input_device)
accepted_item.charges++
return 1
@@ -297,7 +296,6 @@
return
for(var/obj/item/weapon/melee/energy/blade/blade in M.contents)
M.drop_from_inventory(blade)
qdel(blade)
/obj/item/rig_module/fabricator
@@ -212,8 +212,7 @@
else
return 0
else
user.drop_from_inventory(ai)
ai.forceMove(src)
user.drop_from_inventory(ai,src)
ai_card = ai
ai_mob << "<font color='blue'>You have been transferred to \the [holder]'s [src].</font>"
user << "<font color='blue'>You load [ai_mob] into \the [holder]'s [src].</font>"
+4 -11
View File
@@ -156,9 +156,6 @@
/obj/item/weapon/rig/Destroy()
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
var/mob/living/M = piece.loc
if(istype(M))
M.drop_from_inventory(piece)
qdel(piece)
STOP_PROCESSING(SSprocessing, src)
qdel(wires)
@@ -324,8 +321,9 @@
if(piece.loc != src && !(wearer && piece.loc == wearer))
if(istype(piece.loc, /mob/living))
M = piece.loc
M.drop_from_inventory(piece)
piece.forceMove(src)
M.drop_from_inventory(piece,src)
else
piece.forceMove(src)
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
if(!cell || cell.charge <= 0)
@@ -636,8 +634,7 @@
if(use_obj && check_slot == use_obj)
wearer << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
use_obj.canremove = 1
holder.drop_from_inventory(use_obj)
use_obj.forceMove(get_turf(src))
holder.drop_from_inventory(use_obj,get_turf(src)) //TODO: TEST THIS CODE!
use_obj.dropped()
use_obj.canremove = 0
use_obj.forceMove(src)
@@ -669,25 +666,21 @@
if(sealed)
if(H.head)
var/obj/item/garbage = H.head
H.drop_from_inventory(garbage)
H.head = null
qdel(garbage)
if(H.gloves)
var/obj/item/garbage = H.gloves
H.drop_from_inventory(garbage)
H.gloves = null
qdel(garbage)
if(H.shoes)
var/obj/item/garbage = H.shoes
H.drop_from_inventory(garbage)
H.shoes = null
qdel(garbage)
if(H.wear_suit)
var/obj/item/garbage = H.wear_suit
H.drop_from_inventory(garbage)
H.wear_suit = null
qdel(garbage)
+6 -12
View File
@@ -112,16 +112,14 @@
H = helmet.loc
if(istype(H))
if(helmet && H.head == helmet)
H.drop_from_inventory(helmet)
helmet.forceMove(src)
H.drop_from_inventory(helmet,src)
if(boots)
boots.canremove = 1
H = boots.loc
if(istype(H))
if(boots && H.shoes == boots)
H.drop_from_inventory(boots)
boots.forceMove(src)
H.drop_from_inventory(boots,src)
if(tank)
tank.canremove = 1
@@ -156,8 +154,7 @@
if(H.head == helmet)
H << "<span class='notice'>You retract your suit helmet.</span>"
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.forceMove(src)
H.drop_from_inventory(helmet,src)
else
if(H.head)
H << "<span class='danger'>You cannot deploy your helmet while wearing \the [H.head].</span>"
@@ -227,8 +224,7 @@
user << "\The [src] already has a helmet installed."
else
user << "You attach \the [W] to \the [src]'s helmet mount."
user.drop_item()
W.forceMove(src)
user.drop_from_inventory(W,src)
src.helmet = W
return
else if(istype(W,/obj/item/clothing/shoes/magboots))
@@ -236,8 +232,7 @@
user << "\The [src] already has magboots installed."
else
user << "You attach \the [W] to \the [src]'s boot mounts."
user.drop_item()
W.forceMove(src)
user.drop_from_inventory(W,src)
boots = W
return
else if(istype(W,/obj/item/weapon/tank))
@@ -247,8 +242,7 @@
user << "\The [W] cannot be inserted into \the [src]'s storage compartment."
else
user << "You insert \the [W] into \the [src]'s storage compartment."
user.drop_item()
W.forceMove(src)
user.drop_from_inventory(W,src)
tank = W
return
+1 -1
View File
@@ -229,7 +229,7 @@
spark(user, 5)
playsound(user.loc, "sparks", 50, 1)
user.loc = picked
user.forceMove(picked)
return PROJECTILE_FORCE_MISS
return 0
+3 -2
View File
@@ -94,8 +94,9 @@
if(!do_after(H,50))
if(H && H.wear_suit == src)
H.wear_suit = null
H.drop_from_inventory(src)
src.forceMove(get_turf(H))
H.drop_from_inventory(src,get_turf(H))
else
src.forceMove(get_turf(H))
return
wearer = user
@@ -22,8 +22,7 @@
if(istype(user))
user.stop_aiming(no_message=1)
holstered = I
user.drop_from_inventory(holstered)
holstered.loc = src
user.drop_from_inventory(holstered,src)
holstered.add_fingerprint(user)
w_class = max(w_class, holstered.w_class)
user.visible_message("<span class='notice'>[user] holsters \the [holstered].</span>", "<span class='notice'>You holster \the [holstered].</span>")
@@ -24,7 +24,7 @@
icon_state = "[base_icon]_open"
if(held)
user << "\The [held] falls out!"
held.loc = get_turf(user)
held.forceMove(get_turf(user))
src.held = null
else
icon_state = "[base_icon]"
@@ -39,8 +39,7 @@
usr << "\The [src] already has something inside it."
else
usr << "You slip [O] into [src]."
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
src.held = O
return
..()
+3 -3
View File
@@ -424,7 +424,7 @@
var/obj/item/custom_ka_upgrade/cells/tempvar = I
installed_cell = tempvar
user.remove_from_mob(installed_cell)
installed_cell.loc = src
installed_cell.forceMove(src)
update_stats()
update_icon()
playsound(src,'sound/items/Wirecutter.ogg', 50, 0)
@@ -437,7 +437,7 @@
var/obj/item/custom_ka_upgrade/barrels/tempvar = I
installed_barrel = tempvar
user.remove_from_mob(installed_barrel)
installed_barrel.loc = src
installed_barrel.forceMove(src)
update_stats()
update_icon()
playsound(src,'sound/items/Wirecutter.ogg', 50, 0)
@@ -454,7 +454,7 @@
var/obj/item/custom_ka_upgrade/upgrade_chips/tempvar = I
installed_upgrade_chip = tempvar
user.remove_from_mob(installed_upgrade_chip)
installed_upgrade_chip.loc = src
installed_upgrade_chip.forceMove(src)
update_stats()
update_icon()
playsound(src,'sound/items/Wirecutter.ogg', 50, 0)
+2 -6
View File
@@ -79,8 +79,7 @@ All custom items with worn sprites must follow the contained sprite system: http
/obj/item/clothing/glasses/fluff/nebula_glasses/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/disk/fluff/nebula_chip) && !chip)
//user.u_equip(W)
user.drop_from_inventory(W)
W.forceMove(src)
user.drop_from_inventory(W,src)
chip = W
W.add_fingerprint(user)
add_fingerprint(user)
@@ -816,9 +815,7 @@ All custom items with worn sprites must follow the contained sprite system: http
/obj/item/clothing/head/beret/engineering/fluff/ikrad_beret/attack_self(var/mob/user)
if(letter)
user << "<span class='notice'>You remove \the [letter] from inside the [src]'s flap.</span>"
user.drop_from_inventory(src)
user.put_in_hands(letter)
user.put_in_hands(src)
letter = null
else
..()
@@ -826,8 +823,7 @@ All custom items with worn sprites must follow the contained sprite system: http
/obj/item/clothing/head/beret/engineering/fluff/ikrad_beret/attackby(var/obj/item/fluff/ikrad_letter/W, var/mob/user)
if(!src.letter && istype(W))
user << "<span class='notice'>You place \the [W] back inside the [src]'s flap.</span>"
user.drop_from_inventory(W)
W.forceMove(src)
user.drop_from_inventory(W,src)
src.letter = W
else
..()
+1 -1
View File
@@ -247,5 +247,5 @@
if(M.equip_to_storage(newitem))
return newitem
newitem.loc = get_turf(M.loc)
newitem.forceMove(get_turf(M.loc))
return newitem
@@ -29,7 +29,7 @@
if(istype(swab) && swab.is_used())
user.unEquip(W)
src.bloodsamp = swab
swab.loc = src
swab.forceMove(src)
user << "<span class='notice'>You insert \the [W] into \the [src].</span>"
else
user << "<span class='warning'>\The [src] only accepts used swabs.</span>"
@@ -25,7 +25,7 @@
if(has_swab || has_sample)
user << "<span class='notice'>You remove \the sample from \the [src].</span>"
if(has_swab)
has_swab.loc = get_turf(src)
has_swab.forceMove(get_turf(src))
has_swab = null
if(has_sample)
has_sample.forceMove(get_turf(src))
@@ -65,7 +65,7 @@
add_overlay(list(MA, "evidence"))
desc = "An evidence bag containing [I]."
I.loc = src
I.forceMove(src)
stored_item = I
w_class = I.w_class
return
+4 -6
View File
@@ -60,7 +60,7 @@ log transactions
number_incorrect_tries = 0
for(var/obj/item/weapon/spacecash/S in src)
S.loc = src.loc
S.forceMove(src.loc)
if(prob(50))
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
else
@@ -95,8 +95,7 @@ log transactions
var/obj/item/weapon/card/id/idcard = I
if(!held_card)
usr.drop_item()
idcard.loc = src
usr.drop_from_inventory(idcard,src)
held_card = idcard
if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number)
authenticated_account = null
@@ -434,8 +433,7 @@ log transactions
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
usr.drop_from_inventory(I,src)
held_card = I
else
release_held_id(usr)
@@ -499,7 +497,7 @@ log transactions
if(human_user.stat || human_user.lying || human_user.restrained() || !Adjacent(human_user)) return
held_card.loc = src.loc
held_card.forceMove(src.loc)
authenticated_account = null
if(!human_user.get_active_hand())
+3 -5
View File
@@ -49,8 +49,7 @@
return ..()
if(!held_card)
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
held_card = O
SSnanoui.update_uis(src)
@@ -161,7 +160,7 @@
creating_new_account = 0
if("insert_card")
if(held_card)
held_card.loc = src.loc
held_card.forceMove(src.loc)
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(held_card)
@@ -171,8 +170,7 @@
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
usr.drop_item()
C.loc = src
usr.drop_from_inventory(C,src)
held_card = C
if("view_account_detail")
+1 -1
View File
@@ -79,7 +79,7 @@
R.add_overlay(stampoverlay)
R.stamps += "<HR><i>This paper has been stamped by the EFTPOS device.</i>"
var/obj/item/smallDelivery/D = new(R.loc)
R.loc = D
R.forceMove(D)
D.wrapped = R
D.name = "small parcel - 'EFTPOS access code'"
+4 -2
View File
@@ -23,8 +23,7 @@
var/obj/item/weapon/spacecash/bundle/bundle
if(!istype(W, /obj/item/weapon/spacecash/bundle))
var/obj/item/weapon/spacecash/cash = W
user.drop_from_inventory(cash)
bundle = new (src.loc)
bundle = new(src.loc)
bundle.worth += cash.worth
qdel(cash)
else //is bundle
@@ -33,6 +32,7 @@
bundle.update_icon()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/h_user = user
//TODO: Find out a better way to do this
h_user.drop_from_inventory(src)
h_user.drop_from_inventory(bundle)
h_user.put_in_hands(bundle)
@@ -82,6 +82,7 @@
src.update_icon()
if(!worth)
usr.drop_from_inventory(src)
if(amount in list(1000,500,200,100,50,20,1))
var/cashtype = text2path("/obj/item/weapon/spacecash/c[amount]")
var/obj/cash = new cashtype (usr.loc)
@@ -91,6 +92,7 @@
bundle.worth = amount
bundle.update_icon()
usr.put_in_hands(bundle)
if(!worth)
qdel(src)
+1 -1
View File
@@ -287,7 +287,7 @@
for (var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked in .)
paper.loc = being_cooked
paper.forceMove(being_cooked)
being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn
return
+1 -2
View File
@@ -46,8 +46,7 @@ obj/item/weapon/board/attackby(obj/item/I as obj, mob/user as mob)
if(!user.Adjacent(src))
return 0
user.drop_from_inventory(I)
I.forceMove(src)
user.drop_from_inventory(I,src)
num++
+3 -5
View File
@@ -145,7 +145,6 @@
for(var/datum/playingcard/P in cards)
H.cards += P
H.concealed = src.concealed
user.drop_from_inventory(src,user.loc)
qdel(src)
H.update_icon()
return
@@ -190,11 +189,10 @@
H.cards += cards
cards.Cut();
user.drop_item()
qdel(src)
user.drop_from_inventory(src,get_turf(src))
H.update_icon()
user.put_in_active_hand(H)
qdel(src)
/obj/item/weapon/hand
name = "hand of cards"
@@ -229,7 +227,7 @@
H.update_icon()
src.update_icon()
usr.visible_message("\The [usr] plays \the [discarding].")
H.loc = get_step(usr,usr.dir)
H.forceMove(get_step(usr,usr.dir))
if(!cards.len)
qdel(src)
+3 -3
View File
@@ -322,13 +322,13 @@
if(G.state<2)
user << "<span class='warning'>You need a better grip to do that!</span>"
return
G.affecting.loc = src.loc
G.affecting.forceMove(src.loc)
G.affecting.Weaken(5)
visible_message("<span class='warning'>[G.assailant] dunks [G.affecting] into the [src]!</span>", range = 3)
qdel(W)
return
else if (istype(W, /obj/item) && get_dist(src,user)<2)
user.drop_item(src.loc)
user.drop_from_inventory(W,get_turf(src))
visible_message("<span class='notice'>[user] dunks [W] into the [src]!</span>", range = 3)
return
@@ -338,7 +338,7 @@
if(istype(I, /obj/item/projectile))
return
if(prob(50))
I.loc = src.loc
I.forceMove(src.loc)
visible_message("<span class='notice'>Swish! \the [I] lands in \the [src].</span>", range = 3)
else
visible_message("<span class='warning'>\The [I] bounces off of \the [src]'s rim!</span>", range = 3)
@@ -64,7 +64,6 @@
++frames
user.visible_message("<span class='notice'>[user] loads \the [I] into \the [src].</span>", "<span class='notice'>You load \the [I] into \the [src].</span>")
update_icon()
user.drop_from_inventory(I)
qdel(I)
return
else if(istype(I, /obj/item/bee_pack))
@@ -270,7 +269,6 @@
if(do_after(user, 30))
user.visible_message("<span class='notice'>[user] constructs a beehive.</span>", "<span class='notice'>You construct a beehive.</span>")
new /obj/machinery/beehive(get_turf(user))
user.drop_from_inventory(src)
qdel(src)
return
-1
View File
@@ -250,7 +250,6 @@
if(prob(35))
if(user)
user << "<span class='danger'>\The [src] has fallen to bits.</span>"
user.drop_from_inventory(src)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/attack_self(mob/user as mob)
+1 -1
View File
@@ -327,7 +327,7 @@
spark(target, 3, alldirs)
var/turf/picked = get_turf(pick(turfs)) // Just in case...
new/obj/effect/decal/cleanable/molten_item(get_turf(target)) // Leave a pile of goo behind for dramatic effect...
target.loc = picked // And teleport them to the chosen location.
target.forceMove(picked) // And teleport them to the chosen location.
impact = 1
+5 -7
View File
@@ -75,7 +75,7 @@
if(eject_disk)
eject_disk = 0
if(loaded_disk)
loaded_disk.loc = get_turf(src)
loaded_disk.forceMove(get_turf(src))
visible_message("\icon[src] [src] beeps and spits out [loaded_disk].")
loaded_disk = null
@@ -88,8 +88,7 @@
if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0)
user << "That seed is not compatible with our genetics technology."
else
user.drop_from_inventory(W)
W.loc = src
user.drop_from_inventory(W,src)
seed = W
user << "You load [W] into [src]."
return
@@ -120,8 +119,7 @@
user << "That disk does not have any gene data loaded."
return
user.drop_from_inventory(W)
W.loc = src
user.drop_from_inventory(W,src)
loaded_disk = W
user << "You load [W] into [src]."
@@ -184,7 +182,7 @@
if(href_list["eject_packet"])
if(!seed) return
seed.loc = get_turf(src)
seed.forceMove(get_turf(src))
if(seed.seed.name == "new line" || isnull(SSplants.seeds[seed.seed.name]))
seed.seed.uid = SSplants.seeds.len + 1
@@ -198,7 +196,7 @@
if(href_list["eject_disk"])
if(!loaded_disk) return
loaded_disk.loc = get_turf(src)
loaded_disk.forceMove(get_turf(src))
visible_message("\icon[src] [src] beeps and spits out [loaded_disk].")
loaded_disk = null
+2 -2
View File
@@ -275,7 +275,7 @@
if (N.amount <= 0 || N.seeds.len <= 0)
piles -= N
qdel(N)
O.loc = src.loc
O.forceMove(src.loc)
else
piles -= N
qdel(N)
@@ -316,7 +316,7 @@
var/obj/item/weapon/storage/S = O.loc
S.remove_from_storage(O, src)
O.loc = src
O.forceMove(src)
var/newID = 0
for (var/datum/seed_pile/N in piles)
@@ -76,7 +76,7 @@
can_grab = 0
if(can_grab)
src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
victim.loc = src.loc
victim.forceMove(src.loc)
//entangling people
if(victim.loc == src.loc)
@@ -50,14 +50,15 @@
else
health = 10
nutrilevel += 10
user.drop_item()
user.drop_from_inventory(O,get_turf(src))
qdel(O)
user << "<span class='notice'>You carefully insert the queen into [src], she gets busy making a hive.</span>"
bees_in_hive = 0
else if(istype(O, /obj/item/beezeez))
beezeez += 100
nutrilevel += 10
user.drop_item()
user.drop_from_inventory(O,get_turf(src))
qdel(O)
if(health > 0)
user << "<span class='notice'>You insert [O] into [src]. A relaxed humming appears to pick up.</span>"
else
@@ -278,8 +278,7 @@
return FALSE
var/obj/item/weapon/cell/device/cell = I
user.drop_item(cell)
cell.forceMove(src)
user.drop_from_inventory(cell,src)
battery = cell
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You slot \the [cell] inside \the [src]'s power supply.</span>")
@@ -262,7 +262,7 @@ a creative player the means to solve many problems. Circuits are held inside an
if(!circuit)
return
circuit.loc = null
circuit.loc = assy
circuit.forceMove(assy)
. = 1
update_to_assembly = 1
@@ -41,8 +41,7 @@
to_chat(user, "<span class='warning'>\The [src] is too full to add [O].</span>")
return FALSE
items_contained += O
user.drop_item(O)
O.forceMove(src)
user.drop_from_inventory(O,src)
to_chat(user, "<span class='notice'>You add [O] to \the [src].</span>")
set_pin_data(IC_OUTPUT, 1, TRUE)
return TRUE
@@ -34,10 +34,9 @@
if(installed_gun)
user << "<span class='warning'>There's already a weapon installed.</span>"
return
user.drop_from_inventory(gun)
user.drop_from_inventory(gun,src)
installed_gun = gun
size += gun.w_class
gun.forceMove(src)
user << "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>"
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
else
+8 -10
View File
@@ -23,13 +23,12 @@
. = ..()
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/book))
I.loc = src
I.forceMove(src)
update_icon()
/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/book))
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
update_icon()
else if(istype(O, /obj/item/weapon/pen))
var/newname = sanitizeSafe(input("What would you like to title this bookshelf?"), MAX_NAME_LEN)
@@ -48,7 +47,7 @@
user << "<span class='notice'>You dismantle \the [src].</span>"
new /obj/item/stack/material/wood(get_turf(src), 3)
for(var/obj/item/weapon/book/b in contents)
b.loc = (get_turf(src))
b.forceMove((get_turf(src)))
qdel(src)
else
@@ -64,7 +63,7 @@
if(!user.get_active_hand())
user.put_in_hands(choice)
else
choice.loc = get_turf(src)
choice.forceMove(get_turf(src))
update_icon()
/obj/structure/bookcase/ex_act(severity)
@@ -76,14 +75,14 @@
return
if(2.0)
for(var/obj/item/weapon/book/b in contents)
if (prob(50)) b.loc = (get_turf(src))
if (prob(50)) b.forceMove(get_turf(src))
else qdel(b)
qdel(src)
return
if(3.0)
if (prob(50))
for(var/obj/item/weapon/book/b in contents)
b.loc = (get_turf(src))
b.forceMove(get_turf(src))
qdel(src)
return
else
@@ -207,7 +206,7 @@
if(carved)
if(store)
user << "<span class='notice'>[store] falls out of [title]!</span>"
store.loc = get_turf(src.loc)
store.forceMove(get_turf(src.loc))
store = null
return
else
@@ -224,8 +223,7 @@
if(carved)
if(!store)
if(W.w_class < 3)
user.drop_item()
W.loc = src
user.drop_from_inventory(W,src)
store = W
user << "<span class='notice'>You put [W] in [title].</span>"
return
+3 -5
View File
@@ -410,8 +410,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
/obj/machinery/libraryscanner/attackby(var/obj/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/book))
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob)
usr.set_machine(src)
@@ -442,7 +441,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
cache = null
if(href_list["eject"])
for(var/obj/item/weapon/book/B in contents)
B.loc = src.loc
B.forceMove(src.loc)
src.add_fingerprint(usr)
src.updateUsrDialog()
return
@@ -460,8 +459,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
/obj/machinery/bookbinder/attackby(var/obj/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/paper))
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
src.visible_message("[src] begins to hum as it warms up its printing drums.")
sleep(rand(200,400))
+1 -1
View File
@@ -120,7 +120,7 @@
var/datum/martial_art/plasma_fist/F = new/datum/martial_art/plasma_fist(null)
F.teach(H)
to_chat(H, "<span class='boldannounce'>You have learned the ancient martial art of Plasma Fist.</span>")
user.drop_item()
visible_message("<span class='warning'>[src] lights up in fire and quickly burns to ash.</span>")
new /obj/effect/decal/cleanable/ash(get_turf(src))
user.drop_from_inventory(src,get_turf(src))
qdel(src)
+1 -1
View File
@@ -139,7 +139,7 @@
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
theSleepingCarp.teach(user)
user.drop_item()
visible_message("<span class='warning'>[src] lights up in fire and quickly burns to ash.</span>")
new /obj/effect/decal/cleanable/ash(get_turf(src))
user.drop_from_inventory(src,get_turf(src))
qdel(src)
+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
@@ -134,7 +134,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
var/obj/O = locate("landmark*Observer-Start")
if(istype(O))
src << "<span class='notice'>Now teleporting.</span>"
observer.loc = O.loc
observer.forceMove(O.loc)
else
src << "<span class='danger'>Could not locate an observer spawn point. Use the Teleport verb to jump to the station map.</span>"
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
@@ -316,7 +316,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
empty_playable_ai_cores -= C
character.loc = C.loc
character.forceMove(C.loc)
AnnounceCyborg(character, rank, "has been downloaded to the empty core in \the [character.loc.loc]")
SSticker.mode.handle_latejoin(character)
@@ -331,7 +331,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
character.lastarea = get_area(loc)
// Moving wheelchair if they have one
if(character.buckled && istype(character.buckled, /obj/structure/bed/chair/wheelchair))
character.buckled.loc = character.loc
character.buckled.forceMove(character.loc)
character.buckled.set_dir(character.dir)
SSticker.mode.handle_latejoin(character)
-7
View File
@@ -102,19 +102,12 @@ var/list/holder_mob_icon_cache = list()
M.Released()
contained = null
var/mob/L = get_holding_mob()
if (L)
L.drop_from_inventory(src)
qdel(src)
//Similar to above function, but will not deposit things in any container, only directly on a turf.
//Can be called safely anywhere. Notably on holders held or worn on a mob
/obj/item/weapon/holder/proc/release_to_floor()
var/turf/T = get_turf(src)
var/mob/L = get_holding_mob()
if (L)
L.drop_from_inventory(src)
for(var/mob/M in contents)
M.forceMove(T) //if the holder was placed into a disposal, this should place the animal in the disposal
+13 -15
View File
@@ -142,32 +142,30 @@ var/list/slot_equipment_priority = list( \
// Removes an item from inventory and places it in the target atom.
// If canremove or other conditions need to be checked then use unEquip instead.
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W)
if(!Target)
Target = loc
if(!target)
target = loc
remove_from_mob(W)
if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs)
W.forceMove(Target)
if(!(W && W.loc))
return 1
W.forceMove(target)
update_icons()
return 1
return 0
//Drops the item in our left hand
/mob/proc/drop_l_hand(var/atom/Target)
return drop_from_inventory(l_hand, Target)
/mob/proc/drop_l_hand(var/atom/target)
return drop_from_inventory(l_hand, target)
//Drops the item in our right hand
/mob/proc/drop_r_hand(var/atom/Target)
return drop_from_inventory(r_hand, Target)
/mob/proc/drop_r_hand(var/atom/target)
return drop_from_inventory(r_hand, target)
//Drops the item in our active hand. TODO: rename this to drop_active_hand or something
/mob/proc/drop_item(var/atom/Target)
if(hand) return drop_l_hand(Target)
else return drop_r_hand(Target)
/mob/proc/drop_item(var/atom/target)
if(hand) return drop_l_hand(target)
else return drop_r_hand(target)
/*
Removes the object from any slots the mob might have, calling the appropriate icon update proc.
+1 -2
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))
+6 -7
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
+2 -5
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)
-3
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))
+5 -8
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
+3 -3
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
@@ -19,7 +19,7 @@
get_scooped(H)
return
else if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
hat.loc = get_turf(src)
hat.forceMove(get_turf(src))
H.put_in_hands(hat)
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
hat = null
@@ -127,7 +127,7 @@
return
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
W.forceMove(get_turf(src))
return 1
@@ -137,7 +137,7 @@
src << "<span class='notice'>You feel your being twine with that of \the [D] as it merges with your biomass.</span>"
for(var/obj/O in D.contents)
D.drop_from_inventory(O)
D.loc = src
D.forceMove(src)
D.stat = CONSCIOUS
status_flags |= PASSEMOTES
@@ -175,7 +175,7 @@
gestalt.nutrition -= NYMPH_ABSORB_NUTRITION//Preventing an exploit with repeatedly absorbing and splitting
split_languages(gestalt)
src.loc = get_turf(src)
src.forceMove(get_turf(src))
stat = CONSCIOUS
gestalt = null
update_verbs()
@@ -12,7 +12,7 @@
if(istype(loc,/obj/item/weapon/holder/diona))
var/obj/item/weapon/holder/diona/L = loc
src.loc = L.loc
src.forceMove(L.loc)
qdel(L)
return "Diona"
@@ -76,7 +76,6 @@
//Although we are still host, these nymphs become neighbors, not contents
for(var/mob/living/carbon/alien/diona/D in contents)
D.forceMove(adult)
D.loc = adult
D.gestalt = adult
D.stat = CONSCIOUS
@@ -84,7 +83,6 @@
//Our mind is already in the gestalt, this is really just transferring our empty body
src.nutrition = 0
src.forceMove(adult)
src.loc = adult
src.stat = CONSCIOUS
src.gestalt = adult
@@ -52,7 +52,7 @@
var/obj/item/organ/external/E = pick(H.organs)
src << "<span class='danger'>You burrow deeply into \the [H]'s [E.name]!</span>"
var/obj/item/weapon/holder/holder = new (loc)
src.loc = holder
src.forceMove(holder)
holder.name = src.name
E.embed(holder,0,"\The [src] burrows deeply into \the [H]'s [E.name]!")
@@ -102,9 +102,9 @@
affected = organ
break
affected.implants -= holder
holder.loc = get_turf(holder)
holder.forceMove(get_turf(holder))
else
src.loc = get_turf(src)
src.forceMove(get_turf(src))
if(affected)
src << "<span class='danger'>You crawl out of \the [H]'s [affected.name] and plop to the ground.</span>"
else
+5 -5
View File
@@ -51,15 +51,15 @@
brainmob = B.brainmob
B.brainmob = null
brainmob.loc = src
brainmob.forceMove(src)
brainmob.container = src
brainmob.stat = 0
dead_mob_list -= brainmob//Update dem lists
living_mob_list += brainmob
user.drop_item()
brainobj = B
brainobj.loc = src
user.drop_from_inventory(brainobj,src)
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
@@ -92,13 +92,13 @@
user << "<span class='notice'>You upend the MMI, spilling the brain onto the floor.</span>"
var/obj/item/organ/brain/brain
if (brainobj) //Pull brain organ out of MMI.
brainobj.loc = user.loc
brainobj.forceMove(user.loc)
brain = brainobj
brainobj = null
else //Or make a new one if empty.
brain = new(user.loc)
brainmob.container = null//Reset brainmob mmi var.
brainmob.loc = brain//Throw mob into brain.
brainmob.forceMove(brain)//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
brain.brainmob = brainmob//Set the brain to use the brainmob
brainmob = null//Set mmi brainmob var to null
+2 -2
View File
@@ -68,7 +68,7 @@
if(prob(src.getBruteLoss() - 50))
for(var/atom/movable/A in stomach_contents)
A.loc = loc
A.forceMove(loc)
LAZYREMOVE(stomach_contents, A)
src.gib()
@@ -76,7 +76,7 @@
for(var/mob/M in src)
if(M in src.stomach_contents)
LAZYREMOVE(src.stomach_contents, M)
M.loc = src.loc
M.forceMove(src.loc)
for(var/mob/N in viewers(src, null))
if(N.client)
N.show_message(text("<span class='danger'>[M] bursts out of [src]!</span>"), 2)
@@ -1524,7 +1524,7 @@
"<span class='danger'>You pop [S]'s [current_limb.joint] back in!</span>")
current_limb.undislocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W in organs)
return
..()
@@ -41,7 +41,7 @@ emp_act
var/obj/item/weapon/SP = new P.shrapnel_type()
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
SP.loc = organ
SP.forceMove(organ)
organ.embed(SP)
return (..(P , def_zone))
@@ -400,7 +400,7 @@ emp_act
var/turf/T = near_wall(dir,2)
if(T)
src.loc = T
src.forceMove(T)
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
src.anchored = 1
src.pinned += O
@@ -408,7 +408,6 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/put_in_l_hand(var/obj/item/W)
if(!..() || l_hand)
return 0
W.forceMove(src)
l_hand = W
W.equipped(src,slot_l_hand)
@@ -419,7 +418,6 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/put_in_r_hand(var/obj/item/W)
if(!..() || r_hand)
return 0
W.forceMove(src)
r_hand = W
W.equipped(src,slot_r_hand)
+1 -1
View File
@@ -736,7 +736,7 @@ default behaviour is:
layer = UNDERDOOR
underdoor = 1
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W in internal_organs)
return
..()
+2 -2
View File
@@ -214,13 +214,13 @@
var/turf/T = near_wall(dir,2)
if(T)
src.loc = T
src.forceMove(T)
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
src.anchored = 1
src.pinned += O
/mob/living/proc/embed(var/obj/O, var/def_zone=null)
O.loc = src
O.forceMove(src)
src.embedded += O
src.verbs += /mob/proc/yank_out_object
+3 -2
View File
@@ -35,7 +35,7 @@ var/controlling
return 0
src.host = host
src.loc = host
src.forceMove(host)
host.parasites.Add(src)
if(client) client.eye = host
@@ -96,7 +96,8 @@ var/controlling
/mob/living/parasite/meme/death()
// make sure the mob is on the actual map before gibbing
if(host) src.loc = host.loc
if(host)
src.forceMove(host.loc)
src.stat = 2
..()
qdel(src)
+1 -1
View File
@@ -2,7 +2,7 @@
if(card)
card.removePersonality()
if(gibbed)
src.loc = get_turf(card)
src.forceMove(get_turf(card))
qdel(card)
else
close_up()
+5 -6
View File
@@ -462,15 +462,14 @@
if(istype(H))
var/mob/living/M = H.loc
if(istype(M))
M.drop_from_inventory(H)
H.loc = get_turf(src)
src.loc = get_turf(H)
M.drop_from_inventory(H,get_turf(src))
else
H.forceMove(get_turf(src))
src.forceMove(get_turf(H))
// Move us into the card and move the card to the ground.
src.loc = card
card.loc = get_turf(card)
src.forceMove(card)
card.forceMove(card.loc)
card.forceMove(get_turf(card))
canmove = 1
resting = 0
icon_state = "[chassis]"
@@ -99,7 +99,7 @@
..()
tank = new/obj/item/weapon/tank/jetpack/carbondioxide/synthetic
owner.internals = tank
tank.loc = owner
tank.forceMove(owner)
owner.jetpack = tank
/datum/robot_component/jetpack/uninstall()
@@ -89,7 +89,7 @@
/mob/living/silicon/robot/drone/Destroy()
if(hat)
hat.loc = get_turf(src)
hat.forceMove(get_turf(src))
return ..()
/mob/living/silicon/robot/drone/construction
@@ -26,7 +26,7 @@
get_scooped(H)
return
else if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
hat.loc = get_turf(src)
hat.forceMove(get_turf(src))
H.put_in_hands(hat)
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
hat = null
@@ -63,7 +63,7 @@
if(istype(I,typepath))
if (feedback)
user << "You collect \the [I]."
I.loc = src
I.forceMove(src)
wrapped = I
update_icon()
return 1
@@ -270,20 +270,20 @@
//If our active module is a gripper, drop the thing in it.
//Otherwise do nothing. We don't drop our modules
/mob/living/silicon/robot/drop_item(var/atom/Target)
/mob/living/silicon/robot/drop_item(var/atom/target)
if (istype(module_active, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = module_active
G.drop(Target)
G.drop(target)
/mob/living/silicon/robot/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/living/silicon/robot/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W)
if(!Target)
Target = loc
if(!target)
target = loc
if (istype(W.loc, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = W.loc
G.drop(Target)
G.drop(target)
return 1
return 0
@@ -243,7 +243,8 @@
/mob/living/silicon/robot/Destroy()
if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
if(T) mmi.loc = T
if(T)
mmi.forceMove(T)
if(mmi.brainmob)
mind.transfer_to(mmi.brainmob)
else
@@ -665,7 +666,7 @@
I.brute = C.brute_damage
I.burn = C.electronics_damage
I.loc = src.loc
I.forceMove(src.loc)
if(C.installed == 1)
C.uninstall()
@@ -687,9 +688,9 @@
storage = null
else
user << "You install \the [W]"
user.drop_item()
storage = W
W.forceMove(src)
user.drop_from_inventory(W,src)
recalculate_synth_capacities()
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
@@ -701,8 +702,7 @@
else if(W.w_class != 3)
user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here."
else
user.drop_item()
W.loc = src
user.drop_from_inventory(W,src)
cell = W
user << "You insert the power cell."
@@ -762,8 +762,7 @@
else
if(U.action(src))
usr << "You apply the upgrade to [src]!"
usr.drop_item()
U.loc = src
user.drop_from_inventory(U,src)
else
usr << "Upgrade error!"
@@ -69,7 +69,7 @@
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1)
if(response == "Eject")
if(loaded_item)
loaded_item.loc = get_turf(src)
loaded_item.forceMove(get_turf(src))
desc = initial(desc)
icon_state = initial(icon_state)
loaded_item = null
@@ -161,7 +161,7 @@
if(host.mind)
borers.remove_antagonist(host.mind)
src.loc = get_turf(host)
src.forceMove(get_turf(host))
reset_view(null)
machine = null
@@ -109,7 +109,7 @@
src.host = M
src.host.status_flags |= PASSEMOTES
src.loc = M
src.forceMove(M)
//Update their traitor status.
if(host.mind)
@@ -132,7 +132,7 @@
qdel(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = src //put shade in stone
S.forceMove(src) //put shade in stone
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
@@ -168,7 +168,7 @@
U << "<span class='danger'>Capture failed!</span>: The soul stone has already been imprinted with [src.imprinted]'s mind!"
return
T.loc = src //put shade in stone
T.forceMove(src) //put shade in stone
T.status_flags |= GODMODE
T.canmove = 0
T.health = T.maxHealth
@@ -262,7 +262,7 @@
span("notice", "\The [user] feeds \the [O] to \the [name]! It clucks happily."),
span("notice", "You feed \the [O] to \the [name]! It clucks happily."),
"You hear a cluck.")
user.drop_item()
user.drop_from_inventory(O,get_turf(src))
qdel(O)
eggsleft += rand(1, 4)
else
@@ -84,11 +84,10 @@
positronic = 1
add_language("Robot Talk")
user.drop_item()
src.mmi = O
src.transfer_personality(O)
O.loc = src
user.drop_from_inventory(O,src)
src.update_icon()
return 1
@@ -123,7 +122,7 @@
user << "<span class='notice'>You swipe your access card and pop the brain out of \the [src].</span>"
eject_brain()
if(held_item)
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
return 1
else
@@ -172,7 +171,7 @@
if(mmi)
var/turf/T = get_turf(loc)
if(T)
mmi.loc = T
mmi.forceMove(T)
if(mind) mind.transfer_to(mmi.brainmob)
mmi = null
real_name = initial(real_name)
@@ -203,7 +202,7 @@
camera.status = 0
if (held_item)
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
eject_brain()
@@ -229,7 +228,7 @@
"<span class='danger'>You launch \the [held_item]!</span>", \
"You hear a skittering noise and a thump!")
var/obj/item/weapon/grenade/G = held_item
G.loc = src.loc
G.forceMove(src.loc)
G.prime()
held_item = null
return 1
@@ -238,7 +237,7 @@
"<span class='notice'>You drop \the [held_item].</span>", \
"You hear a skittering noise and a soft thump.")
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
return 1
@@ -267,7 +266,7 @@
for(var/obj/item/I in view(1, src))
if(selection == I)
held_item = selection
selection.loc = src
selection.forceMove(src)
visible_message("<span class='notice'>\The [src] scoops up \the [held_item].</span>", \
"<span class='notice'>You grab \the [held_item].</span>", \
"You hear a skittering noise and a clink.")
@@ -65,7 +65,7 @@
/mob/living/simple_animal/hostile/mimic/crate/Initialize()
. = ..()
for(var/obj/item/I in loc)
I.loc = src
I.forceMove(src)
/mob/living/simple_animal/hostile/mimic/crate/DestroySurroundings()
..()
@@ -111,7 +111,7 @@
var/obj/structure/closet/crate/C = new(get_turf(src))
// Put loot in crate
for(var/obj/O in src)
O.loc = C
O.forceMove(C)
..()
/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget()
@@ -143,7 +143,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
/mob/living/simple_animal/hostile/mimic/copy/death()
for(var/atom/movable/M in src)
M.loc = get_turf(src)
M.forceMove(get_turf(src))
..()
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()

Some files were not shown because too many files have changed in this diff Show More