From d5f87166673c60d51d84c536301b0cdb67b91643 Mon Sep 17 00:00:00 2001
From: TobyThorne <45202681+TobyThorne@users.noreply.github.com>
Date: Wed, 6 Dec 2023 18:07:25 +0600
Subject: [PATCH] fix(things): replaces direct loc setting across the code w/
forceMove and dropInto
PR #11163
---
code/game/machinery/Sleeper.dm | 2 +-
code/game/machinery/cell_charger.dm | 4 ++--
code/game/machinery/computer/ai_core.dm | 6 +++---
.../game/machinery/computer/buildandrepair.dm | 2 +-
code/game/machinery/cryopod.dm | 4 ++--
code/game/machinery/doors/door.dm | 4 ++--
code/game/machinery/doors/windowdoor.dm | 4 ++--
code/game/machinery/floorlayer.dm | 4 ++--
code/game/machinery/hologram.dm | 2 +-
code/game/machinery/newscaster.dm | 2 +-
code/game/machinery/robot_fabricator.dm | 2 +-
code/game/machinery/suit_storage_unit.dm | 12 +++++------
code/game/machinery/telecomms/logbrowser.dm | 4 ++--
code/game/machinery/telecomms/telemonitor.dm | 4 ++--
.../machinery/telecomms/traffic_control.dm | 4 ++--
code/game/machinery/washing_machine.dm | 4 ++--
code/game/mecha/combat/marauder.dm | 2 +-
code/game/mecha/combat/phazon.dm | 4 ++--
code/game/mecha/equipment/mecha_equipment.dm | 2 +-
code/game/mecha/equipment/tools/tools.dm | 4 ++--
code/game/mecha/mecha.dm | 6 +++---
code/game/mecha/mecha_wreckage.dm | 2 +-
code/game/mecha/working/ripley.dm | 2 +-
code/game/mecha/working/working.dm | 6 +++---
code/game/objects/effects/chem/foam.dm | 2 +-
.../game/objects/effects/decals/contraband.dm | 4 ++--
code/game/objects/effects/decals/crayon.dm | 14 +++++--------
code/game/objects/effects/proximity.dm | 2 +-
code/game/objects/effects/spiders.dm | 14 ++++++-------
code/game/objects/items/backwear/rpd.dm | 2 +-
code/game/objects/items/contraband.dm | 2 +-
code/game/objects/items/devices/PDA/PDA.dm | 2 +-
code/game/objects/items/devices/holopad.dm | 4 ++--
.../objects/items/devices/lightreplacer.dm | 1 -
.../objects/items/devices/radio/headset.dm | 4 ++--
.../game/objects/items/devices/radio/radio.dm | 2 +-
.../objects/items/devices/transfer_valve.dm | 2 +-
code/game/objects/items/glassjar.dm | 4 ++--
.../objects/items/grenades/spawnergrenade.dm | 2 +-
.../objects/items/implants/implantchair.dm | 6 +++---
code/game/objects/items/shooting_range.dm | 4 ++--
code/game/objects/items/storage/internal.dm | 2 +-
code/game/objects/items/weapons/RSF.dm | 2 +-
code/game/objects/items/weapons/trays.dm | 6 +++---
code/game/objects/structures/bedsheet_bin.dm | 6 +++---
code/game/objects/structures/christmas.dm | 2 +-
code/game/objects/structures/coathanger.dm | 2 +-
.../structures/crates_lockers/closets.dm | 4 ++--
.../crates_lockers/closets/statue.dm | 8 ++++----
code/game/objects/structures/door_assembly.dm | 2 +-
code/game/objects/structures/electricchair.dm | 2 +-
code/game/objects/structures/extinguisher.dm | 2 +-
code/game/objects/structures/janicart.dm | 2 +-
code/game/objects/structures/noticeboard.dm | 2 +-
code/game/objects/structures/railing.dm | 2 +-
.../game/objects/structures/tank_dispenser.dm | 4 ++--
code/game/objects/structures/target_stake.dm | 6 +++---
code/game/objects/structures/transit_tubes.dm | 16 +++++++--------
.../objects/structures/windoor_assembly.dm | 8 ++++----
code/modules/ZAS/Fire.dm | 2 +-
code/modules/assembly/holder.dm | 4 ++--
code/modules/assembly/shock_kit.dm | 4 ++--
.../components/binary_devices/pipeturbine.dm | 2 --
.../components/unary/unary_base.dm | 2 --
code/modules/clothing/suits/armor.dm | 2 +-
.../clothing/under/accessories/lockets.dm | 4 ++--
code/modules/economy/ATM.dm | 4 ++--
code/modules/economy/EFTPOS.dm | 2 +-
code/modules/food/recipes_microwave.dm | 4 ++--
code/modules/games/cards.dm | 2 +-
code/modules/hydroponics/seed_machines.dm | 6 +++---
code/modules/hydroponics/seed_storage.dm | 4 ++--
code/modules/library/lib_items.dm | 16 ++++++++-------
code/modules/mining/drilling/drill.dm | 6 +++---
code/modules/mining/machine_stacking.dm | 6 +++---
code/modules/mining/machine_unloading.dm | 4 ++--
code/modules/mining/satchel_ore_boxdm.dm | 4 ++--
code/modules/mob/grab/grab_object.dm | 1 -
code/modules/mob/living/bot/farmbot.dm | 2 +-
code/modules/mob/living/bot/medbot.dm | 2 +-
code/modules/mob/living/bot/remotebot.dm | 2 +-
.../living/carbon/alien/diona/diona_powers.dm | 4 ++--
code/modules/mob/living/carbon/carbon.dm | 4 ++--
.../mob/living/carbon/human/human_defense.dm | 4 ++--
code/modules/mob/living/living.dm | 2 +-
code/modules/mob/living/living_defense.dm | 4 ++--
code/modules/mob/living/parasite/meme.dm | 7 ++++---
code/modules/mob/living/silicon/pai/death.dm | 2 +-
code/modules/mob/living/silicon/pai/pai.dm | 2 +-
.../modules/mob/living/silicon/robot/robot.dm | 2 +-
.../mob/living/silicon/robot/robot_items.dm | 10 +++++-----
.../mob/living/silicon/robot/robot_modules.dm | 2 +-
.../mob/living/silicon/robot/robot_parts.dm | 4 ++--
code/modules/mob/living/simple_animal/bees.dm | 2 +-
.../mob/living/simple_animal/borer/borer.dm | 2 +-
.../simple_animal/borer/borer_powers.dm | 4 ++--
.../living/simple_animal/friendly/corgi.dm | 2 +-
.../living/simple_animal/friendly/parrot.dm | 16 +++++++--------
.../simple_animal/friendly/spiderbot.dm | 12 +++++------
.../mob/living/simple_animal/simple_animal.dm | 2 +-
code/modules/mob/mob_movement.dm | 3 ---
code/modules/mob/transform_procs.dm | 2 +-
code/modules/organs/external/_external.dm | 4 ++--
code/modules/paperwork/faxmachine.dm | 2 +-
code/modules/paperwork/filingcabinet.dm | 4 ++--
code/modules/paperwork/paper_bundle.dm | 2 +-
code/modules/paperwork/papershredder.dm | 2 +-
code/modules/paperwork/photocopier.dm | 4 ++--
code/modules/paperwork/silicon_photography.dm | 2 +-
code/modules/power/antimatter/control.dm | 2 +-
code/modules/power/pedal_gen.dm | 8 ++++----
.../power/singularity/field_generator.dm | 2 +-
code/modules/power/solar.dm | 8 ++++----
code/modules/power/tracker.dm | 4 ++--
code/modules/projectiles/guns/flamer.dm | 2 +-
code/modules/projectiles/guns/launcher.dm | 2 +-
.../projectiles/guns/launcher/crossbow.dm | 8 ++++----
code/modules/projectiles/guns/projectile.dm | 4 ++--
.../targeting/targeting_overlay.dm | 6 +++---
.../random_map/dungeon/rooms/monster_room.dm | 2 +-
code/modules/reagents/Chemistry-Machinery.dm | 8 ++++----
code/modules/reagents/Chemistry-Recipes.dm | 20 +++++++++----------
code/modules/reagents/dispenser/dispenser2.dm | 2 +-
code/modules/recycling/disposal.dm | 2 +-
code/modules/research/circuitprinter.dm | 2 +-
code/modules/shieldgen/shieldwallgen.dm | 2 +-
code/modules/spells/general/area_teleport.dm | 2 +-
code/modules/virus2/analyser.dm | 4 ++--
code/modules/virus2/biohazard destroyer.dm | 2 +-
.../xenoarcheaology/artifacts/gigadrill.dm | 2 +-
code/modules/xenoarcheaology/finds/special.dm | 6 +++---
.../tools/geosample_scanner.dm | 6 +++---
.../tools/suspension_generator.dm | 2 +-
.../xenoarcheaology/tools/tools_pickaxe.dm | 4 ++--
134 files changed, 270 insertions(+), 280 deletions(-)
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 8e860441f71..07bf1c1a537 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -228,7 +228,7 @@
to_chat(user, "\The [src] has a beaker already.")
return
if(occupant && panel_open && isCrowbar(I))
- occupant.loc = get_turf(src)
+ occupant.forceMove(get_turf(src))
occupant = null
update_use_power(1)
update_icon()
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index d601b32c102..058dd433790 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -90,10 +90,10 @@
/obj/machinery/cell_charger/attack_ai(mob/user)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
- if(!src.charging)
+ if(!charging)
return
- charging.loc = src.loc
+ charging.forceMove(loc)
charging.update_icon()
charging = null
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index d90a87fe846..22470c862ac 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -72,7 +72,7 @@
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
to_chat(user, SPAN("notice", "You remove the circuit board."))
icon_state = "0"
- circuit.loc = loc
+ circuit.dropInto(loc)
circuit = null
if(AI_STAGE_CABLE)
if(isScrewdriver(P) && circuit)
@@ -172,7 +172,7 @@
if(isCrowbar(P) && brain)
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
to_chat(user, SPAN("notice", "You remove the brain."))
- brain.loc = loc
+ brain.dropInto(loc)
brain = null
icon_state = "3"
@@ -227,7 +227,7 @@
transfer.aiRestorePowerRoutine = 0
transfer.control_disabled = 0
transfer.ai_radio.disabledAi = 0
- transfer.loc = get_turf(src)
+ transfer.dropInto(get_turf(src))
transfer.create_eyeobj()
transfer.cancel_camera()
to_chat(user, "Transfer successful: [transfer.name] ([rand(1000,9999)].exe) downloaded to host terminal. Local copy wiped.")
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 4b3e157ac5c..8f3081438e4 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -61,7 +61,7 @@
to_chat(user, "You remove the circuit board.")
src.state = 1
src.icon_state = "0"
- circuit.loc = src.loc
+ circuit.dropInto(loc)
src.circuit = null
if(2)
if(isScrewdriver(P) && circuit)
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index dd9e6c61be8..6d49de8059e 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -430,9 +430,9 @@
else
if(control_computer && control_computer.allow_items)
control_computer.frozen_items += I
- I.loc = null
+ I.forceMove(null)
else
- I.forceMove(src.loc)
+ I.dropInto(loc)
//Update any existing objectives involving this mob.
for(var/datum/antag_contract/AC in GLOB.all_contracts)
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index da8216eb00b..7e517c6f46d 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -230,7 +230,7 @@
else
repairing = stack.split(amount_needed, force=TRUE)
if(repairing)
- repairing.loc = src
+ repairing.forceMove(src)
transfer = repairing.amount
repairing.uses_charge = FALSE //for clean robot door repair - stacks hint immortal if true
@@ -259,7 +259,7 @@
if(repairing && isCrowbar(I))
to_chat(user, "You remove \the [repairing].")
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
- repairing.loc = user.loc
+ repairing.dropInto(user.loc)
repairing = null
return
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 10fbf149691..d83c19bb626 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -54,7 +54,7 @@
else
ae = electronics
electronics = null
- ae.loc = loc
+ ae.dropInto(loc)
if(operating == -1)
ae.icon_state = "door_electronics_smoked"
operating = 0
@@ -242,7 +242,7 @@
else
ae = electronics
electronics = null
- ae.loc = loc
+ ae.dropInto(loc)
ae.icon_state = "door_electronics_smoked"
operating = 0
diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm
index f48dd5e8cab..7fc774fdc02 100644
--- a/code/game/machinery/floorlayer.dm
+++ b/code/game/machinery/floorlayer.dm
@@ -55,7 +55,7 @@
var/obj/item/stack/tile/E = input("Choose remove tile type.", "Tiles") as null|anything in contents
if(E)
to_chat(user, "You remove the [E] from \the [src].")
- E.loc = src.loc
+ E.dropInto(loc)
T = null
return
@@ -103,7 +103,7 @@
/obj/machinery/floorlayer/proc/TakeTile(obj/item/stack/tile/tile)
if(!T) T = tile
- tile.loc = src
+ tile.forceMove(src)
SortStacks()
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 702ceabdfc4..aa62b4f1ed1 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -254,7 +254,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.anchored = 1//So space wind cannot drag it.
if(caller_id)
hologram.SetName("[caller_id.name] (Hologram)")
- hologram.loc = get_step(src,1)
+ hologram.forceMove(get_step(src, 1))
masters[caller_id] = hologram
else
hologram.SetName("[A.name] (Hologram)") //If someone decides to right click.
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 3c7943537b8..d83bc21d285 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -962,7 +962,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
NEWSPAPER.news_content += FC
if(news_network.wanted_issue)
NEWSPAPER.important_message = news_network.wanted_issue
- NEWSPAPER.loc = get_turf(src)
+ NEWSPAPER.forceMove(get_turf(src))
src.paper_remaining--
return
diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm
index 9e91528f1f9..c7c603c6a84 100644
--- a/code/game/machinery/robot_fabricator.dm
+++ b/code/game/machinery/robot_fabricator.dm
@@ -125,7 +125,7 @@ Please wait until completion...
spawn (build_time)
if (!isnull(src.being_built))
- src.being_built.loc = get_turf(src)
+ src.being_built.forceMove(get_turf(src))
src.being_built = null
src.update_use_power(POWER_USE_IDLE)
src.operating = 0
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index b6f4fe16302..c6916647b5c 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -527,7 +527,7 @@
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
- usr.loc = src
+ usr.forceMove(src)
occupant = usr
isopen = 0 //Close the thing after the guy gets inside
update_icon()
@@ -577,7 +577,7 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
- M.loc = src
+ M.forceMove(src)
occupant = M
isopen = 0 //close ittt
add_fingerprint(user)
@@ -805,7 +805,7 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
- M.loc = src
+ M.forceMove(src)
occupant = M
add_fingerprint(user)
@@ -935,11 +935,11 @@
/obj/machinery/suit_cycler/OnTopic(href, href_list)
if(href_list["eject_suit"])
if(!suit) return
- suit.loc = get_turf(src)
+ suit.dropInto(get_turf(src))
suit = null
else if(href_list["eject_helmet"])
if(!helmet) return
- helmet.loc = get_turf(src)
+ helmet.dropInto(get_turf(src))
helmet = null
else if(href_list["select_department"])
var/choice = input("Please select the target department paintjob.","Suit cycler",null) as null|anything in departments
@@ -1076,7 +1076,7 @@
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
- occupant.loc = get_turf(occupant)
+ occupant.forceMove(get_turf(occupant))
occupant = null
add_fingerprint(user)
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index f342a1b16ea..8d64e56b48e 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -196,7 +196,7 @@
new /obj/item/material/shard( src.loc )
var/obj/item/circuitboard/comm_server/M = new /obj/item/circuitboard/comm_server( A )
for (var/obj/C in src)
- C.loc = src.loc
+ C.dropInto(loc)
A.circuit = M
A.state = 3
A.icon_state = "3"
@@ -207,7 +207,7 @@
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/circuitboard/comm_server/M = new /obj/item/circuitboard/comm_server( A )
for (var/obj/C in src)
- C.loc = src.loc
+ C.dropInto(loc)
A.circuit = M
A.state = 4
A.icon_state = "4"
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index f5294805c0b..2f656b6b5a3 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -131,7 +131,7 @@
new /obj/item/material/shard( src.loc )
var/obj/item/circuitboard/comm_monitor/M = new /obj/item/circuitboard/comm_monitor( A )
for (var/obj/C in src)
- C.loc = src.loc
+ C.dropInto(loc)
A.circuit = M
A.state = 3
A.icon_state = "3"
@@ -142,7 +142,7 @@
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/circuitboard/comm_monitor/M = new /obj/item/circuitboard/comm_monitor( A )
for (var/obj/C in src)
- C.loc = src.loc
+ C.dropInto(loc)
A.circuit = M
A.state = 4
A.icon_state = "4"
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 1e3ca664b92..1d2d06c0fd6 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -128,7 +128,7 @@
new /obj/item/material/shard( src.loc )
var/obj/item/circuitboard/comm_traffic/M = new /obj/item/circuitboard/comm_traffic( A )
for (var/obj/C in src)
- C.loc = src.loc
+ C.dropInto(loc)
A.circuit = M
A.state = 3
A.icon_state = "3"
@@ -139,7 +139,7 @@
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/circuitboard/comm_traffic/M = new /obj/item/circuitboard/comm_traffic( A )
for (var/obj/C in src)
- C.loc = src.loc
+ C.dropInto(loc)
A.circuit = M
A.state = 4
A.icon_state = "4"
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 9bc2c2f3678..92947f424b0 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -84,7 +84,7 @@
sleep(20)
if(state in list(1,3,6) )
- usr.loc = src.loc
+ usr.forceMove(src.loc)
/obj/machinery/washing_machine/on_update_icon()
@@ -104,7 +104,7 @@
if( (state == 1) && hacked)
var/obj/item/grab/G = W
if(ishuman(G.assailant) && iscorgi(G.affecting))
- G.affecting.loc = src
+ G.affecting.forceMove(src)
qdel(G)
state = 3
else
diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm
index 40e85295910..340730d0d9f 100644
--- a/code/game/mecha/combat/marauder.dm
+++ b/code/game/mecha/combat/marauder.dm
@@ -84,7 +84,7 @@
/obj/mecha/combat/marauder/relaymove(mob/user,direction)
if(user != src.occupant) //While not "realistic", this piece is player friendly.
- user.loc = get_turf(src)
+ user.forceMove(get_turf(src))
to_chat(user, "You climb out from [src]")
return 0
if(!can_move)
diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm
index d8fb74d9be5..03d7304a103 100644
--- a/code/game/mecha/combat/phazon.dm
+++ b/code/game/mecha/combat/phazon.dm
@@ -34,8 +34,8 @@
if(can_move)
can_move = 0
flick("phazon-phase", src)
- src.loc = get_step(src,src.dir)
- src.use_power(phasing_energy_drain)
+ forceMove(get_step(src, dir))
+ use_power(phasing_energy_drain)
sleep(step_in*3)
can_move = 1
else
diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm
index 42562a6942a..d3baf122796 100644
--- a/code/game/mecha/equipment/mecha_equipment.dm
+++ b/code/game/mecha/equipment/mecha_equipment.dm
@@ -106,7 +106,7 @@
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M as obj)
M.equipment += src
chassis = M
- src.loc = M
+ forceMove(M)
M.log_message("[src] initialized.")
if(!M.selected)
M.selected = src
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index 00ed4b863de..c46f4e0c690 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -46,7 +46,7 @@
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
cargo_holder.cargo += O
- O.loc = chassis
+ O.forceMove(chassis)
O.anchored = 0
occupant_message(SPAN("notice", "[target] succesfully loaded."))
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
@@ -986,7 +986,7 @@
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
cargo_holder.cargo += O
- O.loc = chassis
+ O.forceMove(chassis)
O.anchored = 0
chassis.occupant_message(SPAN("notice", "[target] succesfully loaded."))
chassis.log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index e84b2b4fc05..cbd2e140384 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -1203,7 +1203,7 @@
user.drop(I, src)
brainmob.reset_view(src)
occupant = brainmob
- brainmob.loc = src // should allow relaymove
+ brainmob.forceMove(src) // should allow relaymove
//brainmob.canmove = TRUE
//mmi_as_oc.mecha = src
verbs -= /obj/mecha/verb/eject
@@ -1282,12 +1282,12 @@
if(istype(mob_container, /obj/item/organ/internal/cerebrum/mmi))
var/obj/item/organ/internal/cerebrum/mmi/mmi = mob_container
if(mmi.brainmob)
- occupant.loc = mmi
+ occupant.forceMove(mmi)
verbs += /obj/mecha/verb/eject
if(istype(mob_container, /obj/item/organ/internal/cerebrum/posibrain))
var/obj/item/organ/internal/cerebrum/posibrain/pb = mob_container
if(pb.brainmob)
- occupant.loc = pb
+ occupant.forceMove(pb)
verbs += /obj/mecha/verb/eject
occupant = null
diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm
index 7267eb4ff57..71376284c5c 100644
--- a/code/game/mecha/mecha_wreckage.dm
+++ b/code/game/mecha/mecha_wreckage.dm
@@ -63,7 +63,7 @@
if(!isemptylist(crowbar_salvage))
var/obj/S = pick(crowbar_salvage)
if(S)
- S.loc = get_turf(user)
+ S.dropInto(get_turf(user))
crowbar_salvage -= S
user.visible_message("[user] pries [S] from [src].", "You pry [S] from [src].")
return
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index b88a831e8bd..1b3c4764fbc 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -13,7 +13,7 @@
/obj/mecha/working/ripley/Destroy()
for(var/atom/movable/A in src.cargo)
- A.loc = loc
+ A.dropInto(loc)
var/turf/T = loc
if(istype(T))
T.Entered(A)
diff --git a/code/game/mecha/working/working.dm b/code/game/mecha/working/working.dm
index 5f72d9cafca..914af46879d 100644
--- a/code/game/mecha/working/working.dm
+++ b/code/game/mecha/working/working.dm
@@ -10,11 +10,11 @@
for(var/mob/M in src)
if(M==src.occupant)
continue
- M.loc = get_turf(src)
+ M.forceMove(get_turf(src))
M.loc.Entered(M)
step_rand(M)
for(var/atom/movable/A in src.cargo)
- A.loc = get_turf(src)
+ A.dropInto(get_turf(src))
var/turf/T = get_turf(A)
if(T)
T.Entered(A)
@@ -27,7 +27,7 @@
var/obj/O = locate(href_list["drop_from_cargo"])
if(O && (O in src.cargo))
src.occupant_message("You unload [O].")
- O.loc = get_turf(src)
+ O.dropInto(get_turf(src))
src.cargo -= O
var/turf/T = get_turf(O)
if(T)
diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm
index acf55a31143..4dfd3d64bcc 100644
--- a/code/game/objects/effects/chem/foam.dm
+++ b/code/game/objects/effects/chem/foam.dm
@@ -168,7 +168,7 @@
/obj/structure/foamedmetal/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/grab))
var/obj/item/grab/G = I
- G.affecting.loc = src.loc
+ G.affecting.forceMove(loc)
visible_message("[G.assailant] smashes [G.affecting] through the foamed metal wall.")
qdel(I)
qdel(src)
diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm
index 29b2f250863..634901e3b45 100644
--- a/code/game/objects/effects/decals/contraband.dm
+++ b/code/game/objects/effects/decals/contraband.dm
@@ -164,8 +164,8 @@
/obj/structure/sign/poster/proc/roll_and_drop(turf/newloc)
var/obj/item/contraband/poster/P = new(src, serial_number)
- P.loc = newloc
- src.loc = P
+ P.forceMove(newloc)
+ forceMove(P)
qdel(src)
/datum/poster
diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm
index 87ff5d1b358..c0d33b5c7ef 100644
--- a/code/game/objects/effects/decals/crayon.dm
+++ b/code/game/objects/effects/decals/crayon.dm
@@ -4,15 +4,11 @@
icon = 'icons/obj/rune.dmi'
anchored = 1
- New(location,main = "#ffffff",shade = "#000000", drawing = "rune1", visible_name = "drawing")
- ..()
- loc = location
-
- name = visible_name
- desc = "A [visible_name] drawn in crayon."
- AddOverlays(get_crayon_preview(main, shade, drawing))
-
- add_hiddenprint(usr)
+/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#ffffff", shade = "#000000", drawing = "rune1", visible_name = "drawing")
+ . = ..(mapload)
+ name = visible_name
+ desc = "A [visible_name] drawn in crayon."
+ AddOverlays(get_crayon_preview(main, shade, drawing))
// Returns icon if receiver is not specified, or name of created .png file otherwise
/proc/get_crayon_preview(main = "#ffffff",shade = "#000000", drawing = "rune1", mob/receiver)
diff --git a/code/game/objects/effects/proximity.dm b/code/game/objects/effects/proximity.dm
index a8c2a9c6a08..0a4eb2ca15d 100644
--- a/code/game/objects/effects/proximity.dm
+++ b/code/game/objects/effects/proximity.dm
@@ -82,7 +82,7 @@
if(I <= old_checkers_used)
var/obj/effect/abstract/proximity_checker/pc = checkers_local[I]
if(pc)
- pc.loc = turfs[I]
+ pc.forceMove(turfs[I])
else
checkers += new /obj/effect/abstract/proximity_checker(turfs[I], src)
else
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index b6b0fec052c..d10ab36e3e8 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -187,7 +187,7 @@
/obj/structure/spider/spiderling/Bump(atom/user)
if(istype(user, /obj/structure/table))
- src.loc = user.loc
+ forceMove(user.loc)
else
..()
@@ -222,12 +222,12 @@
src.visible_message("[src] scrambles into the ventillation 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)
if(!exit_vent || exit_vent.welded)
- loc = entry_vent
+ forceMove(entry_vent)
entry_vent = null
set_next_think(world.time + 1 SECOND)
return
@@ -238,11 +238,11 @@
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
- loc = entry_vent
+ forceMove(entry_vent)
entry_vent = null
set_next_think(world.time + 1 SECOND)
return
- loc = exit_vent.loc
+ forceMove(exit_vent.loc)
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
@@ -289,8 +289,8 @@
if(!O.owner || O.owner.is_ic_dead() || amount_grown > 80)
amount_grown = 20 //reset amount_grown so that people have some time to react to spiderlings before they grow big
O.implants -= src
- src.loc = O.owner ? O.owner.loc : O.loc
- src.visible_message("\A [src] emerges from inside [O.owner ? "[O.owner]'s [O.name]" : "\the [O]"]!")
+ forceMove(O.owner ? O.owner.loc : O.loc)
+ visible_message("\A [src] emerges from inside [O.owner ? "[O.owner]'s [O.name]" : "\the [O]"]!")
if(O.owner)
O.owner.apply_damage(1, BRUTE, O.organ_tag)
else if(prob(1))
diff --git a/code/game/objects/items/backwear/rpd.dm b/code/game/objects/items/backwear/rpd.dm
index 4f06e4383ee..bc8193af172 100644
--- a/code/game/objects/items/backwear/rpd.dm
+++ b/code/game/objects/items/backwear/rpd.dm
@@ -164,7 +164,7 @@
O.update()
user.visible_message(SPAN("notice", "[user]'s [src] spits out \the [selected.name]."))
- product.loc = get_turf(A)
+ product.dropInto(get_turf(A))
BC.use(selected.energy)
else
inuse = 0
diff --git a/code/game/objects/items/contraband.dm b/code/game/objects/items/contraband.dm
index ddd13f74c2e..c320793c655 100644
--- a/code/game/objects/items/contraband.dm
+++ b/code/game/objects/items/contraband.dm
@@ -73,7 +73,7 @@
to_chat(user, SPAN("notice", "The pages of [title] have been cut out!"))
return
to_chat(user, SPAN("notice", "[store] falls out of [title]!"))
- store.loc = get_turf(loc)
+ store.dropInto(get_turf(loc))
store = null
return
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 8d60cf3d4da..17d3a91a5e6 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -862,7 +862,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("2") // Eject pAI device
var/turf/T = get_turf_or_move(src.loc)
if(T)
- pai.loc = T
+ pai.dropInto(T)
pai = null
else
diff --git a/code/game/objects/items/devices/holopad.dm b/code/game/objects/items/devices/holopad.dm
index 4f7f9f07b1b..8cad768c65a 100644
--- a/code/game/objects/items/devices/holopad.dm
+++ b/code/game/objects/items/devices/holopad.dm
@@ -147,12 +147,12 @@
if(isliving(loc))
var/mob/living/L = loc
hologram.dir = turn(L.dir,180)
- hologram.loc = L.loc
+ hologram.forceMove(L.loc)
hologram.pixel_x = ((L.dir&4)?32:((L.dir&8)?-32:0))
hologram.pixel_y = ((L.dir&1)?32:((L.dir&2)?-32:0))
else if(isturf(loc))
hologram.dir = 2
- hologram.loc = loc
+ hologram.forceMove(loc)
hologram.pixel_x = 0
hologram.pixel_y = 0
else
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 41c01aa3dfe..c8df0f8548b 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -130,7 +130,6 @@
uses++
to_chat(user, SPAN("notice", "Light loaded: [uses]/[max_uses]"))
playsound(loc, 'sound/machines/click.ogg', 20, 1)
- L.loc = null
qdel(L)
/obj/item/device/lightreplacer/proc/box_contains_lights(obj/item/storage/box/box)
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 08957eb19d7..324fd7808cf 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -312,7 +312,7 @@
if(keyslot1)
var/turf/T = get_turf(user)
if(T)
- keyslot1.loc = T
+ keyslot1.dropInto(T)
keyslot1 = null
@@ -320,7 +320,7 @@
if(keyslot2)
var/turf/T = get_turf(user)
if(T)
- keyslot2.loc = T
+ keyslot2.dropInto(T)
keyslot2 = null
recalculateChannels()
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index efb5a43e8f6..e3b2dff1acd 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -616,7 +616,7 @@
if(keyslot)
var/turf/T = get_turf(user)
if(T)
- keyslot.loc = T
+ keyslot.dropInto(T)
keyslot = null
recalculateChannels()
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 22f302d09a1..7985c436a29 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -132,7 +132,7 @@
if(istype(attached_device, /obj/item/device/assembly))
var/obj/item/device/assembly/A = attached_device
A.holder = null
- attached_device.loc = get_turf(src)
+ attached_device.dropInto(get_turf(src))
attached_device = null
update_icon()
if(href_list["device"])
diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm
index d2766161fe0..beb0ce38193 100644
--- a/code/game/objects/items/glassjar.dm
+++ b/code/game/objects/items/glassjar.dm
@@ -43,14 +43,14 @@
switch(contains)
if(1)
for(var/obj/O in src)
- O.loc = user.loc
+ O.dropInto(user.loc)
to_chat(user, "You take money out of \the [src].")
contains = 0
update_icon()
return
if(2)
for(var/mob/M in src)
- M.loc = user.loc
+ M.dropInto(user.loc)
user.visible_message("[user] releases [M] from \the [src].", "You release [M] from \the [src].")
contains = 0
update_icon()
diff --git a/code/game/objects/items/grenades/spawnergrenade.dm b/code/game/objects/items/grenades/spawnergrenade.dm
index 49a1d5545e7..94019d8a0a6 100644
--- a/code/game/objects/items/grenades/spawnergrenade.dm
+++ b/code/game/objects/items/grenades/spawnergrenade.dm
@@ -26,7 +26,7 @@
if(newvars && length(newvars))
for(var/v in newvars)
x.vars[v] = newvars[v]
- x.loc = T
+ x.forceMove(T)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(x, pick(NORTH,SOUTH,EAST,WEST))
diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm
index 976c1356798..1c55f98dac9 100644
--- a/code/game/objects/items/implants/implantchair.dm
+++ b/code/game/objects/items/implants/implantchair.dm
@@ -98,7 +98,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.loc = src.loc
+ occupant.forceMove(loc)
if(injecting)
implant(src.occupant)
injecting = 0
@@ -118,7 +118,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
- M.loc = src
+ M.forceMove(src)
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
@@ -136,7 +136,7 @@
O.show_message("\The [M] has been implanted by \the [src].", 1)
if(imp.implanted(M))
- imp.loc = M
+ imp.forceMove(M)
imp.imp_in = M
imp.implanted = 1
implant_list -= imp
diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm
index 626a4e0ae67..43961738690 100644
--- a/code/game/objects/items/shooting_range.dm
+++ b/code/game/objects/items/shooting_range.dm
@@ -23,7 +23,7 @@
// After target moves, check for nearby stakes. If associated, move to target
for(var/obj/structure/target_stake/M in view(3,src))
if(M.density == 0 && M.pinned_target == src)
- M.loc = loc
+ M.forceMove(loc)
// This may seem a little counter-intuitive but I assure you that's for a purpose.
// Stakes are the ones that carry targets, yes, but in the stake code we set
@@ -61,7 +61,7 @@
user.pick_or_drop(src)
to_chat(user, "You take the target out of the stake.")
else
- src.loc = get_turf(user)
+ forceMove(get_turf(user))
to_chat(user, "You take the target out of the stake.")
stake.pinned_target = null
diff --git a/code/game/objects/items/storage/internal.dm b/code/game/objects/items/storage/internal.dm
index 1528178020b..cba5414d4b8 100644
--- a/code/game/objects/items/storage/internal.dm
+++ b/code/game/objects/items/storage/internal.dm
@@ -6,7 +6,7 @@
/obj/item/storage/internal/New(obj/item/MI)
master_item = MI
- loc = master_item
+ forceMove(master_item)
name = master_item.name
verbs -= /obj/item/verb/verb_pickup //make sure this is never picked up.
..()
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index 0ccbe1690cb..cd496e60bd7 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -121,7 +121,7 @@ RSF
used_energy = 50
to_chat(user, "Dispensing [product ? product : "product"]...")
- product.loc = get_turf(A)
+ product.dropInto(get_turf(A))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm
index 53b5507b5c0..f548434ca8a 100644
--- a/code/game/objects/items/weapons/trays.dm
+++ b/code/game/objects/items/weapons/trays.dm
@@ -25,7 +25,7 @@
// Drop all the things. All of them.
ClearOverlays()
for(var/obj/item/I in carrying)
- I.loc = M.loc
+ I.dropInto(M.loc)
carrying.Remove(I)
if(isturf(I.loc))
spawn()
@@ -173,7 +173,7 @@
if(calc_carry() + add >= max_carry)
break
- I.loc = src
+ I.forceMove(src)
carrying.Add(I)
AddOverlays(image(I.icon, I.icon_state, layer = (30 + I.layer)))
@@ -191,7 +191,7 @@
ClearOverlays()
for(var/obj/item/I in carrying)
- I.loc = loc
+ I.dropInto(loc)
carrying.Remove(I)
if(!foundtable && isturf(loc))
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index e34d30f3ba8..f354c7d4c22 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -163,7 +163,7 @@ LINEN BINS
to_chat(user, "You take [B] out of [src].")
if(hidden)
- hidden.loc = user.loc
+ hidden.dropInto(user.loc)
to_chat(user, "[hidden] falls out of [B]!")
hidden = null
@@ -182,12 +182,12 @@ LINEN BINS
else
B = new /obj/item/bedsheet(loc)
- B.loc = loc
+ B.dropInto(loc)
to_chat(user, "You telekinetically remove [B] from [src].")
update_icon()
if(hidden)
- hidden.loc = loc
+ hidden.dropInto(loc)
hidden = null
diff --git a/code/game/objects/structures/christmas.dm b/code/game/objects/structures/christmas.dm
index dd64c30fdf3..ba3961584b4 100644
--- a/code/game/objects/structures/christmas.dm
+++ b/code/game/objects/structures/christmas.dm
@@ -34,7 +34,7 @@
if (can_hang && !my_hat)
src.visible_message("[mover] lands on \the [src].")
my_hat = mover
- my_hat.loc = src
+ my_hat.forceMove(src)
update_icon()
return 0
else
diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm
index 2b08462aebe..b4981d60f87 100644
--- a/code/game/objects/structures/coathanger.dm
+++ b/code/game/objects/structures/coathanger.dm
@@ -34,7 +34,7 @@
if(can_hang && !coat)
src.visible_message("[mover] lands on \the [src].")
coat = mover
- coat.loc = src
+ coat.forceMove(src)
update_icon()
return FALSE
return TRUE
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index d997482b784..56fe493d3ac 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -152,7 +152,7 @@
if((setup & CLOSET_HAS_LOCK))
ndoor.lockable = TRUE
- ndoor.loc = src
+ ndoor.forceMove(src)
cdoor = ndoor
update_icon()
@@ -826,7 +826,7 @@
return FALSE
broken = FALSE
locked = FALSE
- C.loc = src
+ C.forceMove(src)
cdoor = C
req_access = cdoor.req_access
diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm
index 84f489a07b7..a49a8fc21af 100644
--- a/code/game/objects/structures/crates_lockers/closets/statue.dm
+++ b/code/game/objects/structures/crates_lockers/closets/statue.dm
@@ -22,7 +22,7 @@
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
- L.loc = src
+ L.forceMove(src)
L.sdisabilities |= MUTE
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
@@ -59,16 +59,16 @@
dump_contents()
qdel(src)
return
-
+
set_next_think(world.time + 1 SECOND)
/obj/structure/closet/statue/dump_contents()
for(var/obj/O in src)
- O.loc = src.loc
+ O.dropInto(loc)
for(var/mob/living/M in src)
- M.loc = src.loc
+ M.forceMove(loc)
M.sdisabilities &= ~MUTE
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
if(M.client)
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index 0b21ee39780..f7e2f243a68 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -248,7 +248,7 @@
to_chat(user, "You removed the airlock electronics!")
src.state = 1
src.SetName("Wired Airlock Assembly")
- electronics.loc = src.loc
+ electronics.dropInto(loc)
electronics = null
in_use = FALSE
diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm
index 866634940f7..e37513acd0e 100644
--- a/code/game/objects/structures/electricchair.dm
+++ b/code/game/objects/structures/electricchair.dm
@@ -16,7 +16,7 @@
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
C.set_dir(dir)
- part.loc = loc
+ part.forceMove(loc)
part.master = null
part = null
qdel(src)
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index a4fac74a2d5..789f3b16c7a 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -57,7 +57,7 @@
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
if(has_extinguisher)
- has_extinguisher.loc = loc
+ has_extinguisher.dropInto(loc)
to_chat(user, "You telekinetically remove [has_extinguisher] from [src].")
has_extinguisher = null
opened = 1
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 299b21a3b0b..8b56d6bee2e 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -236,7 +236,7 @@
. = ..()
if(buckled_mob)
if(buckled_mob.buckled == src)
- buckled_mob.loc = loc
+ buckled_mob.forceMove(loc)
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm
index 8878ac79225..fcaa897f3c6 100644
--- a/code/game/objects/structures/noticeboard.dm
+++ b/code/game/objects/structures/noticeboard.dm
@@ -55,7 +55,7 @@
return
var/obj/item/P = locate(href_list["remove"])
if(P && P.loc == src)
- P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck
+ P.dropInto(get_turf(src)) //dump paper on the floor because you're a clumsy fuck
P.add_fingerprint(usr)
add_fingerprint(usr)
notices--
diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm
index 8a182878387..4656a66c984 100644
--- a/code/game/objects/structures/railing.dm
+++ b/code/game/objects/structures/railing.dm
@@ -172,7 +172,7 @@
to_chat(usr, "You can't flip the [src] because something blocking it.")
return 0
- src.loc = get_step(src, src.dir)
+ forceMove(get_step(src, dir))
set_dir(turn(dir, 180))
update_icon()
return
diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm
index cecca9d85f0..30aeaeb9241 100644
--- a/code/game/objects/structures/tank_dispenser.dm
+++ b/code/game/objects/structures/tank_dispenser.dm
@@ -112,7 +112,7 @@
oxytanks.Remove(O)
else
O = new /obj/item/tank/oxygen(loc)
- O.loc = loc
+ O.dropInto(loc)
to_chat(user, "You take [O] out of [src].")
oxygentanks--
update_icon()
@@ -125,7 +125,7 @@
platanks.Remove(P)
else
P = new /obj/item/tank/plasma(loc)
- P.loc = loc
+ P.dropInto(loc)
to_chat(user, "You take [P] out of [src].")
plasmatanks--
update_icon()
diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm
index 826b3483fc7..42070727cba 100644
--- a/code/game/objects/structures/target_stake.dm
+++ b/code/game/objects/structures/target_stake.dm
@@ -13,7 +13,7 @@
..()
// Move the pinned target along with the stake
if(pinned_target in view(3, src))
- pinned_target.loc = loc
+ pinned_target.forceMove(loc)
else // Sanity check: if the pinned target can't be found in immediate view
pinned_target = null
@@ -40,13 +40,13 @@
pinned_target.set_density(0)
pinned_target.layer = OBJ_LAYER
- pinned_target.loc = user.loc
+ pinned_target.dropInto(user.loc)
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(pinned_target)
to_chat(user, "You take the target out of the stake.")
else
- pinned_target.loc = get_turf(user)
+ pinned_target.dropInto(get_turf(user))
to_chat(user, "You take the target out of the stake.")
pinned_target = null
diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm
index dcb026eae73..881c830d3a6 100644
--- a/code/game/objects/structures/transit_tubes.dm
+++ b/code/game/objects/structures/transit_tubes.dm
@@ -50,7 +50,7 @@
/obj/structure/transit_tube_pod/Destroy()
for(var/atom/movable/AM in contents)
- AM.loc = loc
+ AM.forceMove(loc)
return ..()
@@ -59,7 +59,7 @@
switch(severity)
if(1.0)
for(var/atom/movable/AM in contents)
- AM.loc = loc
+ AM.forceMove(loc)
AM.ex_act(severity++)
qdel(src)
@@ -67,7 +67,7 @@
if(2.0)
if(prob(50))
for(var/atom/movable/AM in contents)
- AM.loc = loc
+ AM.forceMove(loc)
AM.ex_act(severity++)
qdel(src)
@@ -103,7 +103,7 @@
to_chat(AM, "The tube's support pylons block your way.")
return ..()
else
- AM.loc = src.loc
+ AM.forceMove(loc)
to_chat(AM, "You slip under the tube.")
@@ -119,7 +119,7 @@
to_chat(AM, "The pod is already occupied.")
return
else if(!pod.moving && (pod.dir in directions()))
- AM.loc = pod
+ AM.forceMove(pod)
return
@@ -326,7 +326,7 @@
last_delay = current_tube.enter_delay(src, next_dir)
sleep(last_delay)
set_dir(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.
set_density(current_tube.density)
if(current_tube && current_tube.should_stop_pod(src, next_dir))
@@ -379,7 +379,7 @@
if(istype(mob, /mob) && mob.client)
// If the pod is not in a tube at all, you can get out at any time.
if(!(locate(/obj/structure/transit_tube) in loc))
- mob.loc = loc
+ mob.forceMove(loc)
mob.client.Move(get_step(loc, direction), direction)
//if(moving && istype(loc, /turf/space))
@@ -392,7 +392,7 @@
if(!station.pod_moving)
if(direction == station.dir)
if(station.icon_state == "open")
- mob.loc = loc
+ mob.forceMove(loc)
mob.client.Move(get_step(loc, direction), direction)
else
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index 7b1650afd4d..0411b5cafa3 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -177,7 +177,7 @@
src.SetName("Near finished Windoor Assembly")
src.electronics = W
else
- W.loc = src.loc
+ W.dropInto(loc)
//Screwdriver to remove airlock electronics. Step 6 undone.
else if(isScrewdriver(W) && src.electronics)
@@ -193,7 +193,7 @@
src.SetName("Wired Windoor Assembly")
var/obj/item/airlock_electronics/ae = electronics
electronics = null
- ae.loc = src.loc
+ ae.dropInto(loc)
//Crowbar to complete the assembly, Step 7 complete.
else if(isCrowbar(W))
@@ -228,7 +228,7 @@
else
windoor.req_access = src.electronics.conf_access
windoor.electronics = src.electronics
- src.electronics.loc = windoor
+ src.electronics.forceMove(windoor)
else
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(src.loc)
if(src.facing == "l")
@@ -246,7 +246,7 @@
else
windoor.req_access = src.electronics.conf_access
windoor.electronics = src.electronics
- src.electronics.loc = windoor
+ src.electronics.forceMove(windoor)
qdel(src)
diff --git a/code/modules/ZAS/Fire.dm b/code/modules/ZAS/Fire.dm
index 9473441a2ed..94347104ec5 100644
--- a/code/modules/ZAS/Fire.dm
+++ b/code/modules/ZAS/Fire.dm
@@ -214,7 +214,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
set_light(0)
T.fire = null
- loc = null
+ forceMove(null)
SSair.active_hotspots.Remove(src)
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 48d511aef6e..d46885460b5 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -178,12 +178,12 @@
if(!T) return 0
if(a_left)
a_left.holder = null
- a_left.loc = T
+ a_left.forceMove(T)
if(a_left.proximity_monitor)
a_left.proximity_monitor.SetHost(a_left, a_left)
if(a_right)
a_right.holder = null
- a_right.loc = T
+ a_right.forceMove(T)
if(a_right.proximity_monitor)
a_right.proximity_monitor.SetHost(a_right, a_right)
spawn(0)
diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm
index 806839b5547..b0dd6b86c73 100644
--- a/code/modules/assembly/shock_kit.dm
+++ b/code/modules/assembly/shock_kit.dm
@@ -18,8 +18,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
diff --git a/code/modules/atmospherics/components/binary_devices/pipeturbine.dm b/code/modules/atmospherics/components/binary_devices/pipeturbine.dm
index 427c94f0d09..2e99ad583ab 100644
--- a/code/modules/atmospherics/components/binary_devices/pipeturbine.dm
+++ b/code/modules/atmospherics/components/binary_devices/pipeturbine.dm
@@ -34,8 +34,6 @@
initialize_directions = NORTH|SOUTH
Destroy()
- loc = null
-
if(node1)
node1.disconnect(src)
QDEL_NULL(network1)
diff --git a/code/modules/atmospherics/components/unary/unary_base.dm b/code/modules/atmospherics/components/unary/unary_base.dm
index 9cc2ba70252..f5b2e44f24a 100644
--- a/code/modules/atmospherics/components/unary/unary_base.dm
+++ b/code/modules/atmospherics/components/unary/unary_base.dm
@@ -31,8 +31,6 @@
return null
Destroy()
- loc = null
-
if(node)
node.disconnect(src)
QDEL_NULL(network)
diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm
index 6152d4c627a..933ecca72b4 100644
--- a/code/modules/clothing/suits/armor.dm
+++ b/code/modules/clothing/suits/armor.dm
@@ -233,7 +233,7 @@
spark_system.start()
playsound(user.loc, SFX_SPARK, 50, 1)
- user.loc = picked
+ user.forceMove(picked)
return PROJECTILE_FORCE_MISS
return 0
diff --git a/code/modules/clothing/under/accessories/lockets.dm b/code/modules/clothing/under/accessories/lockets.dm
index 03d12a4e469..255d7dab897 100644
--- a/code/modules/clothing/under/accessories/lockets.dm
+++ b/code/modules/clothing/under/accessories/lockets.dm
@@ -30,8 +30,8 @@
icon_state = "[base_icon]_open"
if(held)
to_chat(user, "\The [held] falls out!")
- held.loc = get_turf(user)
- src.held = null
+ held.dropInto(user.loc)
+ held = null
else
icon_state = "[base_icon]"
diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm
index e8fdaf6bec5..c1139c2ce84 100644
--- a/code/modules/economy/ATM.dm
+++ b/code/modules/economy/ATM.dm
@@ -53,7 +53,7 @@
number_incorrect_tries = 0
for(var/obj/item/spacecash/S in src)
- S.loc = src.loc
+ S.dropInto(loc)
if(prob(50))
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
else
@@ -454,7 +454,7 @@
if(!held_card)
return
- held_card.loc = src.loc
+ held_card.dropInto(loc)
authenticated_account = null
account_security_level = 0
diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm
index 6b6c12baccd..b2a7a258728 100644
--- a/code/modules/economy/EFTPOS.dm
+++ b/code/modules/economy/EFTPOS.dm
@@ -78,7 +78,7 @@
R.AddOverlays(stampoverlay)
R.stamps += "