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 += "
This paper has been stamped by the EFTPOS device." var/obj/item/smallDelivery/D = new(R.loc) - R.loc = D + R.forceMove(D) D.wrapped = R D.SetName("small parcel - 'EFTPOS access code'") diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm index 020ab176c6c..5508c7a5286 100644 --- a/code/modules/food/recipes_microwave.dm +++ b/code/modules/food/recipes_microwave.dm @@ -410,9 +410,9 @@ I said no! /datum/recipe/fortunecookie/make_food(obj/container) var/obj/item/paper/paper = locate() in container - paper.loc = null //prevent deletion + paper.forceMove(null) //prevent deletion var/obj/item/reagent_containers/food/fortunecookie/being_cooked = ..(container) - paper.loc = being_cooked + paper.forceMove(being_cooked) being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn return being_cooked diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index b433f2a54b8..9cdd6c41e18 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -219,7 +219,7 @@ H.update_icon() src.update_icon() usr.visible_message("\The [usr] plays \the [discarding].") - H.loc = get_step(usr,usr.dir) + H.forceMove(get_step(usr,usr.dir)) if(!cards.len) qdel(src) diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index d8322574c0d..025a24e46a4 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -66,7 +66,7 @@ if(eject_disk) eject_disk = 0 if(loaded_disk) - loaded_disk.loc = get_turf(src) + loaded_disk.dropInto(get_turf(src)) visible_message("\icon[src] [src] beeps and spits out [loaded_disk].") loaded_disk = null @@ -167,7 +167,7 @@ if(href_list["eject_packet"]) if(!seed) return - seed.loc = get_turf(src) + seed.dropInto(get_turf(src)) if(seed.seed.name == "new line" || isnull(SSplants.seeds[seed.seed.name])) seed.seed.uid = sequential_id(/datum/seed/) @@ -181,7 +181,7 @@ if(href_list["eject_disk"]) if(!loaded_disk) return - loaded_disk.loc = get_turf(src) + loaded_disk.dropInto(get_turf(src)) visible_message("\icon[src] [src] beeps and spits out [loaded_disk].") loaded_disk = null diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index 375aa9c4734..d8cd556d0a2 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -337,7 +337,7 @@ if (N.amount <= 0 || N.seeds.len <= 0) piles -= N qdel(N) - O.loc = src.loc + O.dropInto(loc) else piles -= N qdel(N) @@ -378,7 +378,7 @@ var/obj/item/storage/S = O.loc S.remove_from_storage(O, src) - O.loc = src + O.forceMove(src) var/newID = 0 for (var/datum/seed_pile/N in piles) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 8e81329e8ad..4cd367a8a09 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -43,7 +43,7 @@ to_chat(user, SPAN("notice", "You dismantle \the [src].")) new /obj/item/stack/material/wood(get_turf(src), 5) for(var/obj/item/book/b in contents) - b.loc = (get_turf(src)) + b.dropInto(get_turf(src)) qdel(src) else @@ -80,14 +80,16 @@ return if(2.0) for(var/obj/item/book/b in contents) - if (prob(50)) b.loc = (get_turf(src)) - else qdel(b) + if(prob(50)) + b.dropInto(get_turf(src)) + else + qdel(b) qdel(src) return if(3.0) - if (prob(50)) + if(prob(50)) for(var/obj/item/book/b in contents) - b.loc = (get_turf(src)) + b.dropInto(get_turf(src)) qdel(src) return return @@ -205,11 +207,11 @@ var/window_width = 650 var/window_height = 650 -/obj/item/book/attack_self(mob/user as mob) +/obj/item/book/attack_self(mob/user) if(carved) if(store) to_chat(user, SPAN("notice", "[store] falls out of [title]!")) - store.loc = get_turf(src.loc) + store.dropInto(user.loc) store = null return else diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index a31126c4149..e7c80910162 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -163,12 +163,12 @@ return ..() -/obj/machinery/mining/drill/attack_hand(mob/user as mob) +/obj/machinery/mining/drill/attack_hand(mob/user) check_supports() if (panel_open && cell && user.Adjacent(src)) to_chat(user, "You take out \the [cell].") - cell.loc = get_turf(user) + cell.dropInto(user.loc) component_parts -= cell cell = null return @@ -273,7 +273,7 @@ var/obj/structure/ore_box/B = locate() in orange(1) if(B) for(var/obj/item/ore/O in contents) - O.loc = B + O.forceMove(B) to_chat(usr, "You unload the drill's storage cache into the ore box.") else to_chat(usr, "You must move an ore box up to the drill before you can unload it.") diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index dc5db690532..1ad10c960b7 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -117,11 +117,11 @@ var/obj/item/stack/material/S = O if(!isnull(stack_storage[initial(S.name)])) stack_storage[initial(S.name)] += S.amount - O.loc = null + O.forceMove(null) else - O.loc = output.loc + O.dropInto(output.loc) else - O.loc = output.loc + O.dropInto(output.loc) //Output amounts that are past stack_amt. for(var/sheet in stack_storage) diff --git a/code/modules/mining/machine_unloading.dm b/code/modules/mining/machine_unloading.dm index 585e3d666c7..fafd21f306f 100644 --- a/code/modules/mining/machine_unloading.dm +++ b/code/modules/mining/machine_unloading.dm @@ -30,7 +30,7 @@ var/i = 0 for (var/obj/item/ore/O in BOX.contents) BOX.contents -= O - O.loc = output.loc + O.dropInto(output.loc) i++ if (i>=10) return @@ -40,7 +40,7 @@ for (i = 0; i<10; i++) O = locate(/obj/item, input.loc) if (O) - O.loc = src.output.loc + O.dropInto(output.loc) else return return diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 7e268f27840..1f23dc4cab2 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -90,7 +90,7 @@ for (var/obj/item/ore/O in contents) contents -= O - O.loc = src.loc + O.dropInto(loc) to_chat(usr, "You empty the ore box") return @@ -98,7 +98,7 @@ /obj/structure/ore_box/ex_act(severity) if(severity == 1.0 || (severity < 3.0 && prob(50))) for (var/obj/item/ore/O in contents) - O.loc = src.loc + O.dropInto(loc) O.ex_act(severity++) qdel(src) return diff --git a/code/modules/mob/grab/grab_object.dm b/code/modules/mob/grab/grab_object.dm index f0eaffff793..742a8dec25f 100644 --- a/code/modules/mob/grab/grab_object.dm +++ b/code/modules/mob/grab/grab_object.dm @@ -82,7 +82,6 @@ assailant.__unequip(src) assailant.client?.screen -= src assailant = null - loc = null return ..() /* diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index b872c57b129..72108994f51 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -234,7 +234,7 @@ new /obj/item/device/analyzer/plant_analyzer(Tsec) if(tank) - tank.loc = Tsec + tank.dropInto(Tsec) if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index f9f57f5c02a..c1b9d436667 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -242,7 +242,7 @@ new /obj/item/robot_parts/l_arm(Tsec) if(reagent_glass) - reagent_glass.loc = Tsec + reagent_glass.dropInto(Tsec) reagent_glass = null var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread diff --git a/code/modules/mob/living/bot/remotebot.dm b/code/modules/mob/living/bot/remotebot.dm index ca78e13aaf3..ec241fa9eef 100644 --- a/code/modules/mob/living/bot/remotebot.dm +++ b/code/modules/mob/living/bot/remotebot.dm @@ -33,7 +33,7 @@ for(var/i in 1 to rand(3,5)) var/obj/item/stack/material/cardboard/C = new(src.loc) if(prob(50)) - C.loc = get_step(src, pick(GLOB.alldirs)) + C.forceMove(get_step(src, pick(GLOB.alldirs))) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, src) diff --git a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm index fe1da2b259d..1346c4d466d 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm @@ -35,7 +35,7 @@ to_chat(H, "You feel your being twine with that of \the [src] as it merges with your biomass.") H.status_flags |= PASSEMOTES to_chat(src, "You feel your being twine with that of \the [H] as you merge with its biomass.") - loc = H + forceMove(H) verbs += /mob/living/carbon/alien/diona/proc/split verbs -= /mob/living/carbon/alien/diona/proc/merge return 1 @@ -58,7 +58,7 @@ var/mob/living/M = src.loc - src.loc = get_turf(src) + dropInto(loc) src.verbs -= /mob/living/carbon/alien/diona/proc/split src.verbs += /mob/living/carbon/alien/diona/proc/merge diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index d3c119f6e9e..9206112f862 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -83,7 +83,7 @@ if(prob(getBruteLoss() - 50)) for(var/atom/movable/A in stomach_contents) - A.loc = loc + A.dropInto(loc) stomach_contents.Remove(A) gib() @@ -91,7 +91,7 @@ for(var/mob/M in src) if(M in src.stomach_contents) src.stomach_contents.Remove(M) - M.loc = src.loc + M.dropInto(loc) for(var/mob/N in viewers(src, null)) if(N.client) N.show_message(text("[M] bursts out of [src]!"), 2) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index dde78b8f502..d26f5b270d8 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -73,7 +73,7 @@ meteor_act var/obj/item/material/shard/shrapnel/SP = new() SP.SetName((P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel") SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]." - SP.loc = organ + SP.forceMove(organ) organ.embed(SP) projectile_affect_poise(P, P.poisedamage * blocked_mult(blocked), def_zone) @@ -935,7 +935,7 @@ meteor_act var/turf/T = near_wall(dir, 2) if(T) - loc = T + forceMove(T) visible_message(SPAN("warning", "[src] is pinned to the wall by [O]!"), SPAN("warning", "You are pinned to the wall by [O]!")) anchored = 1 pinned += O diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index cb8d0d36af3..0c60d912e57 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -91,7 +91,7 @@ //Leaping mobs just land on the tile, no pushing, no anything. if(status_flags & LEAPING) - loc = tmob.loc + forceMove(tmob.loc) status_flags &= ~LEAPING now_pushing = 0 return diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index f23baaf925d..446f7e7bcfb 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -243,7 +243,7 @@ var/turf/T = near_wall(dir, 2) if(T) - src.loc = T + forceMove(T) visible_message(SPAN("warning", "[src] is pinned to the wall by [O]!"), SPAN("warning", "You are pinned to the wall by [O]!")) anchored = 1 pinned += O @@ -267,7 +267,7 @@ playsound(src, sound_to_play, sound_loudness, 1) /mob/living/proc/embed(obj/O, def_zone=null, datum/wound/supplied_wound) - O.loc = src + O.forceMove(src) src.embedded += O src.verbs += /mob/proc/yank_out_object diff --git a/code/modules/mob/living/parasite/meme.dm b/code/modules/mob/living/parasite/meme.dm index 14feab9df84..8eed6771e47 100644 --- a/code/modules/mob/living/parasite/meme.dm +++ b/code/modules/mob/living/parasite/meme.dm @@ -32,7 +32,7 @@ be able to influence the host through various commands. if(src.host) exit_host() src.host = host - src.loc = host + forceMove(host) host.parasites.Add(src) host.status_flags |= PASSEMOTES @@ -41,7 +41,7 @@ be able to influence the host through various commands. return 1 /mob/living/parasite/proc/exit_host() - src.loc = get_turf(host) + dropInto(host.loc) src.host.parasites.Remove(src) src.host = null @@ -129,7 +129,8 @@ be able to influence the host through various commands. /mob/living/parasite/meme/death() // make sure the mob is on the actual map before gibbing - if(host) src.loc = host.loc + if(host) + dropInto(host.loc) host.parasites -= src src.ghostize() src.stat = DEAD diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm index 544f0908f59..655c6323c44 100644 --- a/code/modules/mob/living/silicon/pai/death.dm +++ b/code/modules/mob/living/silicon/pai/death.dm @@ -2,7 +2,7 @@ if(card) card.removePersonality() if(gibbed) - src.loc = get_turf(card) + forceMove(get_turf(card)) qdel(card) else close_up() diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 4956fdb0538..45b39a2c04c 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -84,7 +84,7 @@ /mob/living/silicon/pai/New(obj/item/device/paicard) status_flags |= NO_ANTAG - src.loc = paicard + forceMove(paicard) card = paicard sradio = new(src) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7c0448be26f..588188ec53b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1311,7 +1311,7 @@ if(istype(U,/obj/item/borg/upgrade/floodlight)) continue contents.Remove(U) - U.loc = get_turf(src) + U.forceMove(get_turf(src)) U.installed = 0 sensor_mode = 0 if (ion_trail) diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index d99bc696e5a..b74c9d44cd4 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -69,7 +69,7 @@ playsound(src.loc, 'sound/signals/error30.ogg', 50, 0) if(response == "Eject") if(loaded_item) - loaded_item.loc = get_turf(src) + loaded_item.forceMove(get_turf(src)) desc = initial(desc) icon_state = initial(icon_state) loaded_item = null @@ -92,7 +92,7 @@ if(loaded_item) to_chat(user, "Your [src] already has something inside. Analyze or eject it first.") return - I.loc = src + I.forceMove(src) loaded_item = I for(var/mob/M in viewers()) M.show_message(text("[user] adds the [I] to the [src]."), 1) @@ -250,7 +250,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))) addedSomething = 1 @@ -283,7 +283,7 @@ var droppedSomething = 0 for(var/obj/item/I in carrying) - I.loc = dropspot + I.dropInto(dropspot) carrying.Remove(I) droppedSomething = 1 if(!foundtable && isturf(dropspot)) @@ -917,7 +917,7 @@ product.name = "synthesised blood pack" user.visible_message("\The [user]'s \the [src] spits out \the [selected.name].") - product.loc = get_turf(A) + product.dropInto(get_turf(A)) if(isrobot(user)) var/mob/living/silicon/robot/R = user if(R.cell) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 449b27bbcc3..ae28605fc81 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -920,7 +920,7 @@ GLOBAL_LIST_INIT(robot_modules, list( /obj/item/robot_module/syndicate/New(mob/living/silicon/robot/R) supported_upgrades += list(/obj/item/borg/upgrade/tasercooler,/obj/item/borg/upgrade/lasercooler,/obj/item/borg/upgrade/visor/thermal,/obj/item/borg/upgrade/paramedic,/obj/item/borg/upgrade/detective) - loc = R + forceMove(R) src.modules += new /obj/item/device/flash(src) src.modules += new /obj/item/crowbar(src) src.modules += new /obj/item/extinguisher/mini(src) diff --git a/code/modules/mob/living/silicon/robot/robot_parts.dm b/code/modules/mob/living/silicon/robot/robot_parts.dm index 0526ace1dc3..147a9fb6063 100644 --- a/code/modules/mob/living/silicon/robot/robot_parts.dm +++ b/code/modules/mob/living/silicon/robot/robot_parts.dm @@ -142,7 +142,7 @@ var/obj/item/stack/material/M = W if (M.use(1)) var/obj/item/secbot_assembly/ed209_assembly/B = new /obj/item/secbot_assembly/ed209_assembly - B.loc = get_turf(src) + B.forceMove(get_turf(src)) to_chat(user, "You armed the robot frame.") if (user.get_inactive_hand()==src) user.drop(src) @@ -213,7 +213,7 @@ var/obj/item/robot_parts/chest/chest = parts[BP_CHEST] O.cell = chest.cell - O.cell.loc = O + O.cell.forceMove(O) W.forceMove(O) // Should fix cybros run time erroring when blown up. It got deleted before, along with the frame. // Since we "magically" installed a cell, we also have to update the correct component. diff --git a/code/modules/mob/living/simple_animal/bees.dm b/code/modules/mob/living/simple_animal/bees.dm index 11f639c9c8b..5af31b84ced 100644 --- a/code/modules/mob/living/simple_animal/bees.dm +++ b/code/modules/mob/living/simple_animal/bees.dm @@ -148,7 +148,7 @@ var/turf/simulated/floor/T = get_turf(get_step(src, pick(1,2,4,8))) density = 1 if(T.Enter(src, get_turf(src))) - src.loc = T + forceMove(T) density = 0 break diff --git a/code/modules/mob/living/simple_animal/borer/borer.dm b/code/modules/mob/living/simple_animal/borer/borer.dm index b1ce1254256..d61a018de7a 100644 --- a/code/modules/mob/living/simple_animal/borer/borer.dm +++ b/code/modules/mob/living/simple_animal/borer/borer.dm @@ -74,7 +74,7 @@ var/stored_loc = loc //leave_host() will try to get host's turf but it is bad detatch() leave_host() - loc = stored_loc + forceMove(stored_loc) return health = min(health + 1, maxHealth) if(!stat && !host.is_ic_dead()) diff --git a/code/modules/mob/living/simple_animal/borer/borer_powers.dm b/code/modules/mob/living/simple_animal/borer/borer_powers.dm index 668bb94a8f8..4ce38fa6939 100644 --- a/code/modules/mob/living/simple_animal/borer/borer_powers.dm +++ b/code/modules/mob/living/simple_animal/borer/borer_powers.dm @@ -132,7 +132,7 @@ BORER_STATUS_HUSK = list(\ src.host = H src.host.status_flags |= PASSEMOTES - src.loc = H + forceMove(H) //Update their traitor status. if(host.mind) @@ -412,7 +412,7 @@ BORER_STATUS_HUSK = list(\ var/obj/item/organ/external/head = H.get_organ(BP_HEAD) head?.implants -= src - src.loc = get_turf(host) + dropInto(host.loc) reset_view(null) unset_machine() diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 6efcc11f79f..5b68ef2cc1b 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -155,7 +155,7 @@ switch(remove_from) if("hat") if(hat) - hat.loc = loc + hat.dropInto(loc) hat = null ClearOverlays() else diff --git a/code/modules/mob/living/simple_animal/friendly/parrot.dm b/code/modules/mob/living/simple_animal/friendly/parrot.dm index 870cdd81c8b..d94019ba960 100644 --- a/code/modules/mob/living/simple_animal/friendly/parrot.dm +++ b/code/modules/mob/living/simple_animal/friendly/parrot.dm @@ -191,7 +191,7 @@ src.say("[pick(available_channels)] РРРЯЯЯЯ ОСТАВЬ НАУШНИК РРЯЯЯЯЯЯ!") else src.say("РРЯЯЯЯЯ ОСТАВЬ НАУШНИК РРРЯЯЯЯЯ!") - ears.loc = src.loc + ears.dropInto(loc) ears = null for(var/possible_phrase in speak) if(copytext(possible_phrase,1,3) in department_radio_keys) @@ -207,7 +207,7 @@ src.say("[pick(available_channels)] РРРЯЯЯЯЯ ПОЛОЖИ НА МЕСТО РРЯЯЯЯЯЯ!") else src.say("РРРЯЯЯЯ ПОЛОЖИ НА МЕСТО РРРЯЯЯЯЯЯ!") - held_item.loc = src.loc + held_item.dropInto(loc) held_item = null //Adding things to inventory @@ -474,7 +474,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 the [held_item]!", "You grab the [held_item]!", "You hear the sounds of wings flapping furiously.") set_interest(null) @@ -493,7 +493,7 @@ return if(in_range(src, parrot_perch)) - src.loc = parrot_perch.loc + forceMove(parrot_perch.loc) drop_held_item() parrot_state = PARROT_PERCH icon_state = "parrot_sit" @@ -647,7 +647,7 @@ continue held_item = I - I.loc = src + I.forceMove(src) visible_message("[src] grabs the [held_item]!", "You grab the [held_item]!", "You hear the sounds of wings flapping furiously.") return held_item @@ -712,7 +712,7 @@ if(!drop_gently) if(istype(held_item, /obj/item/grenade)) var/obj/item/grenade/G = held_item - G.loc = src.loc + G.dropInto(loc) G.detonate() to_chat(src, "You let go of the [held_item]!") held_item = null @@ -720,7 +720,7 @@ to_chat(src, "You drop the [held_item].") - held_item.loc = src.loc + held_item.dropInto(loc) held_item = null return 1 @@ -736,7 +736,7 @@ for(var/atom/movable/AM in view(src,1)) for(var/perch_path in desired_perches) if(istype(AM, perch_path)) - src.loc = AM.loc + forceMove(AM.loc) icon_state = "parrot_sit" return to_chat(src, "There is no perch nearby to sit on.") diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index bfb2f696e3f..026d4a85e71 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -127,7 +127,7 @@ to_chat(user, "You swipe your access card and pop the brain out of \the [src].") eject_brain() if(held_item) - held_item.loc = src.loc + held_item.dropInto(loc) held_item = null return 1 else @@ -176,7 +176,7 @@ if(mmi) var/turf/T = get_turf(loc) if(T) - mmi.loc = T + mmi.forceMove(T) if(mind) mind.transfer_to(mmi.brainmob) mmi = null real_name = initial(real_name) @@ -206,7 +206,7 @@ camera.status = 0 if(held_item) - held_item.loc = src.loc + held_item.dropInto(loc) held_item = null gibs(loc, null, null, /obj/effect/gibspawner/robot) //TODO: use gib() or refactor spiderbots into synthetics. @@ -231,7 +231,7 @@ "You launch \the [held_item]!", \ "You hear a skittering noise and a thump!") var/obj/item/grenade/G = held_item - G.loc = src.loc + G.dropInto(loc) G.detonate() held_item = null return 1 @@ -240,7 +240,7 @@ "You drop \the [held_item].", \ "You hear a skittering noise and a soft thump.") - held_item.loc = src.loc + held_item.dropInto(loc) held_item = null return 1 @@ -267,7 +267,7 @@ for(var/obj/item/I in view(1, src)) if(selection == I) held_item = selection - selection.loc = src + selection.forceMove(src) visible_message("\The [src] scoops up \the [held_item].", \ "You grab \the [held_item].", \ "You hear a skittering noise and a clink.") diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 6782fb401de..8d042f6a00b 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -362,7 +362,7 @@ return verb /mob/living/simple_animal/put_in_hands(obj/item/W) // No hands. - W.loc = get_turf(src) + W.forceMove(get_turf(src)) return 1 // Harvest an animal's delicious byproducts diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index a12f407e72d..76566b99264 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -31,9 +31,6 @@ return if(unbuckle_mob) buckled?.unbuckle_mob() - if(isturf(destination)) - var/turf/T = destination - update_height_offset(T.turf_height) /client/Northeast() diagonal_action(NORTHEAST) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index b7b3c0ef9d2..b105ed708f5 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -134,7 +134,7 @@ else O.key = key - O.loc = loc + O.forceMove(loc) O.job = "Cyborg" if(O.mind.assigned_role == "Cyborg") if(O.mind.role_alt_title == "Android") diff --git a/code/modules/organs/external/_external.dm b/code/modules/organs/external/_external.dm index 0ecd936b12e..863a673495a 100644 --- a/code/modules/organs/external/_external.dm +++ b/code/modules/organs/external/_external.dm @@ -209,7 +209,7 @@ removable_objects |= I if(removable_objects.len) var/obj/item/I = pick(removable_objects) - I.loc = get_turf(user) //just in case something was embedded that is not an item + I.dropInto(user.loc) //just in case something was embedded that is not an item if(istype(I)) if(!(user.l_hand && user.r_hand)) user.pick_or_drop(I) @@ -473,7 +473,7 @@ This function completely restores a damaged organ to perfect condition. // remove embedded objects and drop them on the floor for(var/obj/implanted_object in implants) if(!istype(implanted_object,/obj/item/implant)) // We don't want to remove REAL implants. Just shrapnel etc. - implanted_object.loc = get_turf(src) + implanted_object.dropInto(get_turf(src)) implants -= implanted_object if(owner && !ignore_prosthetic_prefs) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index af160e50521..20595722fa9 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -233,7 +233,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) //cache for faxes that have been sent to admins visible_message("[src] beeps, \"Error transmitting message.\"") return - rcvdcopy.loc = null //hopefully this shouldn't cause trouble + rcvdcopy.forceMove(null) //hopefully this shouldn't cause trouble GLOB.adminfaxes += rcvdcopy var/mob/intercepted = check_for_interception() diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 6566bb82fd9..729ef9b0158 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -47,7 +47,7 @@ /obj/structure/filingcabinet/Initialize() for(var/obj/item/I in loc) if(istype(I, /obj/item/paper) || istype(I, /obj/item/folder) || istype(I, /obj/item/photo) || istype(I, /obj/item/paper_bundle)) - I.loc = src + I.forceMove(src) . = ..() /obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob) @@ -94,7 +94,7 @@ if(contents.len) if(prob(40 + contents.len * 5)) var/obj/item/I = pick(contents) - I.loc = loc + I.dropInto(loc) if(prob(25)) step_rand(I) to_chat(user, "You pull \a [I] out of [src] at random.") diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 8982cc9dc0a..2e607b9c664 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -36,7 +36,7 @@ else if(istype(W, /obj/item/paper_bundle)) user.drop(W) for(var/obj/O in W) - O.loc = src + O.forceMove(src) O.add_fingerprint(usr) pages.Add(O) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 4cce331eeb3..ada093f92d0 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -40,7 +40,7 @@ to_chat(user, "\The [src] was too full, and shredded paper goes everywhere!") for(var/i=(paperamount-max_paper);i>0;i--) var/obj/item/shreddedp/SP = get_shredded_paper() - SP.loc = get_turf(src) + SP.forceMove(get_turf(src)) SP.throw_at(get_edge_target_turf(src, pick(GLOB.alldirs)), 1, 1) paperamount = max_paper update_icon() diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 4d32c12eb37..1f893f6cf48 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -247,10 +247,10 @@ I = copy(I) else if(istype(I, /obj/item/photo)) I = photocopy(I) - I.loc = p + I.forceMove(p) p.pages += I - p.loc = src.loc + p.dropInto(loc) p.update_icon() p.icon_state = "paper_words" p.SetName(bundle.name) diff --git a/code/modules/paperwork/silicon_photography.dm b/code/modules/paperwork/silicon_photography.dm index dfa2e73242c..d9bffd2b9ad 100644 --- a/code/modules/paperwork/silicon_photography.dm +++ b/code/modules/paperwork/silicon_photography.dm @@ -16,7 +16,7 @@ name = "Drone photo camera" /obj/item/device/camera/siliconcam/proc/injectaialbum(obj/item/photo/p, sufix = "") //stores image information to a list similar to that of the datacore - p.loc = src + p.forceMove(src) photos_taken++ p.SetName("Image [photos_taken][sufix]") aipictures += p diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index b407ac1920f..534c5c444fd 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -304,7 +304,7 @@ if(href_list["ejectjar"]) if(fueljar) - fueljar.loc = src.loc + fueljar.dropInto(loc) fueljar = null //fueljar.control_unit = null currently it does not care where it is //on_update_icon() when we have the icon for it diff --git a/code/modules/power/pedal_gen.dm b/code/modules/power/pedal_gen.dm index c992d8e96f3..11344f8f28b 100644 --- a/code/modules/power/pedal_gen.dm +++ b/code/modules/power/pedal_gen.dm @@ -33,7 +33,7 @@ . = ..() generator = new /obj/machinery/power/dynamo(src) if(anchored) - generator.loc = src.loc + generator.forceMove(loc) generator.connect_to_network() /obj/structure/bed/chair/pedalgen/_examine_text(mob/user) @@ -59,13 +59,13 @@ if(anchored) user.visible_message(SPAN("notice", "[user] secured \the [src]!"), \ SPAN("notice", "You secured \the [src]!")) - generator.loc = src.loc + generator.forceMove(loc) generator.connect_to_network() else user.visible_message(SPAN("notice", "[user] unsecured \the [src]!"), \ SPAN("notice", "You unsecured \the [src]!")) generator.disconnect_from_network() - generator.loc = null + generator.forceMove(null) /obj/structure/bed/chair/pedalgen/attack_hand(mob/user) if(buckled_mob && buckled_mob == user) @@ -111,7 +111,7 @@ . = ..() if(buckled_mob) if(buckled_mob.buckled == src) - buckled_mob.loc = loc + buckled_mob.forceMove(loc) update_mob(buckled_mob) /obj/structure/bed/chair/pedalgen/post_buckle_mob(mob/user) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 0b1d3400a15..468db24da4b 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -285,7 +285,7 @@ field_generator power level display CF.set_master(src,G) fields += CF G.fields += CF - CF.loc = T + CF.forceMove(T) CF.set_dir(field_dir) var/listcheck = 0 for(var/obj/machinery/field_generator/FG in connected_gens) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 8b81130b447..a8ae51e01d5 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -56,7 +56,7 @@ var/list/solars_list = list() S = new /obj/item/solar_assembly(src) S.glass_type = /obj/item/stack/material/glass S.anchored = 1 - S.loc = src + S.forceMove(src) if(S.glass_type == /obj/item/stack/material/glass/reinforced) //if the panel is in reinforced glass health *= 2 //this need to be placed here, because panels already on the map don't have an assembly linked to update_icon() @@ -71,7 +71,7 @@ var/list/solars_list = list() if(do_after(user, 50,src)) var/obj/item/solar_assembly/S = locate() in src if(S) - S.loc = src.loc + S.dropInto(loc) S.give_glass() playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user.visible_message("[user] takes the glass off the solar panel.") @@ -425,7 +425,7 @@ var/list/solars_list = list() new /obj/item/material/shard( src.loc ) var/obj/item/circuitboard/solar_control/M = new /obj/item/circuitboard/solar_control( A ) for (var/obj/C in src) - C.loc = src.loc + C.dropInto(loc) A.circuit = M A.state = 3 A.icon_state = "3" @@ -436,7 +436,7 @@ var/list/solars_list = list() var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) var/obj/item/circuitboard/solar_control/M = new /obj/item/circuitboard/solar_control( 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/modules/power/tracker.dm b/code/modules/power/tracker.dm index b4ec90e39ce..ab73b09f042 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -44,7 +44,7 @@ S.glass_type = /obj/item/stack/material/glass S.tracker = 1 S.anchored = 1 - S.loc = src + S.forceMove(src) update_icon() //updates the tracker icon and the facing angle for the control computer @@ -65,7 +65,7 @@ if(do_after(user, 50,src)) var/obj/item/solar_assembly/S = locate() in src if(S) - S.loc = src.loc + S.dropInto(loc) S.give_glass() playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user.visible_message("[user] takes the glass off the tracker.") diff --git a/code/modules/projectiles/guns/flamer.dm b/code/modules/projectiles/guns/flamer.dm index 8461bce9d5a..a331503bd6c 100644 --- a/code/modules/projectiles/guns/flamer.dm +++ b/code/modules/projectiles/guns/flamer.dm @@ -121,7 +121,7 @@ var/turf/T = get_turf(src) to_chat(user, "You twist the valve and pop the pressure tank out of [src].") playsound(loc, 'sound/effects/refill.ogg', 25, 1, 3) - pressure_tank.loc = T + pressure_tank.dropInto(T) pressure_tank = null update_icon() return diff --git a/code/modules/projectiles/guns/launcher.dm b/code/modules/projectiles/guns/launcher.dm index 76bd79b4475..7154efd1526 100644 --- a/code/modules/projectiles/guns/launcher.dm +++ b/code/modules/projectiles/guns/launcher.dm @@ -32,7 +32,7 @@ /obj/item/gun/launcher/process_projectile(obj/item/projectile, mob/user, atom/target, target_zone, params=null, pointblank=0, reflex=0) update_release_force(projectile) - projectile.loc = get_turf(user) + projectile.forceMove(get_turf(user)) projectile.dir = user.dir // It's dumb, but it works. Kinda. projectile.throw_at(target, throw_distance, 1, user, src, user.zone_sel.selecting, release_force) play_fire_sound(user,projectile) diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index dd638a6925a..734f2b7dbb2 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -69,7 +69,7 @@ if(throwforce == 15) // The rod has been superheated - we don't want it to be useable when removed from the bow. to_chat(user, "[src] shatters into a scattering of overstressed metal shards as it leaves the crossbow.") var/obj/item/material/shard/shrapnel/S = new() - S.loc = get_turf(src) + S.dropInto(user.loc) qdel(src) /obj/item/gun/launcher/crossbow @@ -116,7 +116,7 @@ if(tension) if(bolt) user.visible_message("[user] relaxes the tension on [src]'s string and removes [bolt].","You relax the tension on [src]'s string and remove [bolt].") - bolt.loc = get_turf(src) + bolt.dropInto(user.loc) var/obj/item/arrow/A = bolt bolt = null A.removed(user) @@ -180,7 +180,7 @@ if (R.use(1)) bolt = new /obj/item/arrow/rod(src) bolt.fingerprintslast = src.fingerprintslast - bolt.loc = src + bolt.forceMove(src) update_icon() user.visible_message("[user] jams [bolt] into [src].","You jam [bolt] into [src].") superheat_rod(user) @@ -199,7 +199,7 @@ else if(isScrewdriver(W)) if(cell) var/obj/item/C = cell - C.loc = get_turf(user) + C.dropInto(user.loc) to_chat(user, "You jimmy [cell] out of [src] with [W].") cell = null else diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 816cc942f55..95d4383e2aa 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -134,7 +134,7 @@ if(loaded.len >= max_shells) break if(C.caliber == caliber) - C.loc = src + C.forceMove(src) loaded += C AM.stored_ammo -= C //should probably go inside an ammo_magazine proc, but I guess less proc calls this way... count++ @@ -220,7 +220,7 @@ /obj/item/gun/projectile/afterattack(atom/A, mob/living/user) ..() if(auto_eject && ammo_magazine && ammo_magazine.stored_ammo && !ammo_magazine.stored_ammo.len) - ammo_magazine.loc = get_turf(src.loc) + ammo_magazine.dropInto(user.loc) user.visible_message( "[ammo_magazine] falls out and clatters on the floor!", "[ammo_magazine] falls out and clatters on the floor!" diff --git a/code/modules/projectiles/targeting/targeting_overlay.dm b/code/modules/projectiles/targeting/targeting_overlay.dm index 910b8d4e562..c1585c18d31 100644 --- a/code/modules/projectiles/targeting/targeting_overlay.dm +++ b/code/modules/projectiles/targeting/targeting_overlay.dm @@ -23,7 +23,7 @@ /obj/aiming_overlay/New(newowner) ..() owner = newowner - loc = null + forceMove(null) verbs.Cut() /obj/aiming_overlay/proc/toggle_permission(perm) @@ -184,7 +184,7 @@ register_signal(aiming_at, SIGNAL_MOVED, /obj/aiming_overlay/proc/target_moved) register_signal(aiming_at, SIGNAL_QDELETING, /obj/aiming_overlay/proc/cancel_aiming) else - loc = null + forceMove(null) set_next_think(0) return @@ -235,7 +235,7 @@ movement_tally = 0 aiming_with = null - loc = null + forceMove(null) set_next_think(0) /obj/aiming_overlay/proc/target_moved() diff --git a/code/modules/random_map/dungeon/rooms/monster_room.dm b/code/modules/random_map/dungeon/rooms/monster_room.dm index 8a9941c0e10..e4c84c9e73f 100644 --- a/code/modules/random_map/dungeon/rooms/monster_room.dm +++ b/code/modules/random_map/dungeon/rooms/monster_room.dm @@ -14,5 +14,5 @@ return 0 var/type = util_pick_weight(available_mobs) var/mob/M = new type - M.loc = T + M.forceMove(T) return 1 diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 85859ab7bed..87e9bddad30 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -132,7 +132,7 @@ if (href_list["ejectp"]) if(loaded_pill_bottle) - loaded_pill_bottle.loc = src.loc + loaded_pill_bottle.dropInto(loc) loaded_pill_bottle = null else if(href_list["close"]) close_browser(usr, "window=chemmaster") @@ -203,7 +203,7 @@ return else if (href_list["eject"]) if(beaker) - beaker:loc = src.loc + beaker:dropInto(loc) beaker = null reagents.clear_reagents() update_icon() @@ -237,7 +237,7 @@ reagents.trans_to_obj(P,amount_per_pill) if(src.loaded_pill_bottle) if(loaded_pill_bottle.contents.len < loaded_pill_bottle.max_storage_space) - P.loc = loaded_pill_bottle + P.forceMove(loaded_pill_bottle) src.updateUsrDialog() else if(href_list["createbottle"]) @@ -575,7 +575,7 @@ return for(var/obj/item/O in holdingitems) - O.loc = src.loc + O.dropInto(loc) holdingitems -= O holdingitems.Cut() diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index b33ab3d71db..40ce2b1afa5 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -893,7 +893,7 @@ /datum/chemical_reaction/metroid/create/on_reaction(datum/reagents/holder) holder.my_atom.visible_message("Infused with plasma, the core begins to quiver and grow, and soon a new baby metroid emerges from it!") var/mob/living/carbon/metroid/S = new /mob/living/carbon/metroid - S.loc = get_turf(holder.my_atom) + S.forceMove(get_turf(holder.my_atom)) ..() /datum/chemical_reaction/metroid/monkey @@ -906,7 +906,7 @@ /datum/chemical_reaction/metroid/monkey/on_reaction(datum/reagents/holder) for(var/i = 1, i <= 3, i++) var /obj/item/reagent_containers/food/monkeycube/M = new /obj/item/reagent_containers/food/monkeycube - M.loc = get_turf(holder.my_atom) + M.forceMove(get_turf(holder.my_atom)) ..() /datum/chemical_reaction/metroid/heal @@ -935,10 +935,10 @@ /datum/chemical_reaction/metroid/metal/on_reaction(datum/reagents/holder) var/obj/item/stack/material/steel/M = new /obj/item/stack/material/steel M.amount = 15 - M.loc = get_turf(holder.my_atom) + M.forceMove(get_turf(holder.my_atom)) var/obj/item/stack/material/plasteel/P = new /obj/item/stack/material/plasteel P.amount = 5 - P.loc = get_turf(holder.my_atom) + P.forceMove(get_turf(holder.my_atom)) ..() /datum/chemical_reaction/metroid/glass @@ -951,10 +951,10 @@ /datum/chemical_reaction/metroid/glass/on_reaction(datum/reagents/holder) var/obj/item/stack/material/glass/M = new /obj/item/stack/material/glass M.amount = 15 - M.loc = get_turf(holder.my_atom) + M.forceMove(get_turf(holder.my_atom)) var/obj/item/stack/material/glass/reinforced/P = new /obj/item/stack/material/glass/reinforced P.amount = 5 - P.loc = get_turf(holder.my_atom) + P.forceMove(get_turf(holder.my_atom)) ..() /datum/chemical_reaction/metroid/marble @@ -967,7 +967,7 @@ /datum/chemical_reaction/metroid/marble/on_reaction(datum/reagents/holder) var/obj/item/stack/material/marble/M = new /obj/item/stack/material/marble M.amount = 30 - M.loc = get_turf(holder.my_atom) + M.forceMove(get_turf(holder.my_atom)) ..() //Gold @@ -1055,7 +1055,7 @@ var/chosen = pick(borks) var/obj/B = new chosen if(B) - B.loc = get_turf(holder.my_atom) + B.forceMove(get_turf(holder.my_atom)) if(prob(50)) for(var/j = 1, j <= rand(1, 3), j++) step(B, pick(NORTH, SOUTH, EAST, WEST)) @@ -1187,7 +1187,7 @@ /datum/chemical_reaction/metroid/psteroid/on_reaction(datum/reagents/holder, created_volume) ..() var/obj/item/metroidsteroid/P = new /obj/item/metroidsteroid - P.loc = get_turf(holder.my_atom) + P.forceMove(get_turf(holder.my_atom)) /datum/chemical_reaction/metroid/jam name = "Metroid Jam" @@ -1208,7 +1208,7 @@ ..() var/obj/item/stack/material/plasma/P = new /obj/item/stack/material/plasma P.amount = 3 - P.loc = get_turf(holder.my_atom) + P.forceMove(get_turf(holder.my_atom)) //Red /datum/chemical_reaction/metroid/mutation diff --git a/code/modules/reagents/dispenser/dispenser2.dm b/code/modules/reagents/dispenser/dispenser2.dm index 11d3d9680ab..8b4c7e43abf 100644 --- a/code/modules/reagents/dispenser/dispenser2.dm +++ b/code/modules/reagents/dispenser/dispenser2.dm @@ -92,7 +92,7 @@ var/obj/item/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label) if(C) to_chat(user, "You remove \the [C] from \the [src].") - C.loc = loc + C.dropInto(loc) else if(istype(W, /obj/item/reagent_containers/vessel) || istype(W, /obj/item/reagent_containers/food)) if(container) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index dffa06c3bdf..141e4633c10 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -786,7 +786,7 @@ // Leaving it intact and sitting in a wall is stupid. if(T.density) for(var/atom/movable/AM in H) - AM.loc = T + AM.forceMove(T) AM.pipe_eject(0) qdel(H) return diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 7fdfbd110a5..5d2324c445c 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -167,7 +167,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). if(D.build_path) var/obj/new_item = D.Fabricate(src, src) - new_item.loc = loc + new_item.dropInto(loc) if(mat_efficiency != 1) // No matter out of nowhere if(new_item.matter && new_item.matter.len > 0) for(var/i in new_item.matter) diff --git a/code/modules/shieldgen/shieldwallgen.dm b/code/modules/shieldgen/shieldwallgen.dm index 6b902932f69..1c497aadb3d 100644 --- a/code/modules/shieldgen/shieldwallgen.dm +++ b/code/modules/shieldgen/shieldwallgen.dm @@ -191,7 +191,7 @@ T = get_step(T2, NSEW) T2 = T var/obj/machinery/shieldwall/CF = new /obj/machinery/shieldwall/(src, G) //(ref to this gen, ref to connected gen) - CF.loc = T + CF.forceMove(T) CF.set_dir(field_dir) diff --git a/code/modules/spells/general/area_teleport.dm b/code/modules/spells/general/area_teleport.dm index 35ff52e422e..2a3f29f6aaa 100644 --- a/code/modules/spells/general/area_teleport.dm +++ b/code/modules/spells/general/area_teleport.dm @@ -82,7 +82,7 @@ break if(!success) - user.loc = pick(L) + user.forceMove(pick(L)) return diff --git a/code/modules/virus2/analyser.dm b/code/modules/virus2/analyser.dm index ce118a19675..1824ec55570 100644 --- a/code/modules/virus2/analyser.dm +++ b/code/modules/virus2/analyser.dm @@ -72,7 +72,7 @@ dish.info = r dish.SetName("[initial(dish.name)] ([dish.virus2.name()])") dish.analysed = 1 - dish.loc = src.loc + dish.dropInto(loc) dish = null icon_state = "analyser" @@ -86,7 +86,7 @@ else pause = 1 spawn(25) - dish.loc = src.loc + dish.dropInto(loc) dish = null src.state(SPAN("warning", "\The [src] buzzes, \"Insufficient growth density to complete analysis.\"")) diff --git a/code/modules/virus2/biohazard destroyer.dm b/code/modules/virus2/biohazard destroyer.dm index bfb72ba50b9..91c62f53846 100644 --- a/code/modules/virus2/biohazard destroyer.dm +++ b/code/modules/virus2/biohazard destroyer.dm @@ -14,7 +14,7 @@ AddOverlays(image('icons/obj/pipes/disposal.dmi',) "dispover-handle") return user.drop_item() - I.loc = src.loc + I.dropInto(loc) for(var/mob/O in hearers(src, null)) O.show_message("\icon[src] \The [src] beeps", 2) \ No newline at end of file diff --git a/code/modules/xenoarcheaology/artifacts/gigadrill.dm b/code/modules/xenoarcheaology/artifacts/gigadrill.dm index ef02e490cf1..60ae37e3467 100644 --- a/code/modules/xenoarcheaology/artifacts/gigadrill.dm +++ b/code/modules/xenoarcheaology/artifacts/gigadrill.dm @@ -29,6 +29,6 @@ spawn(drill_time) if(get_turf(src) == drilling_turf && active) M.GetDrilled() - src.loc = M + forceMove(M) drilling_turf = null anchored = 0 diff --git a/code/modules/xenoarcheaology/finds/special.dm b/code/modules/xenoarcheaology/finds/special.dm index bd0de77ad43..bb9c4f873f8 100644 --- a/code/modules/xenoarcheaology/finds/special.dm +++ b/code/modules/xenoarcheaology/finds/special.dm @@ -85,7 +85,7 @@ var/obj/effect/decal/cleanable/blood/B = locate() in range(2,src) if(B) last_eat = world.time - B.loc = null + B.forceMove(null) if(istype(B, /obj/effect/decal/cleanable/blood/drip)) charges += 0.25 else @@ -193,7 +193,7 @@ /obj/effect/shadow_wight/think() if(src.loc) - src.loc = get_turf(pick(orange(1,src))) + forceMove(get_turf(pick(orange(1,src)))) var/mob/living/carbon/M = locate() in src.loc if(M) playsound(src.loc, pick('sound/hallucinations/behind_you1.ogg',\ @@ -211,7 +211,7 @@ 'sound/hallucinations/turn_around2.ogg',\ ), 50, 1, -3) M.sleeping = max(M.sleeping,rand(5,10)) - src.loc = null + forceMove(null) else return diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm index 5494ffcc418..91e4ef72f3b 100644 --- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm +++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm @@ -320,8 +320,8 @@ last_scan_data = text - P.loc = src.loc - scanned_item.loc = src.loc + P.dropInto(loc) + scanned_item.dropInto(loc) scanned_item = null /obj/machinery/radiocarbon_spectrometer/OnTopic(user, href_list) @@ -358,6 +358,6 @@ else if(href_list["ejectItem"]) if(scanned_item) - scanned_item.loc = src.loc + scanned_item.dropInto(loc) scanned_item = null . = TOPIC_REFRESH diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm index 343e6253b1d..6440e43d5d6 100644 --- a/code/modules/xenoarcheaology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -104,7 +104,7 @@ else if(href_list["ejectcard"]) if(auth_card) if(ishuman(user)) - auth_card.loc = user.loc + auth_card.dropInto(user.loc) if(!user.get_active_hand()) user.put_in_hands(auth_card) auth_card = null diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index 7c3e728f77b..4dfb3581d17 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -107,7 +107,7 @@ var/list/obj/item/pickaxe/picksToSort = list() for(var/obj/item/pickaxe/P in src) picksToSort += P - P.loc = null + P.forceMove(null) while(picksToSort.len) var/min = 200 // No pick is bigger than 200 var/selected = 0 @@ -117,6 +117,6 @@ selected = i min = current.excavation_amount var/obj/item/pickaxe/smallest = picksToSort[selected] - smallest.loc = src + smallest.forceMove(src) picksToSort -= smallest prepare_ui()