diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index 5ca74b8eee..f124e2779b 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 3d77ed4260..4d7a417e53 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 759dfc46dc..22edb79c80 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 48eafce3c5..937742930c 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 cab6c98536..44c39d8096 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 c8850975f1..44d6d5abe4 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 750551abda..a3ec6ba6ec 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -46,8 +46,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 d2005d0a55..5068955849 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 41c0fabcae..ae4af4072d 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 fa4a31cfc3..5a863e85da 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 d5ad847afd..e50da70c5d 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 c8de01badc..272d3530a6 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 0da64c3e4d..5688214044 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 e471efcf96..04737f2e4c 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 8448e2a7e7..2ed2105db3 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 2187bc6311..b32cb79313 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 70128be7ee..51fb690ed0 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 0b1432e61c..89a5ce7353 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 8dece8461b..6c2c8e58b4 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 4cdc0fc48a..82350e37f9 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]
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index 777ec0318e..bbeed24168 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 f21c2a879d..886a248c8c 100644
--- a/code/game/objects/items/handcuffs.dm
+++ b/code/game/objects/items/handcuffs.dm
@@ -292,7 +292,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))
@@ -352,7 +352,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 315985adef..7ca82c1236 100644
--- a/code/game/objects/items/implants/implant.dm
+++ b/code/game/objects/items/implants/implant.dm
@@ -1,97 +1,97 @@
-/obj/item/implant
- name = "implant"
- icon = 'icons/obj/implants.dmi'
- icon_state = "generic" //Shows up as the action button icon
- actions_types = list(/datum/action/item_action/hands_free/activate)
- var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants
- var/mob/living/imp_in = null
- item_color = "b"
- var/allow_multiple = FALSE
- var/uses = -1
- flags_1 = DROPDEL_1
-
-
-/obj/item/implant/proc/trigger(emote, mob/living/carbon/source)
- return
-
-/obj/item/implant/proc/activate()
- return
-
-/obj/item/implant/ui_action_click()
- activate("action_button")
-
-/obj/item/implant/proc/can_be_implanted_in(mob/living/target) // for human-only and other special requirements
- return TRUE
-
-/mob/living/proc/can_be_implanted()
- return TRUE
-
-/mob/living/silicon/can_be_implanted()
- return FALSE
-
-/mob/living/simple_animal/can_be_implanted()
- return healable //Applies to robots and most non-organics, exceptions can override.
-
-
-
-//What does the implant do upon injection?
-//return 1 if the implant injects
-//return 0 if there is no room for implant / it fails
-/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = 0)
- LAZYINITLIST(target.implants)
- if(!target.can_be_implanted() || !can_be_implanted_in(target))
- return 0
- for(var/X in target.implants)
- if(istype(X, type))
- var/obj/item/implant/imp_e = X
- if(!allow_multiple)
- if(imp_e.uses < initial(imp_e.uses)*2)
- if(uses == -1)
- imp_e.uses = -1
- else
- imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2)
- qdel(src)
- return 1
- else
- return 0
-
- src.loc = target
- imp_in = target
- target.implants += src
- if(activated)
- for(var/X in actions)
- var/datum/action/A = X
- A.Grant(target)
- if(ishuman(target))
- var/mob/living/carbon/human/H = target
- H.sec_hud_set_implants()
-
- if(user)
- add_logs(user, target, "implanted", object="[name]")
-
- return 1
-
-/obj/item/implant/proc/removed(mob/living/source, silent = 0, special = 0)
- src.loc = null
- imp_in = null
- source.implants -= src
- for(var/X in actions)
- var/datum/action/A = X
- A.Grant(source)
- if(ishuman(source))
- var/mob/living/carbon/human/H = source
- H.sec_hud_set_implants()
-
- return 1
-
-/obj/item/implant/Destroy()
- if(imp_in)
- removed(imp_in)
- return ..()
-
-/obj/item/implant/proc/get_data()
- return "No information available"
-
-/obj/item/implant/dropped(mob/user)
- . = 1
- ..()
+/obj/item/implant
+ name = "implant"
+ icon = 'icons/obj/implants.dmi'
+ icon_state = "generic" //Shows up as the action button icon
+ actions_types = list(/datum/action/item_action/hands_free/activate)
+ var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants
+ var/mob/living/imp_in = null
+ item_color = "b"
+ var/allow_multiple = FALSE
+ var/uses = -1
+ flags_1 = DROPDEL_1
+
+
+/obj/item/implant/proc/trigger(emote, mob/living/carbon/source)
+ return
+
+/obj/item/implant/proc/activate()
+ return
+
+/obj/item/implant/ui_action_click()
+ activate("action_button")
+
+/obj/item/implant/proc/can_be_implanted_in(mob/living/target) // for human-only and other special requirements
+ return TRUE
+
+/mob/living/proc/can_be_implanted()
+ return TRUE
+
+/mob/living/silicon/can_be_implanted()
+ return FALSE
+
+/mob/living/simple_animal/can_be_implanted()
+ return healable //Applies to robots and most non-organics, exceptions can override.
+
+
+
+//What does the implant do upon injection?
+//return 1 if the implant injects
+//return 0 if there is no room for implant / it fails
+/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = 0)
+ LAZYINITLIST(target.implants)
+ if(!target.can_be_implanted() || !can_be_implanted_in(target))
+ return 0
+ for(var/X in target.implants)
+ if(istype(X, type))
+ var/obj/item/implant/imp_e = X
+ if(!allow_multiple)
+ if(imp_e.uses < initial(imp_e.uses)*2)
+ if(uses == -1)
+ imp_e.uses = -1
+ else
+ imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2)
+ qdel(src)
+ return 1
+ else
+ return 0
+
+ forceMove(target)
+ imp_in = target
+ target.implants += src
+ if(activated)
+ for(var/X in actions)
+ var/datum/action/A = X
+ A.Grant(target)
+ if(ishuman(target))
+ var/mob/living/carbon/human/H = target
+ H.sec_hud_set_implants()
+
+ if(user)
+ add_logs(user, target, "implanted", object="[name]")
+
+ return 1
+
+/obj/item/implant/proc/removed(mob/living/source, silent = 0, special = 0)
+ moveToNullspace()
+ imp_in = null
+ source.implants -= src
+ for(var/X in actions)
+ var/datum/action/A = X
+ A.Grant(source)
+ if(ishuman(source))
+ var/mob/living/carbon/human/H = source
+ H.sec_hud_set_implants()
+
+ return 1
+
+/obj/item/implant/Destroy()
+ if(imp_in)
+ removed(imp_in)
+ return ..()
+
+/obj/item/implant/proc/get_data()
+ return "No information available"
+
+/obj/item/implant/dropped(mob/user)
+ . = 1
+ ..()
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 53814d9af6..6e21251b6e 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 b3960d1e5f..9bf0b949c0 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 6803d6bb7b..586d21555c 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 afeffe0f1e..917ec898ad 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 5f0345aa40..58aadadce0 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 ab285cbbd6..1a09c9c4c2 100644
--- a/code/game/objects/structures/beds_chairs/bed.dm
+++ b/code/game/objects/structures/beds_chairs/bed.dm
@@ -150,7 +150,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 eb1b989ecd..4f385f43a5 100644
--- a/code/game/objects/structures/crates_lockers/crates/bins.dm
+++ b/code/game/objects/structures/crates_lockers/crates/bins.dm
@@ -1,45 +1,45 @@
-/obj/structure/closet/crate/bin
- desc = "A trash bin, place your trash here for the janitor to collect."
- name = "trash bin"
- icon_state = "largebins"
- open_sound = 'sound/effects/bin_open.ogg'
- close_sound = 'sound/effects/bin_close.ogg'
- anchored = TRUE
- horizontal = FALSE
- delivery_icon = null
-
-/obj/structure/closet/crate/bin/New()
- ..()
- update_icon()
-
-/obj/structure/closet/crate/bin/update_icon()
- ..()
- cut_overlays()
- if(contents.len == 0)
- add_overlay("largebing")
- else if(contents.len >= storage_capacity)
- add_overlay("largebinr")
- else
- add_overlay("largebino")
-
-/obj/structure/closet/crate/bin/attackby(obj/item/W, mob/user, params)
- if(istype(W, /obj/item/storage/bag/trash))
- var/obj/item/storage/bag/trash/T = W
- to_chat(user, "You fill the bag.")
- for(var/obj/item/O in src)
- if(T.can_be_inserted(O, 1))
- O.loc = T
- T.update_icon()
- do_animate()
- else if(istype(W, /obj/item/wrench))
- anchored = !anchored
- playsound(src.loc, W.usesound, 75, 1)
- else
- return ..()
-
-/obj/structure/closet/crate/bin/proc/do_animate()
- playsound(loc, open_sound, 15, 1, -3)
- flick("animate_largebins", src)
- spawn(13)
- playsound(loc, close_sound, 15, 1, -3)
- update_icon()
+/obj/structure/closet/crate/bin
+ desc = "A trash bin, place your trash here for the janitor to collect."
+ name = "trash bin"
+ icon_state = "largebins"
+ open_sound = 'sound/effects/bin_open.ogg'
+ close_sound = 'sound/effects/bin_close.ogg'
+ anchored = TRUE
+ horizontal = FALSE
+ delivery_icon = null
+
+/obj/structure/closet/crate/bin/New()
+ ..()
+ update_icon()
+
+/obj/structure/closet/crate/bin/update_icon()
+ ..()
+ cut_overlays()
+ if(contents.len == 0)
+ add_overlay("largebing")
+ else if(contents.len >= storage_capacity)
+ add_overlay("largebinr")
+ else
+ add_overlay("largebino")
+
+/obj/structure/closet/crate/bin/attackby(obj/item/W, mob/user, params)
+ if(istype(W, /obj/item/storage/bag/trash))
+ var/obj/item/storage/bag/trash/T = W
+ to_chat(user, "You fill the bag.")
+ for(var/obj/item/O in src)
+ if(T.can_be_inserted(O, 1))
+ O.forceMove(T)
+ T.update_icon()
+ do_animate()
+ else if(istype(W, /obj/item/wrench))
+ anchored = !anchored
+ playsound(src.loc, W.usesound, 75, 1)
+ else
+ return ..()
+
+/obj/structure/closet/crate/bin/proc/do_animate()
+ playsound(loc, open_sound, 15, 1, -3)
+ flick("animate_largebins", src)
+ spawn(13)
+ playsound(loc, close_sound, 15, 1, -3)
+ update_icon()
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 8b3d2981e2..717b624839 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 733dcf646d..9df47743a4 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 e93372b831..eabe4499a4 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 0e5675a5a0..9009a7171d 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 4d48c86934..ecc389af88 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 5edb1e7bca..3ff0ff75ac 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 1502b88718..18fda04a1b 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 5fb6cee2b7..de8966bd3a 100644
--- a/code/modules/cargo/order.dm
+++ b/code/modules/cargo/order.dm
@@ -1,97 +1,97 @@
/obj/item/paper/fluff/jobs/cargo/manifest
- var/order_cost = 0
- var/order_id = 0
- var/errors = 0
-
+ var/order_cost = 0
+ var/order_id = 0
+ var/errors = 0
+
/obj/item/paper/fluff/jobs/cargo/manifest/New(atom/A, id, cost)
- ..()
- order_id = id
- order_cost = cost
-
- if(prob(MANIFEST_ERROR_CHANCE))
- errors |= MANIFEST_ERROR_NAME
- if(prob(MANIFEST_ERROR_CHANCE))
- errors |= MANIFEST_ERROR_CONTENTS
- if(prob(MANIFEST_ERROR_CHANCE))
- errors |= MANIFEST_ERROR_ITEM
-
+ ..()
+ order_id = id
+ order_cost = cost
+
+ if(prob(MANIFEST_ERROR_CHANCE))
+ errors |= MANIFEST_ERROR_NAME
+ if(prob(MANIFEST_ERROR_CHANCE))
+ errors |= MANIFEST_ERROR_CONTENTS
+ if(prob(MANIFEST_ERROR_CHANCE))
+ errors |= MANIFEST_ERROR_ITEM
+
/obj/item/paper/fluff/jobs/cargo/manifest/proc/is_approved()
- return stamped && stamped.len && !is_denied()
-
+ return stamped && stamped.len && !is_denied()
+
/obj/item/paper/fluff/jobs/cargo/manifest/proc/is_denied()
- return stamped && ("stamp-deny" in stamped)
-
-/datum/supply_order
- var/id
- var/orderer
- var/orderer_rank
- var/orderer_ckey
- var/reason
- var/datum/supply_pack/pack
-
-/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason)
- id = SSshuttle.ordernum++
- src.pack = pack
- src.orderer = orderer
- src.orderer_rank = orderer_rank
- src.orderer_ckey = orderer_ckey
- src.reason = reason
-
-/datum/supply_order/proc/generateRequisition(turf/T)
- var/obj/item/paper/P = new(T)
-
- P.name = "requisition form - #[id] ([pack.name])"
- P.info += "