diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index 5ca74b8eee6..f124e2779bf 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -14,7 +14,7 @@
// Otherwise jump
else if(A.loc)
- loc = get_turf(A)
+ forceMove(get_turf(A))
update_parallax_contents()
/mob/dead/observer/ClickOn(var/atom/A, var/params)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 18d5ca0f9d3..19acb34d29e 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -200,7 +200,7 @@
loc.handle_atom_del(src)
for(var/atom/movable/AM in contents)
qdel(AM)
- loc = null
+ moveToNullspace()
invisibility = INVISIBILITY_ABSTRACT
if(pulledby)
pulledby.stop_pulling()
@@ -268,31 +268,14 @@
//If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
else
. = TRUE
- var/atom/oldloc = loc
- var/area/old_area = get_area(oldloc)
- oldloc.Exited(src, null)
- if(old_area)
- old_area.Exited(src, null)
+ if (loc)
+ var/atom/oldloc = loc
+ var/area/old_area = get_area(oldloc)
+ oldloc.Exited(src, null)
+ if(old_area)
+ old_area.Exited(src, null)
loc = null
-/mob/living/forceMove(atom/destination)
- stop_pulling()
- if(buckled)
- buckled.unbuckle_mob(src, force = TRUE)
- if(has_buckled_mobs())
- unbuckle_all_mobs(force = TRUE)
- . = ..()
- if(.)
- if(client)
- reset_perspective(destination)
- update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
-
-/mob/living/brain/forceMove(atom/destination)
- if(container)
- return container.forceMove(destination)
- else //something went very wrong.
- CRASH("Brainmob without container.")
-
//Called whenever an object moves and by mobs when they attempt to move themselves through space
//And when an object or action applies a force on src, see newtonian_move() below
//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm
index 3f042304bf4..70aecaba5e5 100644
--- a/code/game/gamemodes/miniantags/abduction/gland.dm
+++ b/code/game/gamemodes/miniantags/abduction/gland.dm
@@ -225,7 +225,7 @@
STOP_PROCESSING(SSobj, src)
for(var/mob/M in contents)
src.visible_message("[src] hatches!")
- M.loc = src.loc
+ M.forceMove(drop_location())
qdel(src)
diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm
index 48eafce3c58..937742930c9 100644
--- a/code/game/machinery/Beacon.dm
+++ b/code/game/machinery/Beacon.dm
@@ -14,9 +14,8 @@
/obj/machinery/bluespace_beacon/Initialize()
. = ..()
var/turf/T = loc
- Beacon = new /obj/item/device/radio/beacon
+ Beacon = new(T)
Beacon.invisibility = INVISIBILITY_MAXIMUM
- Beacon.loc = T
hide(T.intact)
@@ -42,13 +41,9 @@
/obj/machinery/bluespace_beacon/process()
if(!Beacon)
var/turf/T = loc
- Beacon = new /obj/item/device/radio/beacon
+ Beacon = new(T)
Beacon.invisibility = INVISIBILITY_MAXIMUM
- Beacon.forceMove(T)
- if(Beacon)
- if(Beacon.loc != loc)
- Beacon.forceMove(loc)
+ else if (Beacon.loc != loc)
+ Beacon.forceMove(loc)
updateicon()
-
-
diff --git a/code/game/machinery/computer/_computer.dm b/code/game/machinery/computer/_computer.dm
index cab6c985368..44c39d80969 100644
--- a/code/game/machinery/computer/_computer.dm
+++ b/code/game/machinery/computer/_computer.dm
@@ -22,7 +22,7 @@
if(!QDELETED(C))
qdel(circuit)
circuit = C
- C.loc = null
+ C.moveToNullspace()
/obj/machinery/computer/Destroy()
QDEL_NULL(circuit)
diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm
index c8850975f1e..44d6d5abe41 100644
--- a/code/game/machinery/computer/camera_advanced.dm
+++ b/code/game/machinery/computer/camera_advanced.dm
@@ -154,7 +154,10 @@
if(!isturf(eye_user.loc))
return
T = get_turf(T)
- loc = T
+ if (T)
+ forceMove(T)
+ else
+ moveToNullspace()
if(use_static)
GLOB.cameranet.visibility(src)
if(visible_icon)
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index 5b2ae1842d6..2f446948da6 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -47,8 +47,7 @@
screen = 2
spark_system.set_up(5, 0, src)
src.spark_system.start()
- var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey
- MK.loc = src.loc
+ var/obj/item/paper/monitorkey/MK = new(loc)
// Will help make emagging the console not so easy to get away with.
MK.info += "
�%@%(*$%&(�&?*(%&�/{}"
var/time = 100 * length(src.linkedServer.decryptkey)
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index d2005d0a55d..50689558492 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -100,7 +100,7 @@
else if(inserted_id)
switch(href_list["id"])
if("eject")
- inserted_id.loc = get_turf(src)
+ inserted_id.forceMove(drop_location())
inserted_id.verb_pickup()
inserted_id = null
if("reset")
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 41c0fabcae6..ae4af4072d7 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -237,7 +237,7 @@
user.visible_message("[user] removes the fire alarm assembly from the wall.", \
"You remove the fire alarm assembly from the wall.")
var/obj/item/wallframe/firealarm/frame = new /obj/item/wallframe/firealarm()
- frame.loc = user.loc
+ frame.forceMove(user.drop_location())
playsound(src.loc, W.usesound, 50, 1)
qdel(src)
return
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index fa4a31cfc36..5a863e85da2 100755
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -79,7 +79,7 @@
add_fingerprint(user)
if(charging)
charging.update_icon()
- charging.loc = loc
+ charging.forceMove(drop_location())
user.put_in_hands(charging)
charging = null
use_power = IDLE_POWER_USE
@@ -91,7 +91,7 @@
/obj/machinery/recharger/attack_tk(mob/user)
if(charging)
charging.update_icon()
- charging.loc = loc
+ charging.forceMove(drop_location())
charging = null
use_power = IDLE_POWER_USE
update_icon()
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index d5ad847afd5..e50da70c5d7 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -748,7 +748,7 @@
icon_state = initial(icon_state)
occupant = pilot_mob
pilot_mob.mecha = src
- pilot_mob.loc = src
+ pilot_mob.forceMove(src)
GrantActions(pilot_mob)//needed for checks, and incase a badmin puts somebody in the mob
/obj/mecha/proc/aimob_exit_mech(mob/living/simple_animal/hostile/syndicate/mecha_pilot/pilot_mob)
@@ -959,7 +959,7 @@
if(istype(mob_container, /obj/item/device/mmi))
var/obj/item/device/mmi/mmi = mob_container
if(mmi.brainmob)
- L.loc = mmi
+ L.forceMove(mmi)
L.reset_perspective()
mmi.mecha = null
mmi.update_icon()
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index c8de01badce..272d3530a64 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -524,7 +524,7 @@
else
user.visible_message("[user] removes the advanced scanner module from the [holder].", "You remove the scanner module from the [holder].")
var/obj/item/I = locate(/obj/item/stock_parts/scanning_module) in holder
- I.loc = get_turf(holder)
+ I.forceMove(get_turf(holder))
holder.icon_state = "gygax10"
if(11)
if(diff==FORWARD)
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index 0da64c3e4d7..56882140447 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -34,7 +34,7 @@
for(var/i=1, i <= hides, i++)
new /obj/item/stack/sheet/animalhide/goliath_hide(loc) //If a goliath-plated ripley gets killed, all the plates drop
for(var/atom/movable/A in cargo)
- A.forceMove(loc)
+ A.forceMove(drop_location())
step_rand(A)
cargo.Cut()
return ..()
@@ -130,7 +130,7 @@
var/obj/O = locate(href_list["drop_from_cargo"])
if(O && O in src.cargo)
src.occupant_message("You unload [O].")
- O.forceMove(loc)
+ O.forceMove(drop_location())
src.cargo -= O
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
return
@@ -141,7 +141,7 @@
var/obj/O = X
if(prob(30/severity))
cargo -= O
- O.forceMove(loc)
+ O.forceMove(drop_location())
. = ..()
/obj/mecha/working/ripley/get_stats_part()
@@ -173,7 +173,7 @@
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
return
to_chat(user, "You successfully pushed [O] out of [src]!")
- O.loc = loc
+ O.forceMove(drop_location())
cargo -= O
else
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
index 1e08c2e67a2..88be32c5457 100644
--- a/code/game/objects/effects/anomalies.dm
+++ b/code/game/objects/effects/anomalies.dm
@@ -67,7 +67,7 @@
new /obj/effect/particle_effect/smoke/bad(loc)
for(var/atom/movable/O in src)
- O.loc = src.loc
+ O.forceMove(drop_location())
qdel(src)
diff --git a/code/game/objects/effects/countdown.dm b/code/game/objects/effects/countdown.dm
index 8448e2a7e7e..2ed2105db3f 100644
--- a/code/game/objects/effects/countdown.dm
+++ b/code/game/objects/effects/countdown.dm
@@ -24,7 +24,7 @@
/obj/effect/countdown/proc/attach(atom/A)
attached_to = A
- loc = get_turf(A)
+ forceMove(get_turf(A))
/obj/effect/countdown/proc/start()
if(!started)
diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm
index 2187bc63114..b32cb793136 100644
--- a/code/game/objects/effects/decals/misc.dm
+++ b/code/game/objects/effects/decals/misc.dm
@@ -8,7 +8,7 @@
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
. = ..()
var/atom/old_loc = loc
- loc = get_turf(src)
+ forceMove(get_turf(src))
pixel_x = old_loc.pixel_x
pixel_y = old_loc.pixel_y
invisibility = set_invis
diff --git a/code/game/objects/effects/proximity.dm b/code/game/objects/effects/proximity.dm
index 70128be7ee1..51fb690ed04 100644
--- a/code/game/objects/effects/proximity.dm
+++ b/code/game/objects/effects/proximity.dm
@@ -63,7 +63,7 @@
for(var/I in 1 to old_checkers_len)
if(I <= old_checkers_used)
var/obj/effect/abstract/proximity_checker/pc = checkers_local[I]
- pc.loc = turfs[I]
+ pc.forceMove(turfs[I])
else
qdel(checkers_local[I]) //delete the leftovers
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index 0b1432e61cf..89a5ce7353b 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -121,7 +121,7 @@
/obj/structure/spider/spiderling/Collide(atom/user)
if(istype(user, /obj/structure/table))
- src.loc = user.loc
+ forceMove(user.loc)
else
..()
@@ -145,7 +145,7 @@
"You hear something scampering through the ventilation ducts.")
spawn(rand(20,60))
- loc = exit_vent
+ forceMove(exit_vent)
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
@@ -159,7 +159,7 @@
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
- loc = entry_vent
+ forceMove(entry_vent)
entry_vent = null
return
loc = exit_vent.loc
diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm
index 8dece8461bf..6c2c8e58b4e 100644
--- a/code/game/objects/items/airlock_painter.dm
+++ b/code/game/objects/items/airlock_painter.dm
@@ -119,7 +119,7 @@
/obj/item/airlock_painter/attack_self(mob/user)
if(ink)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
- ink.loc = user.loc
+ ink.forceMove(user.drop_location())
user.put_in_hands(ink)
to_chat(user, "You remove [ink] from [src].")
ink = null
diff --git a/code/game/objects/items/circuitboards/circuitboard.dm b/code/game/objects/items/circuitboards/circuitboard.dm
index 7ea64665d61..82350e37f96 100644
--- a/code/game/objects/items/circuitboards/circuitboard.dm
+++ b/code/game/objects/items/circuitboards/circuitboard.dm
@@ -35,7 +35,7 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
return
M.component_parts = list(src) // List of components always contains a board
- loc = null
+ moveToNullspace()
for(var/comp_path in req_components)
var/comp_amt = req_components[comp_path]
@@ -51,4 +51,4 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
for(var/i in 1 to comp_amt)
M.component_parts += new comp_path(null)
- M.RefreshParts()
\ No newline at end of file
+ M.RefreshParts()
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index 777ec0318e6..bbeed24168a 100644
--- a/code/game/objects/items/defib.dm
+++ b/code/game/objects/items/defib.dm
@@ -302,7 +302,7 @@
..()
if(check_defib_exists(mainunit, src) && req_defib)
defib = mainunit
- loc = defib
+ forceMove(defib)
busy = FALSE
update_icon()
diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm
index 2394c64a559..3beac591917 100644
--- a/code/game/objects/items/handcuffs.dm
+++ b/code/game/objects/items/handcuffs.dm
@@ -287,7 +287,7 @@
def_zone = pick("l_leg", "r_leg")
if(!C.legcuffed && C.get_num_legs() >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
C.legcuffed = src
- src.loc = C
+ forceMove(C)
C.update_inv_legcuffed()
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
else if(isanimal(L))
@@ -347,7 +347,7 @@
if(!C.legcuffed && C.get_num_legs() >= 2)
visible_message("\The [src] ensnares [C]!")
C.legcuffed = src
- src.loc = C
+ forceMove(C)
C.update_inv_legcuffed()
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
to_chat(C, "\The [src] ensnares you!")
diff --git a/code/game/objects/items/implants/implant.dm b/code/game/objects/items/implants/implant.dm
index ea05afbe14a..7ca82c12363 100644
--- a/code/game/objects/items/implants/implant.dm
+++ b/code/game/objects/items/implants/implant.dm
@@ -55,7 +55,7 @@
else
return 0
- src.loc = target
+ forceMove(target)
imp_in = target
target.implants += src
if(activated)
@@ -72,7 +72,7 @@
return 1
/obj/item/implant/proc/removed(mob/living/source, silent = 0, special = 0)
- src.loc = null
+ moveToNullspace()
imp_in = null
source.implants -= src
for(var/X in actions)
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 53814d9af6b..6e21251b6e8 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -220,7 +220,7 @@
return
if(!isturf(src.loc))
var/atom/target = src.loc
- loc = target.loc
+ forceMove(target.loc)
consume_everything(target)
else
var/turf/T = get_turf(src)
diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm
index b3960d1e5fb..9bf0b949c06 100644
--- a/code/game/objects/items/pneumaticCannon.dm
+++ b/code/game/objects/items/pneumaticCannon.dm
@@ -216,7 +216,7 @@
if(!src.tank)
return
to_chat(user, "You detach \the [thetank] from \the [src].")
- src.tank.loc = get_turf(user)
+ src.tank.forceMove(user.drop_location())
user.put_in_hands(tank)
src.tank = null
if(!removing)
@@ -265,7 +265,7 @@
/obj/item/pneumatic_cannon/pie/Initialize()
. = ..()
allowed_typecache = pie_typecache
-
+
/obj/item/pneumatic_cannon/pie/selfcharge
automatic = TRUE
selfcharge = TRUE
diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm
index 94605906445..c0500f5d21e 100644
--- a/code/game/objects/items/shooting_range.dm
+++ b/code/game/objects/items/shooting_range.dm
@@ -23,7 +23,7 @@
/obj/item/target/Move()
. = ..()
if(pinnedLoc)
- pinnedLoc.loc = loc
+ pinnedLoc.forceMove(loc)
/obj/item/target/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm
index afeffe0f1e0..917ec898ad2 100644
--- a/code/game/objects/items/storage/bags.dm
+++ b/code/game/objects/items/storage/bags.dm
@@ -199,7 +199,7 @@
else
if(S.pulledby)
S.pulledby.stop_pulling()
- S.loc = src
+ S.forceMove(src)
orient2hud(usr)
if(usr.s_active)
diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm
index 2f070d887d3..3e0f9db3fc6 100644
--- a/code/game/objects/items/tanks/watertank.dm
+++ b/code/game/objects/items/tanks/watertank.dm
@@ -49,7 +49,7 @@
on = FALSE
to_chat(user, "You need a free hand to hold the mister!")
return
- noz.loc = user
+ noz.forceMove(user)
else
//Remove from their hands and put back "into" the tank
remove_noz()
@@ -124,7 +124,7 @@
if(check_tank_exists(parent_tank, src))
tank = parent_tank
reagents = tank.reagents //This mister is really just a proxy for the tank's reagents
- loc = tank
+ forceMove(tank)
return
/obj/item/reagent_containers/spray/mister/dropped(mob/user)
@@ -146,7 +146,7 @@
/obj/item/reagent_containers/spray/mister/Move()
..()
if(loc != tank.loc)
- loc = tank.loc
+ forceMove(tank.loc)
/obj/item/reagent_containers/spray/mister/afterattack(obj/target, mob/user, proximity)
if(target.loc == loc) //Safety check so you don't fill your mister with mutagen or something and then blast yourself in the face with it
diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm
index 000d0485bb4..56a38cb688f 100644
--- a/code/game/objects/structures/beds_chairs/bed.dm
+++ b/code/game/objects/structures/beds_chairs/bed.dm
@@ -154,7 +154,7 @@
/obj/item/roller/robo/deploy_roller(mob/user, atom/location)
if(loaded)
var/obj/structure/bed/roller/R = loaded
- R.loc = location
+ R.forceMove(location)
user.visible_message("[user] deploys [loaded].", "You deploy [loaded].")
loaded = null
else
diff --git a/code/game/objects/structures/crates_lockers/crates/bins.dm b/code/game/objects/structures/crates_lockers/crates/bins.dm
index b8e9c2c1277..4f385f43a53 100644
--- a/code/game/objects/structures/crates_lockers/crates/bins.dm
+++ b/code/game/objects/structures/crates_lockers/crates/bins.dm
@@ -28,7 +28,7 @@
to_chat(user, "You fill the bag.")
for(var/obj/item/O in src)
if(T.can_be_inserted(O, 1))
- O.loc = T
+ O.forceMove(T)
T.update_icon()
do_animate()
else if(istype(W, /obj/item/wrench))
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 8b3d2981e28..717b6248393 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -301,7 +301,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
return
if(!ismob(user) || user.lying || user.incapacitated())
return
- O.loc = src.loc
+ O.forceMove(src.loc)
if (user != O)
visible_message("[user] stuffs [O] into [src].")
return
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 484265b12e5..550c89d1ae8 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -43,7 +43,7 @@ FLOOR SAFES
return
if(I.w_class + space <= maxspace)
space += I.w_class
- I.loc = src
+ I.forceMove(src)
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
@@ -97,10 +97,10 @@ FLOOR SAFES
if(!ishuman(usr))
return
var/mob/living/carbon/human/user = usr
-
+
if(!user.canUseTopic(src))
return
-
+
var/canhear = 0
if(user.is_holding_item_of_type(/obj/item/clothing/neck/stethoscope))
canhear = 1
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
index e93372b8313..eabe4499a48 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
@@ -136,7 +136,7 @@
last_delay = current_tube.enter_delay(src, next_dir)
sleep(last_delay)
setDir(next_dir)
- loc = next_loc // When moving from one tube to another, skip collision and such.
+ forceMove(next_loc) // When moving from one tube to another, skip collision and such.
density = current_tube.density
if(current_tube && current_tube.should_stop_pod(src, next_dir))
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 0dd54b18e8c..58212e94e8c 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -59,7 +59,7 @@
if(ishuman(user))
user.put_in_hands(I)
else
- I.loc = get_turf(src)
+ I.forceMove(drop_location())
to_chat(user, "You find [I] in the cistern.")
w_items -= I.w_class
else
diff --git a/code/game/turfs/simulated/wall/misc_walls.dm b/code/game/turfs/simulated/wall/misc_walls.dm
index 4d48c86934b..ecc389af885 100644
--- a/code/game/turfs/simulated/wall/misc_walls.dm
+++ b/code/game/turfs/simulated/wall/misc_walls.dm
@@ -101,7 +101,7 @@
var/obj/structure/sign/poster/P = O
P.roll_and_drop(src)
else
- O.loc = src
+ O.forceMove(src)
/turf/closed/wall/clockwork/devastate_wall()
for(var/i in 1 to 2)
diff --git a/code/modules/admin/verbs/manipulate_organs.dm b/code/modules/admin/verbs/manipulate_organs.dm
index 5edb1e7bca5..3ff0ff75acf 100644
--- a/code/modules/admin/verbs/manipulate_organs.dm
+++ b/code/modules/admin/verbs/manipulate_organs.dm
@@ -55,5 +55,5 @@
else if(I) // Put the implant in case.
var/obj/item/implantcase/case = new(get_turf(C))
case.imp = I
- I.loc = case
+ I.forceMove(case)
case.update_icon()
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index 1502b887180..18fda04a1bc 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -115,13 +115,16 @@
air_contents.assert_gases(/datum/gas/plasma, /datum/gas/oxygen)
var/fuel_moles = air_contents.gases[/datum/gas/plasma][MOLES] + air_contents.gases[/datum/gas/oxygen][MOLES]/6
air_contents.garbage_collect()
-
+ var/datum/gas_mixture/bomb_mixture = air_contents.copy()
var/strength = 1
var/turf/ground_zero = get_turf(loc)
- loc = null
- if(air_contents.temperature > (T0C + 400))
+ if(master)
+ qdel(master)
+ qdel(src)
+
+ if(bomb_mixture.temperature > (T0C + 400))
strength = (fuel_moles/15)
if(strength >=1)
@@ -131,10 +134,10 @@
else if(strength >=0.2)
explosion(ground_zero, -1, 0, 1, 2)
else
- ground_zero.assume_air(air_contents)
+ ground_zero.assume_air(bomb_mixture)
ground_zero.hotspot_expose(1000, 125)
- else if(air_contents.temperature > (T0C + 250))
+ else if(bomb_mixture.temperature > (T0C + 250))
strength = (fuel_moles/20)
if(strength >=1)
@@ -142,26 +145,23 @@
else if (strength >=0.5)
explosion(ground_zero, -1, 0, 1, 2)
else
- ground_zero.assume_air(air_contents)
+ ground_zero.assume_air(bomb_mixture)
ground_zero.hotspot_expose(1000, 125)
- else if(air_contents.temperature > (T0C + 100))
+ else if(bomb_mixture.temperature > (T0C + 100))
strength = (fuel_moles/25)
if (strength >=1)
explosion(ground_zero, -1, 0, round(strength,1), round(strength*3,1))
else
- ground_zero.assume_air(air_contents)
+ ground_zero.assume_air(bomb_mixture)
ground_zero.hotspot_expose(1000, 125)
else
- ground_zero.assume_air(air_contents)
+ ground_zero.assume_air(bomb_mixture)
ground_zero.hotspot_expose(1000, 125)
- air_update_turf()
- if(master)
- qdel(master)
- qdel(src)
+ ground_zero.air_update_turf()
/obj/item/tank/proc/release() //This happens when the bomb is not welded. Tank contents are just spat out.
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
diff --git a/code/modules/cargo/order.dm b/code/modules/cargo/order.dm
index 6e301ef85cc..de8966bd3a0 100644
--- a/code/modules/cargo/order.dm
+++ b/code/modules/cargo/order.dm
@@ -77,7 +77,7 @@
P.info += "
Stamp below to confirm receipt of goods:
"
P.update_icon()
- P.loc = C
+ P.forceMove(C)
C.manifest = P
C.update_icon()
diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm
index a2b5a864c48..1715636b579 100644
--- a/code/modules/clothing/spacesuits/chronosuit.dm
+++ b/code/modules/clothing/spacesuits/chronosuit.dm
@@ -271,29 +271,29 @@
target_ui = null
/obj/effect/chronos_cam/relaymove(var/mob/user, direction)
- if(holder)
- if(user == holder)
- if(loc == user)
- loc = get_turf(user)
- if(user.client && user.client.eye != src)
- src.loc = get_turf(user)
- user.reset_perspective(src)
- user.set_machine(src)
- var/atom/step = get_step(src, direction)
- if(step)
- if((step.x <= TRANSITIONEDGE) || (step.x >= (world.maxx - TRANSITIONEDGE - 1)) || (step.y <= TRANSITIONEDGE) || (step.y >= (world.maxy - TRANSITIONEDGE - 1)))
- if(!src.Move(step))
- src.loc = step
- else
- src.loc = step
- if((x == holder.x) && (y == holder.y) && (z == holder.z))
- remove_target_ui()
- loc = user
- else if(!target_ui)
- create_target_ui()
- phase_time = world.time + phase_time_length
- else
+ if(!holder)
qdel(src)
+ return
+ if(user == holder)
+ if(loc == user)
+ forceMove(get_turf(user))
+ if(user.client && user.client.eye != src)
+ src.loc = get_turf(user)
+ user.reset_perspective(src)
+ user.set_machine(src)
+ var/atom/step = get_step(src, direction)
+ if(step)
+ if((step.x <= TRANSITIONEDGE) || (step.x >= (world.maxx - TRANSITIONEDGE - 1)) || (step.y <= TRANSITIONEDGE) || (step.y >= (world.maxy - TRANSITIONEDGE - 1)))
+ if(!src.Move(step))
+ src.loc = step
+ else
+ src.loc = step
+ if((x == holder.x) && (y == holder.y) && (z == holder.z))
+ remove_target_ui()
+ loc = user
+ else if(!target_ui)
+ create_target_ui()
+ phase_time = world.time + phase_time_length
/obj/effect/chronos_cam/check_eye(mob/user)
if(user != holder)
diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm
index 94272a8b8eb..8dd4afd2f5e 100644
--- a/code/modules/food_and_drinks/food/snacks.dm
+++ b/code/modules/food_and_drinks/food/snacks.dm
@@ -276,7 +276,7 @@
/obj/item/reagent_containers/food/snacks/Destroy()
if(contents)
for(var/atom/movable/something in contents)
- something.loc = get_turf(src)
+ something.forceMove(drop_location())
return ..()
/obj/item/reagent_containers/food/snacks/attack_animal(mob/M)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
index 765b5ff8912..8573a84c9bb 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
@@ -119,7 +119,7 @@
else
for(var/obj/O in contents)
if(sanitize(O.name) == href_list["dispense"])
- O.loc = src.loc
+ O.forceMove(drop_location())
break
if(href_list["portion"])
diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
index 9d7b6cb2032..9f761391510 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
@@ -284,7 +284,7 @@
/obj/machinery/microwave/proc/dispose()
for (var/obj/O in contents)
- O.loc = src.loc
+ O.forceMove(drop_location())
to_chat(usr, "You dispose of the microwave contents.")
updateUsrDialog()
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index 8b10bdf2a65..6d8797b7a8e 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -178,9 +178,9 @@
/obj/machinery/processor/proc/empty()
for (var/obj/O in src)
- O.loc = src.loc
+ O.forceMove(drop_location())
for (var/mob/M in src)
- M.loc = src.loc
+ M.forceMove(drop_location())
return
/obj/machinery/processor/slime
diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
index 46e2f3ea5fd..750b5524bba 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
@@ -301,10 +301,10 @@
if(S.dried_type == S.type)//if the dried type is the same as the object's type, don't bother creating a whole new item...
S.add_atom_colour("#ad7257", FIXED_COLOUR_PRIORITY)
S.dry = TRUE
- S.loc = get_turf(src)
+ S.forceMove(drop_location())
else
var/dried = S.dried_type
- new dried(src.loc)
+ new dried(drop_location())
qdel(S)
return TRUE
for(var/obj/item/stack/sheet/wetleather/WL in contents)
diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm
index fdd86c95409..c872756872d 100644
--- a/code/modules/mining/machine_vending.dm
+++ b/code/modules/mining/machine_vending.dm
@@ -110,7 +110,7 @@
if(istype(inserted_id))
if(href_list["choice"] == "eject")
to_chat(usr, "You eject the ID from [src]'s card slot.")
- inserted_id.loc = loc
+ inserted_id.forceMove(loc)
inserted_id.verb_pickup()
inserted_id = null
else if(href_list["choice"] == "insert")
diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm
index dbefd0419d0..7caf57b0a64 100644
--- a/code/modules/mining/minebot.dm
+++ b/code/modules/mining/minebot.dm
@@ -132,11 +132,11 @@
/mob/living/simple_animal/hostile/mining_drone/proc/CollectOre()
var/obj/item/ore/O
for(O in src.loc)
- O.loc = src
+ O.forceMove(src)
for(var/dir in GLOB.alldirs)
var/turf/T = get_step(src,dir)
for(O in T)
- O.loc = src
+ O.forceMove(src)
return
/mob/living/simple_animal/hostile/mining_drone/proc/DropOre(message = 1)
@@ -148,7 +148,7 @@
to_chat(src, "You dump your stored ore.")
for(var/obj/item/ore/O in contents)
contents -= O
- O.loc = src.loc
+ O.forceMove(drop_location())
return
/mob/living/simple_animal/hostile/mining_drone/adjustHealth(amount)
diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm
index fef21757d19..fe4c2fab84b 100644
--- a/code/modules/mining/mint.dm
+++ b/code/modules/mining/mint.dm
@@ -100,4 +100,4 @@
if(!M)
M = new /obj/item/storage/bag/money(src)
unload_mineral(M)
- O.loc = M
\ No newline at end of file
+ O.forceMove(M)
diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm
index c175acf9d6e..365fe5cb012 100644
--- a/code/modules/mob/living/brain/brain.dm
+++ b/code/modules/mob/living/brain/brain.dm
@@ -12,8 +12,8 @@
stored_dna.initialize_dna(random_blood_type())
if(isturf(loc)) //not spawned in an MMI or brain organ (most likely adminspawned)
var/obj/item/organ/brain/OB = new(loc) //we create a new brain organ for it.
- loc = OB
OB.brainmob = src
+ forceMove(OB)
/mob/living/brain/proc/create_dna()
@@ -71,3 +71,16 @@
var/obj/mecha/M = MMI.mecha
if((src == MMI.brainmob) && istype(M))
return M.click_action(A,src,params)
+
+/mob/living/brain/forceMove(atom/destination)
+ if(container)
+ return container.forceMove(destination)
+ else if (istype(loc, /obj/item/organ/brain))
+ var/obj/item/organ/brain/B = loc
+ B.forceMove(destination)
+ else if (istype(destination, /obj/item/organ/brain))
+ doMove(destination)
+ else if (istype(destination, /obj/item/device/mmi))
+ doMove(destination)
+ else
+ CRASH("Brainmob without a container [src] attempted to move to [destination].")
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index 335d088f920..db48302f493 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -27,7 +27,7 @@
if(C.mind && C.mind.has_antag_datum(/datum/antagonist/changeling) && !no_id_transfer) //congrats, you're trapped in a body you don't control
if(brainmob && !(C.stat == DEAD || (C.status_flags & FAKEDEATH)))
to_chat(brainmob, "You can't feel your body! You're still just a brain!")
- loc = C
+ forceMove(C)
C.update_hair()
return
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index e76c8a46e5d..1c820ed0adc 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -1015,3 +1015,15 @@
if(mind && mind.linglink)
return LINGHIVE_LINK
return LINGHIVE_NONE
+
+/mob/living/forceMove(atom/destination)
+ stop_pulling()
+ if(buckled)
+ buckled.unbuckle_mob(src, force = TRUE)
+ if(has_buckled_mobs())
+ unbuckle_all_mobs(force = TRUE)
+ . = ..()
+ if(.)
+ if(client)
+ reset_perspective(destination)
+ update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm
index a42a2f7890d..1d2598c63d3 100644
--- a/code/modules/mob/living/silicon/ai/freelook/eye.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm
@@ -21,7 +21,10 @@
if(!isturf(ai.loc))
return
T = get_turf(T)
- loc = T
+ if (T)
+ forceMove(T)
+ else
+ moveToNullspace() // ????
if(use_static)
GLOB.cameranet.visibility(src)
if(ai.client)
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 8853b074454..b12430d26d6 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -99,7 +99,7 @@
var/newcardloc = P
P = new /obj/item/device/paicard(newcardloc)
P.setPersonality(src)
- loc = P
+ forceMove(P)
card = P
sradio = new(src)
if(!radio)
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 570481933b9..98d45570375 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -91,7 +91,7 @@
"You insert the new cell into [src].")
else if(istype(I, /obj/item/crowbar) && open && cell)
cell.add_fingerprint(usr)
- cell.loc = loc
+ cell.forceMove(loc)
cell = null
visible_message("[user] crowbars out the power cell from [src].",
"You pry the powercell out of [src].")
@@ -361,7 +361,7 @@
if(!load_mob(AM))
return
else
- AM.loc = src
+ AM.forceMove(src)
load = AM
mode = BOT_IDLE
@@ -400,7 +400,7 @@
unbuckle_all_mobs()
if(load)
- load.loc = loc
+ load.forceMove(loc)
load.pixel_y = initial(load.pixel_y)
load.layer = initial(load.layer)
load.plane = initial(load.plane)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
index 378a5cce2dd..aac87829bc8 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
@@ -58,7 +58,7 @@
I.pulledby.stop_pulling()
I.screen_loc = null // will get moved if inventory is visible
- I.loc = src
+ I.forceMove(src)
I.layer = ABOVE_HUD_LAYER
I.plane = ABOVE_HUD_PLANE
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index ff9fe871d54..c30a26a45ff 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -257,7 +257,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
I.pulledby.stop_pulling()
I.screen_loc = null // will get moved if inventory is visible
- I.loc = src
+ I.forceMove(src)
I.equipped(src, slot)
I.layer = ABOVE_HUD_LAYER
I.plane = ABOVE_HUD_PLANE
diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm
index 13532934846..54ef51ad5a0 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm
@@ -54,7 +54,7 @@
/obj/guardian_bomb/proc/disguise(obj/A)
- A.loc = src
+ A.forceMove(src)
stored_obj = A
opacity = A.opacity
anchored = A.anchored
diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
index 7473cf24bc5..6bac2461d9f 100644
--- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm
+++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
@@ -32,7 +32,7 @@
else if(mind) // Let's make this a feature
egg.origin = mind
for(var/obj/item/organ/I in src)
- I.loc = egg
+ I.forceMove(egg)
visible_message("[src] plants something in [victim]'s flesh!", \
"We inject our egg into [victim]'s body!")
egg_lain = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index dd96c87371e..670d571d4d1 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -43,7 +43,7 @@
. = ..()
if(mapload) //eat shit
for(var/obj/item/I in loc)
- I.loc = src
+ I.forceMove(src)
/mob/living/simple_animal/hostile/mimic/crate/DestroyPathToTarget()
..()
@@ -89,7 +89,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)
..()
GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/cable, /obj/structure/window))
@@ -116,7 +116,7 @@ GLOBAL_LIST_INIT(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()
@@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(obj/O, mob/living/user, destroy_original = 0)
if(destroy_original || CheckObject(O))
- O.loc = src
+ O.forceMove(src)
name = O.name
desc = O.desc
icon = O.icon
@@ -249,15 +249,15 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
..()
else
visible_message("The [src] clears a jam!")
- Pewgun.chambered.loc = loc //rip revolver immersions, blame shotgun snowflake procs
+ Pewgun.chambered.forceMove(loc) //rip revolver immersions, blame shotgun snowflake procs
Pewgun.chambered = null
if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len)
Pewgun.chambered = Pewgun.magazine.get_round(0)
- Pewgun.chambered.loc = Pewgun
+ Pewgun.chambered.forceMove(Pewgun)
Pewgun.update_icon()
else if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) //only true for pumpguns i think
Pewgun.chambered = Pewgun.magazine.get_round(0)
- Pewgun.chambered.loc = Pewgun
+ Pewgun.chambered.forceMove(Pewgun)
visible_message("The [src] cocks itself!")
else
ranged = 0 //BANZAIIII
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 452eb3afa76..f55cdc5715d 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -211,7 +211,7 @@
src.say("[pick(available_channels)] BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
else
src.say("BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
- ears.loc = src.loc
+ ears.forceMove(src.loc)
ears = null
for(var/possible_phrase in speak)
if(copytext(possible_phrase,1,3) in GLOB.department_radio_keys)
@@ -502,7 +502,7 @@
else //This should ensure that we only grab the item we want, and make sure it's not already collected on our perch
if(!parrot_perch || parrot_interest.loc != parrot_perch.loc)
held_item = parrot_interest
- parrot_interest.loc = src
+ parrot_interest.forceMove(src)
visible_message("[src] grabs [held_item]!", "You grab [held_item]!", "You hear the sounds of wings flapping furiously.")
parrot_interest = null
@@ -524,7 +524,7 @@
return
if(Adjacent(parrot_perch))
- src.loc = parrot_perch.loc
+ forceMove(parrot_perch.loc)
drop_held_item()
parrot_state = PARROT_PERCH
icon_state = icon_sit
diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm
index 867c33e32a8..3f23b8ba224 100644
--- a/code/modules/paperwork/contract.dm
+++ b/code/modules/paperwork/contract.dm
@@ -302,11 +302,11 @@
if(istype(worn, /obj/item/device/pda))
var/obj/item/device/pda/PDA = worn
PDA.id = id
- id.loc = worn
+ id.forceMove(worn)
else if(istype(worn, /obj/item/storage/wallet))
var/obj/item/storage/wallet/W = worn
W.front_id = id
- id.loc = worn
+ id.forceMove(worn)
worn.update_icon()
var/datum/round_event/ion_storm/add_law_only/ion = new()
ion.announceEvent = -1
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index 15341178a44..fed93fabd35 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -36,7 +36,7 @@
if(mapload)
for(var/obj/item/I in loc)
if(istype(I, /obj/item/paper) || istype(I, /obj/item/folder) || istype(I, /obj/item/photo))
- I.loc = src
+ I.forceMove(src)
/obj/structure/filingcabinet/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -90,7 +90,7 @@
if(contents.len)
if(prob(40 + contents.len * 5))
var/obj/item/I = pick(contents)
- I.loc = loc
+ I.forceMove(loc)
if(prob(25))
step_rand(I)
to_chat(user, "You pull \a [I] out of [src] at random.")
@@ -185,7 +185,7 @@ GLOBAL_LIST_EMPTY(employmentCabinets)
var/virgin = 1
/obj/structure/filingcabinet/employment/Initialize()
- . = ..()
+ . = ..()
GLOB.employmentCabinets += src
/obj/structure/filingcabinet/employment/Destroy()
diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm
index 64585556434..df69e9548af 100644
--- a/code/modules/paperwork/paper_cutter.dm
+++ b/code/modules/paperwork/paper_cutter.dm
@@ -55,7 +55,7 @@
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "You replace [src]'s [P].")
- P.loc = src
+ P.forceMove(src)
storedcutter = P
update_icon()
return
diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm
index 962802aa6d2..87dc0506f2e 100644
--- a/code/modules/paperwork/paperbin.dm
+++ b/code/modules/paperwork/paperbin.dm
@@ -22,7 +22,7 @@
return
var/obj/item/pen/P = locate(/obj/item/pen) in src.loc
if(P && !bin_pen)
- P.loc = src
+ P.forceMove(src)
bin_pen = P
update_icon()
@@ -69,7 +69,7 @@
user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/pen/P = bin_pen
- P.loc = user.loc
+ P.forceMove(user.loc)
user.put_in_hands(P)
to_chat(user, "You take [P] out of \the [src].")
bin_pen = null
@@ -90,7 +90,7 @@
P.rigged = 1
P.updateinfolinks()
- P.loc = user.loc
+ P.forceMove(user.loc)
user.put_in_hands(P)
to_chat(user, "You take [P] out of \the [src].")
else
@@ -169,4 +169,4 @@
CHECK_TICK
qdel(src)
else
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/projectiles/guns/grenade_launcher.dm b/code/modules/projectiles/guns/grenade_launcher.dm
index d87a6577106..771c0091e39 100644
--- a/code/modules/projectiles/guns/grenade_launcher.dm
+++ b/code/modules/projectiles/guns/grenade_launcher.dm
@@ -42,7 +42,7 @@
"You fire the grenade launcher!")
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
grenades -= F
- F.loc = user.loc
+ F.forceMove(user.loc)
F.throw_at(target, 30, 2, user)
message_admins("[key_name_admin(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]).")
log_game("[key_name(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]).")
diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm
index 22f60c16091..faf7de90105 100644
--- a/code/modules/projectiles/pins.dm
+++ b/code/modules/projectiles/pins.dm
@@ -24,7 +24,7 @@
if(istype(target, /obj/item/gun))
var/obj/item/gun/G = target
if(G.pin && (force_replace || G.pin.pin_removeable))
- G.pin.loc = get_turf(G)
+ G.pin.forceMove(get_turf(G))
G.pin.gun_remove(user)
to_chat(user, "You remove [G]'s old pin.")
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index a10c264b9ac..9b4842d644f 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -285,7 +285,7 @@
to_chat(new_mob, poly_msg)
M.transfer_observers_to(new_mob)
-
+
qdel(M)
return new_mob
@@ -319,7 +319,7 @@
L.mind.transfer_to(S)
if(owner)
to_chat(S, "You are an animate statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved! Do not harm [owner], your creator.")
- P.loc = S
+ P.forceMove(S)
return
else
var/obj/O = src
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index 0bafcba54d0..e7410685f74 100644
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -61,7 +61,7 @@
if(!user || user.stat != CONSCIOUS || user.loc != O || O.loc != src )
return
to_chat(user, "You successfully removed [O]'s wrapping !")
- O.loc = loc
+ O.forceMove(loc)
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
qdel(src)
else
diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm
index 576ba6fe8c9..ca929e5e9a7 100644
--- a/code/modules/research/xenobiology/xenobio_camera.dm
+++ b/code/modules/research/xenobiology/xenobio_camera.dm
@@ -99,7 +99,7 @@
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
for(var/mob/living/simple_animal/slime/S in X.stored_slimes)
- S.loc = remote_eye.loc
+ S.forceMove(remote_eye.loc)
S.visible_message("[S] warps in!")
X.stored_slimes -= S
else
@@ -125,7 +125,7 @@
if(S.buckled)
S.Feedstop(silent=1)
S.visible_message("[S] vanishes in a flash of light!")
- S.loc = X
+ S.forceMove(X)
X.stored_slimes += S
else
to_chat(owner, "Target is not near a camera. Cannot proceed.")
diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm
index 01c14ba7909..c3efc5fc554 100644
--- a/code/modules/shuttle/emergency.dm
+++ b/code/modules/shuttle/emergency.dm
@@ -474,7 +474,7 @@
turfs -= T
T = pick(turfs)
else
- src.loc = T
+ forceMove(T)
break
//Pod suits/pickaxes
diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm
index 9784dd115cc..4daeb9ea456 100644
--- a/code/modules/surgery/bodyparts/dismemberment.dm
+++ b/code/modules/surgery/bodyparts/dismemberment.dm
@@ -102,7 +102,7 @@
for(var/obj/item/I in embedded_objects)
embedded_objects -= I
- I.loc = src
+ I.forceMove(src)
if(!C.has_embedded_objects())
C.clear_alert("embeddedobject")
@@ -151,7 +151,7 @@
if(brainmob)
LB.brainmob = brainmob
brainmob = null
- LB.brainmob.loc = LB
+ LB.brainmob.forceMove(LB)
LB.brainmob.container = LB
LB.brainmob.stat = DEAD
@@ -167,7 +167,7 @@
..()
if(C && !special)
if(C.handcuffed)
- C.handcuffed.loc = C.loc
+ C.handcuffed.forceMove(C.loc)
C.handcuffed.dropped(C)
C.handcuffed = null
C.update_handcuffed()
@@ -185,7 +185,7 @@
..()
if(C && !special)
if(C.handcuffed)
- C.handcuffed.loc = C.loc
+ C.handcuffed.forceMove(C.loc)
C.handcuffed.dropped(C)
C.handcuffed = null
C.update_handcuffed()
@@ -201,7 +201,7 @@
/obj/item/bodypart/r_leg/drop_limb(special)
if(owner && !special)
if(owner.legcuffed)
- owner.legcuffed.loc = owner.loc
+ owner.legcuffed.forceMove(owner.loc)
owner.legcuffed.dropped(owner)
owner.legcuffed = null
owner.update_inv_legcuffed()
@@ -212,7 +212,7 @@
/obj/item/bodypart/l_leg/drop_limb(special) //copypasta
if(owner && !special)
if(owner.legcuffed)
- owner.legcuffed.loc = owner.loc
+ owner.legcuffed.forceMove(owner.loc)
owner.legcuffed.dropped(owner)
owner.legcuffed = null
owner.update_inv_legcuffed()
@@ -306,7 +306,7 @@
if(brain)
if(brainmob)
brainmob.container = null //Reset brainmob head var.
- brainmob.loc = brain //Throw mob into brain.
+ brainmob.forceMove(brain) //Throw mob into brain.
brain.brainmob = brainmob //Set the brain to use the brainmob
brainmob = null //Set head brainmob var to null
brain.Insert(C) //Now insert the brain proper
diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm
index a4d317ad2a7..f631400bee5 100644
--- a/code/modules/surgery/bodyparts/head.dm
+++ b/code/modules/surgery/bodyparts/head.dm
@@ -41,10 +41,10 @@
user.visible_message("[user] saws [src] open and pulls out a brain!", "You saw [src] open and pull out a brain.")
if(brainmob)
brainmob.container = null
- brainmob.loc = brain
+ brainmob.forceMove(brain)
brain.brainmob = brainmob
brainmob = null
- brain.loc = T
+ brain.forceMove(T)
brain = null
update_icon_dropped()
else
diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm
index e460a8c97f2..7ac387b4d88 100644
--- a/code/modules/surgery/bodyparts/helpers.dm
+++ b/code/modules/surgery/bodyparts/helpers.dm
@@ -118,7 +118,7 @@
var/obj/item/bodypart/L = X
for(var/obj/item/I in L.embedded_objects)
L.embedded_objects -= I
- I.loc = T
+ I.forceMove(T)
clear_alert("embeddedobject")
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index 388b3b68c92..8851a093473 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -162,7 +162,7 @@
"You successfully extract [I] from [target]'s [parse_zone(target_zone)].")
add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
I.Remove(target)
- I.loc = get_turf(target)
+ I.forceMove(get_turf(target))
else
user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
"You can't extract anything from [target]'s [parse_zone(target_zone)]!")
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index 75d30ec3525..a384845281a 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -28,7 +28,7 @@
owner = M
M.internal_organs |= src
M.internal_organs_slot[slot] = src
- loc = null
+ moveToNullspace()
for(var/X in actions)
var/datum/action/A = X
A.Grant(M)
diff --git a/code/modules/surgery/remove_embedded_object.dm b/code/modules/surgery/remove_embedded_object.dm
index e116c23303d..577541e6c4f 100644
--- a/code/modules/surgery/remove_embedded_object.dm
+++ b/code/modules/surgery/remove_embedded_object.dm
@@ -26,7 +26,7 @@
var/objects = 0
for(var/obj/item/I in L.embedded_objects)
objects++
- I.loc = get_turf(H)
+ I.forceMove(get_turf(H))
L.embedded_objects -= I
if(!H.has_embedded_objects())
H.clear_alert("embeddedobject")
@@ -39,4 +39,4 @@
else
to_chat(user, "You can't find [target]'s [parse_zone(user.zone_selected)], let alone any objects embedded in it!")
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm
index 78f29c1fc8c..310513326a7 100644
--- a/code/modules/surgery/tools.dm
+++ b/code/modules/surgery/tools.dm
@@ -212,7 +212,7 @@
add_overlay(img)
add_overlay("evidence")
desc = "An organ storage container holding [I]."
- I.loc = src
+ I.forceMove(src)
w_class = I.w_class
/obj/item/organ_storage/attack_self(mob/user)
diff --git a/tgstation.dme b/tgstation.dme
index 259adc30974..f8178781d86 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2343,11 +2343,11 @@
#include "code\modules\tgui\states\self.dm"
#include "code\modules\tgui\states\zlevel.dm"
#include "code\modules\tooltip\tooltip.dm"
-#include "code\modules\vehicles\_vehicle.dm"
#include "code\modules\uplink\uplink.dm"
#include "code\modules\uplink\uplink_devices.dm"
#include "code\modules\uplink\uplink_items.dm"
#include "code\modules\uplink\uplink_purchase_log.dm"
+#include "code\modules\vehicles\_vehicle.dm"
#include "code\modules\vehicles\atv.dm"
#include "code\modules\vehicles\bicycle.dm"
#include "code\modules\vehicles\entered.dm"