diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 874b17b8f1d..7e597f0e106 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -196,7 +196,8 @@
plane = HUD_PLANE
/obj/screen/drop/Click()
- usr.drop_item_v()
+ if(usr.stat == CONSCIOUS)
+ usr.dropItemToGround(usr.get_active_held_item())
/obj/screen/act_intent
name = "intent"
diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm
index 81b51e9ae73..f0178576bf4 100644
--- a/code/datums/diseases/advance/symptoms/cough.dm
+++ b/code/datums/diseases/advance/symptoms/cough.dm
@@ -61,7 +61,7 @@ BONUS
if(power >= 1.5)
var/obj/item/I = M.get_active_held_item()
if(I && I.w_class == WEIGHT_CLASS_TINY)
- M.drop_item()
+ M.dropItemToGround(I)
if(power >= 2 && prob(10))
to_chat(M, "[pick("You have a coughing fit!", "You can't stop coughing!")]")
M.Stun(20)
diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm
index d740a4213c8..8974c388b1f 100644
--- a/code/datums/martial/cqc.dm
+++ b/code/datums/martial/cqc.dm
@@ -85,7 +85,7 @@
"[A] strikes your abdomen, neck and back consecutively!")
playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, 1, -1)
var/obj/item/I = D.get_active_held_item()
- if(I && D.drop_item())
+ if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.adjustStaminaLoss(50)
D.apply_damage(25, BRUTE)
@@ -145,7 +145,7 @@
D.visible_message("[A] strikes [D]'s jaw with their hand!", \
"[A] strikes your jaw, disorienting you!")
playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
- if(I && D.drop_item())
+ if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.Jitter(2)
D.apply_damage(5, BRUTE)
@@ -193,7 +193,6 @@
to_chat(user, "You remember the basics of CQC.")
var/datum/martial_art/cqc/D = new(null)
D.teach(user)
- user.drop_item()
visible_message("[src] beeps ominously, and a moment later it bursts up in flames.")
- new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
+ new /obj/effect/decal/cleanable/ash(user.drop_location())
diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm
index 84f0f00e45b..a898c1866bb 100644
--- a/code/datums/martial/krav_maga.dm
+++ b/code/datums/martial/krav_maga.dm
@@ -150,7 +150,7 @@
if(prob(60))
I = D.get_active_held_item()
if(I)
- if(D.drop_item())
+ if(D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.visible_message("[A] has disarmed [D]!", \
"[A] has disarmed [D]!")
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index ac5083cc17b..8fe8fcd3660 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -41,7 +41,7 @@
"[A] grabs your wrist and violently wrenches it to the side!")
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
D.emote("scream")
- D.drop_item()
+ D.dropItemToGround(D.get_active_held_item())
D.apply_damage(5, BRUTE, pick("l_arm", "r_arm"))
D.Stun(60)
return 1
@@ -79,7 +79,7 @@
D.visible_message("[A] kicks [D] in the head!", \
"[A] kicks you in the jaw!")
D.apply_damage(20, BRUTE, "head")
- D.drop_item()
+ D.drop_all_held_items()
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
D.Stun(80)
return 1
@@ -168,10 +168,9 @@
to_chat(user, message)
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
theSleepingCarp.teach(user)
- user.drop_item()
- visible_message("[src] lights up in fire and quickly burns to ash.")
- new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
+ visible_message("[src] lights up in fire and quickly burns to ash.")
+ new /obj/effect/decal/cleanable/ash(user.drop_location())
/obj/item/twohanded/bostaff
name = "bo staff"
diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm
index 5b44fd966fe..c3bef23a2a2 100644
--- a/code/datums/mutations.dm
+++ b/code/datums/mutations.dm
@@ -270,7 +270,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner)
if(prob(5) && owner.stat == CONSCIOUS)
- owner.drop_item()
+ owner.drop_all_held_items()
owner.emote("cough")
/datum/mutation/human/dwarfism
diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm
index ae938f18cef..c508907bf4d 100644
--- a/code/datums/wires/wires.dm
+++ b/code/datums/wires/wires.dm
@@ -250,9 +250,10 @@
if(istype(I, /obj/item/device/assembly))
var/obj/item/device/assembly/A = I
if(A.attachable)
- if(!L.drop_item())
+ if(!L.temporarilyRemoveItemFromInventory(A))
return
- attach_assembly(target_wire, A)
+ if(!attach_assembly(target_wire, A))
+ A.forceMove(L.drop_location())
. = TRUE
else
to_chat(L, "You need an attachable assembly!")
diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm
index 3b5b8625597..c529ab546d4 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -90,7 +90,7 @@
if("healing")
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(null))
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/forcewall(null))
- M.put_in_hands_or_del(new /obj/item/gun/magic/staff/healing(M))
+ M.put_in_hands(new /obj/item/gun/magic/staff/healing(M), TRUE)
to_chat(M, "Your service has not gone unrewarded, however. Studying under [wizard_name], you have learned livesaving survival spells. You are able to cast charge and forcewall.")
if("robeless")
M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm
index 41c843c3f01..f8b25afa5e5 100644
--- a/code/game/gamemodes/changeling/powers/mutations.dm
+++ b/code/game/gamemodes/changeling/powers/mutations.dm
@@ -37,8 +37,9 @@
return 1
/obj/effect/proc_holder/changeling/weapon/sting_action(mob/living/user)
- if(!user.drop_item())
- to_chat(user, "The [user.get_active_held_item()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!")
+ var/obj/item/held = user.get_active_held_item()
+ if(held && !user.dropItemToGround(held))
+ to_chat(user, "[held] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!")
return
var/limb_regen = 0
if(user.active_hand_index % 2 == 0) //we regen the arm before changing it into the weapon
@@ -338,7 +339,7 @@
if(INTENT_DISARM)
var/obj/item/I = C.get_active_held_item()
if(I)
- if(C.drop_item())
+ if(C.dropItemToGround(I))
C.visible_message("[I] is yanked off [C]'s hand by [src]!","A tentacle pulls [I] away from you!")
on_hit(I) //grab the item as if you had hit it directly with the tentacle
return 1
diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm
index b3cdf248aab..c23074c5060 100644
--- a/code/game/gamemodes/changeling/powers/tiny_prick.dm
+++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm
@@ -127,8 +127,9 @@
/obj/effect/proc_holder/changeling/sting/false_armblade/sting_action(mob/user, mob/target)
add_logs(user, target, "stung", object="falso armblade sting")
- if(!target.drop_item())
- to_chat(user, "The [target.get_active_held_item()] is stuck to their hand, you cannot grow a false armblade over it!")
+ var/obj/item/held = target.get_active_held_item()
+ if(held && !target.dropItemToGround(held))
+ to_chat(user, "[held] is stuck to their hand, you cannot grow a false armblade over it!")
return
if(ismonkey(target))
diff --git a/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm b/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm
index 8cb84d43c23..e88f112a0af 100644
--- a/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm
+++ b/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm
@@ -88,7 +88,7 @@
if(istype(I, /obj/item/clockwork/slab))
to_chat(user, "\"I don't think you want to drop your slab into that.\"\n\"If you really want to, try throwing it.\"")
return TRUE
- if(user.drop_item() && uses)
+ if(uses && user.dropItemToGround(I))
user.visible_message("[user] drops [I] into [src]!", "You drop [I] into [src]!")
pass_through_gateway(I, TRUE)
return TRUE
diff --git a/code/game/gamemodes/clock_cult/clock_items/clock_components.dm b/code/game/gamemodes/clock_cult/clock_items/clock_components.dm
index b1409aae186..65c4f9f0afa 100644
--- a/code/game/gamemodes/clock_cult/clock_items/clock_components.dm
+++ b/code/game/gamemodes/clock_cult/clock_items/clock_components.dm
@@ -20,7 +20,6 @@
"You crush [src], capturing its escaping energy for use as power.")
playsound(user, 'sound/effects/pop_expl.ogg', 50, TRUE)
adjust_clockwork_power(POWER_WALL_TOTAL)
- user.drop_item()
qdel(src)
/obj/item/clockwork/component/pickup(mob/living/user)
diff --git a/code/game/gamemodes/clock_cult/clock_items/clock_weapons/_call_weapon.dm b/code/game/gamemodes/clock_cult/clock_items/clock_weapons/_call_weapon.dm
index afe6aca217b..a87767c05e3 100644
--- a/code/game/gamemodes/clock_cult/clock_items/clock_weapons/_call_weapon.dm
+++ b/code/game/gamemodes/clock_cult/clock_items/clock_weapons/_call_weapon.dm
@@ -28,7 +28,6 @@
if(weapon.loc == owner)
owner.visible_message("[owner]'s [weapon.name] flickers and disappears!")
to_chat(owner, "You dismiss [weapon].")
- owner.drop_item()
QDEL_NULL(weapon)
weapon_reset(RATVARIAN_SPEAR_COOLDOWN * 0.5)
return
diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm
index a9c241b2c3f..563e83e9cdc 100644
--- a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm
+++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm
@@ -136,7 +136,7 @@
to_chat(user, "\"You reek of blood. You've got a lot of nerve to even look at that slab.\"")
user.visible_message("A sizzling sound comes from [user]'s hands!", "[src] suddenly grows extremely hot in your hands!")
playsound(get_turf(user), 'sound/weapons/sear.ogg', 50, 1)
- user.drop_item()
+ user.dropItemToGround(src)
user.emote("scream")
user.apply_damage(5, BURN, "l_arm")
user.apply_damage(5, BURN, "r_arm")
diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm
index 2a5f64915be..115f9319753 100644
--- a/code/game/gamemodes/cult/talisman.dm
+++ b/code/game/gamemodes/cult/talisman.dm
@@ -21,7 +21,6 @@
if(invoke(user))
uses--
if(uses <= 0)
- user.drop_item()
qdel(src)
/obj/item/paper/talisman/proc/invoke(mob/living/user, successfuluse = 1)
@@ -182,7 +181,6 @@
C.Jitter(15)
if(is_servant_of_ratvar(target))
target.adjustBruteLoss(15)
- user.drop_item()
qdel(src)
return
..()
@@ -204,13 +202,13 @@
user.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit)
user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult/alt(user), slot_shoes)
user.equip_to_slot_or_del(new /obj/item/storage/backpack/cultpack(user), slot_back)
- user.drop_item()
+ user.dropItemToGround(src)
user.put_in_hands(new /obj/item/melee/cultblade(user))
user.put_in_hands(new /obj/item/restraints/legcuffs/bola/cult(user))
/obj/item/paper/talisman/armor/attack(mob/living/target, mob/living/user)
if(iscultist(user) && iscultist(target))
- user.drop_item()
+ user.temporarilyRemoveItemFromInventory(src)
invoke(target)
qdel(src)
return
@@ -335,7 +333,6 @@
else
to_chat(user, "[C] is already bound.")
if(uses <= 0)
- user.drop_item()
qdel(src)
/obj/item/restraints/handcuffs/energy/cult //For the talisman of shackling
diff --git a/code/game/gamemodes/devil/true_devil/_true_devil.dm b/code/game/gamemodes/devil/true_devil/_true_devil.dm
index 5b85cbd811c..9b24d096c46 100644
--- a/code/game/gamemodes/devil/true_devil/_true_devil.dm
+++ b/code/game/gamemodes/devil/true_devil/_true_devil.dm
@@ -184,7 +184,7 @@
"[M] has pushed down [src]!")
else
if (prob(25))
- drop_item()
+ dropItemToGround(get_active_held_item())
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("[M] has disarmed [src]!", \
"[M] has disarmed [src]!")
diff --git a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm
index 879f68e960b..5b5bafdd217 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm
@@ -49,7 +49,7 @@
/datum/surgery_step/gland_insert/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] inserts [tool] into [target].", "You insert [tool] into [target].")
- user.drop_item()
+ user.temporarilyRemoveItemFromInventory(tool, TRUE)
var/obj/item/organ/heart/gland/gland = tool
gland.Insert(target, 2)
return 1
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index 5e1d80e1759..e72babc5b00 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -353,7 +353,7 @@
return ..()
user.visible_message("[user] scatters [src] in all directions.", \
"You scatter [src] across the area. The particles slowly fade away.")
- user.drop_item()
+ user.dropItemToGround(src)
scatter()
/obj/item/ectoplasm/revenant/throw_impact(atom/hit_atom)
diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
index 7aba0adf260..b9a07093d31 100644
--- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm
+++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
@@ -97,7 +97,7 @@
return
user.visible_message("[user]'s eyes flare a deep crimson!", \
"You feel a strange power seep into your body... you have absorbed the demon's blood-travelling powers!")
- user.drop_item()
+ user.temporarilyRemoveItemFromInventory(src, TRUE)
src.Insert(user) //Consuming the heart literally replaces your heart with a demon heart. H A R D C O R E
/obj/item/organ/heart/demon/Insert(mob/living/carbon/M, special = 0)
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index 2179177fc1e..a24efbe3f59 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -91,7 +91,7 @@
to_chat(synd_mind.current, "In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.")
var/obj/item/device/nuclear_challenge/challenge = new /obj/item/device/nuclear_challenge
- synd_mind.current.put_in_hands_or_del(challenge)
+ synd_mind.current.put_in_hands(challenge, TRUE)
var/list/foundIDs = synd_mind.current.search_contents_for(/obj/item/card/id)
if(foundIDs.len)
@@ -110,8 +110,7 @@
P.info = "The nuclear authorization code is: [nuke_code]"
P.name = "nuclear bomb code"
var/mob/living/carbon/human/H = synd_mind.current
- P.forceMove(H.drop_location())
- H.put_in_hands_or_del(P)
+ H.put_in_hands(P, TRUE)
H.update_icons()
else
nuke_code = "code will be provided later"
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 8870399f248..8cae25eb386 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -105,9 +105,8 @@
/obj/machinery/nuclearbomb/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/disk/nuclear))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.forceMove(src)
auth = I
add_fingerprint(user)
return
@@ -309,10 +308,8 @@
. = TRUE
if("insert_disk")
if(!auth)
- var/obj/item/I = usr.get_active_held_item()
- if(istype(I, /obj/item/disk/nuclear))
- usr.drop_item()
- I.forceMove(src)
+ var/obj/item/I = usr.is_holding_item_of_type(/obj/item/disk/nuclear)
+ if(I && usr.transferItemToLoc(I, src))
auth = I
. = TRUE
if("keypad")
diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm
index 42d676c29b2..ced6ebbd35c 100644
--- a/code/game/gamemodes/wizard/artefact.dm
+++ b/code/game/gamemodes/wizard/artefact.dm
@@ -193,8 +193,8 @@
H.equip_to_slot_or_del(new hat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/under/roman(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(H), slot_shoes)
- H.put_in_hands_or_del(new /obj/item/shield/riot/roman(H))
- H.put_in_hands_or_del(new /obj/item/claymore(H))
+ H.put_in_hands(new /obj/item/shield/riot/roman(H), TRUE)
+ H.put_in_hands(new /obj/item/claymore(H), TRUE)
H.equip_to_slot_or_del(new /obj/item/twohanded/spear(H), slot_back)
diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm
index d25c7613bca..76c8d0f41cd 100644
--- a/code/game/gamemodes/wizard/wizard.dm
+++ b/code/game/gamemodes/wizard/wizard.dm
@@ -159,7 +159,7 @@
wizard_mob.equip_to_slot_or_del(new /obj/item/teleportation_scroll(wizard_mob), slot_r_store)
var/obj/item/spellbook/spellbook = new /obj/item/spellbook(wizard_mob)
spellbook.owner = wizard_mob
- wizard_mob.put_in_hands_or_del(spellbook)
+ wizard_mob.put_in_hands(spellbook, TRUE)
to_chat(wizard_mob, "You will find a list of available spells in your spell book. Choose your magic arsenal carefully.")
to_chat(wizard_mob, "The spellbook is bound to you, and others cannot use it.")
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index b02ee50c036..00289ee84ba 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -71,15 +71,11 @@
if(storedpda)
to_chat(user, "There is already a PDA inside!")
return
- else
- var/obj/item/device/pda/P = user.get_active_held_item()
- if(istype(P))
- if(!user.drop_item())
- return
- storedpda = P
- P.loc = src
- P.add_fingerprint(user)
- update_icon()
+ else if(!user.transferItemToLoc(O, src))
+ return
+ storedpda = O
+ O.add_fingerprint(user)
+ update_icon()
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
var/obj/item/weldingtool/WT = O
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 7d3c40a0d93..80d50cfb172 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -149,10 +149,10 @@
else if(istype(W, /obj/item/device/analyzer))
if(!isXRay())
- if(!user.drop_item(W))
+ if(!user.temporarilyRemoveItemFromInventory(W))
return
- upgradeXRay()
qdel(W)
+ upgradeXRay()
to_chat(user, "[msg]")
else
to_chat(user, "[msg2]")
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 1e6fe4c5321..5b828af8208 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -109,11 +109,10 @@
// Upgrades!
if(is_type_in_typecache(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already.
- if(!user.drop_item(W))
+ if(!user.transferItemToLoc(W, src))
return
to_chat(user, "You attach \the [W] into the assembly inner circuits.")
upgrades += W
- W.forceMove(src)
return
// Taking out upgrades
diff --git a/code/game/machinery/computer/gulag_teleporter.dm b/code/game/machinery/computer/gulag_teleporter.dm
index ba8fb7914c0..3ea4c2f9b2d 100644
--- a/code/game/machinery/computer/gulag_teleporter.dm
+++ b/code/game/machinery/computer/gulag_teleporter.dm
@@ -92,18 +92,13 @@
beacon = findbeacon()
if("handle_id")
if(id)
- if(!usr.get_active_held_item())
- usr.put_in_hands(id)
- id = null
- else
- id.forceMove(get_turf(src))
- id = null
+ usr.put_in_hands(id)
+ id = null
else
- var/obj/item/I = usr.get_active_held_item()
- if(istype(I, /obj/item/card/id/prisoner))
- if(!usr.drop_item())
+ var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
+ if(I)
+ if(!usr.transferItemToLoc(I, src))
return
- I.forceMove(src)
id = I
if("set_goal")
var/new_goal = input("Set the amount of points:", "Points", id.goal) as num|null
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 6ec144d2575..f13cfe8c00d 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -27,9 +27,8 @@
/obj/machinery/computer/med_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/card/id) && !scan)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(O, src))
return
- O.loc = src
scan = O
to_chat(user, "You insert [O].")
else
@@ -215,17 +214,13 @@
src.temp = null
if(href_list["scan"])
if(src.scan)
- if(ishuman(usr) && !usr.get_active_held_item())
- usr.put_in_hands(scan)
- else
- scan.loc = get_turf(src)
- src.scan = null
+ usr.put_in_hands(scan)
+ scan = null
else
- var/obj/item/I = usr.get_active_held_item()
- if(istype(I, /obj/item/card/id))
- if(!usr.drop_item())
+ var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id)
+ if(I)
+ if(!usr.transferItemToLoc(I, src))
return
- I.loc = src
src.scan = I
else if(href_list["logout"])
src.authenticated = null
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index 620fd514023..3e9d6df42a2 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -90,11 +90,10 @@
if(href_list["id"])
if(href_list["id"] =="insert" && !inserted_id)
- var/obj/item/card/id/prisoner/I = usr.get_active_held_item()
- if(istype(I))
- if(!usr.drop_item())
+ var/obj/item/card/id/prisoner/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
+ if(I)
+ if(!usr.transferItemToLoc(I, src))
return
- I.loc = src
inserted_id = I
else
to_chat(usr, "No valid ID.")
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 1a74c44c30e..7fadcac2f26 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -37,9 +37,8 @@
/obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/card/id))
if(!scan)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(O, src))
return
- O.loc = src
scan = O
to_chat(user, "You insert [O].")
else
@@ -303,17 +302,13 @@ What a mess.*/
if("Confirm Identity")
if(scan)
- if(ishuman(usr) && !usr.get_active_held_item())
- usr.put_in_hands(scan)
- else
- scan.loc = get_turf(src)
+ usr.put_in_hands(scan)
scan = null
else
- var/obj/item/I = usr.get_active_held_item()
- if(istype(I, /obj/item/card/id))
- if(!usr.drop_item())
+ var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id)
+ if(I)
+ if(!usr.transferItemToLoc(I, src))
return
- I.loc = src
scan = I
if("Log Out")
diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm
index 3c183456bed..c44139acfca 100644
--- a/code/game/machinery/computer/telecrystalconsoles.dm
+++ b/code/game/machinery/computer/telecrystalconsoles.dm
@@ -29,21 +29,19 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
ID = rand(1,999)
name = "[name] [ID]"
-/obj/machinery/computer/telecrystals/uplinker/attackby(obj/item/O, mob/user, params)
+/obj/machinery/computer/telecrystals/uplinker/attackby(obj/item/I, mob/user, params)
if(uplinkholder)
to_chat(user, "The [src] already has an uplink in it.")
return
- if(O.hidden_uplink)
- var/obj/item/I = user.get_active_held_item()
- if(!user.drop_item())
+ if(I.hidden_uplink)
+ if(!user.transferItemToLoc(I, src))
return
uplinkholder = I
- I.loc = src
I.add_fingerprint(user)
update_icon()
updateUsrDialog()
else
- to_chat(user, "The [O] doesn't appear to be an uplink...")
+ to_chat(user, "[I] doesn't appear to be an uplink...")
/obj/machinery/computer/telecrystals/uplinker/update_icon()
..()
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 5e7982a87c7..bde5cda27d6 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -128,12 +128,11 @@
to_chat(user, "The frame needs to be secured first!")
return
var/obj/item/circuitboard/machine/B = P
- if(!user.drop_item())
+ if(!user.transferItemToLoc(B, src))
return
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "You add the circuit board to the frame.")
circuit = B
- B.loc = src
icon_state = "box_2"
state = 3
components = list()
@@ -239,10 +238,9 @@
req_components[I] -= used_amt
to_chat(user, "You add [P] to [src].")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(P, src))
break
to_chat(user, "You add [P] to [src].")
- P.forceMove(src)
components += P
req_components[I]--
return 1
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 9e9a449974e..488ffb7379d 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1170,10 +1170,9 @@
to_chat(user, "The maintenance panel is destroyed!")
return
to_chat(user, "You apply [C]. Next time someone opens the door, it will explode.")
- user.drop_item()
panel_open = FALSE
update_icon()
- C.forceMove(src)
+ user.transferItemToLoc(C, src, TRUE)
charge = C
else if(istype(C, /obj/item/paper) || istype(C, /obj/item/photo))
if(note)
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 95adf12875d..542989fa15c 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -426,7 +426,6 @@
return
if(constructionStep != CONSTRUCTION_NOCIRCUIT)
return
- user.drop_item()
qdel(C)
user.visible_message("[user] adds a circuit to [src].", \
"You insert and secure [C].")
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index f8186a8a511..9bf40542a77 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -63,10 +63,9 @@
else if (istype(W, /obj/item/device/assembly/flash/handheld))
if (!bulb)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
user.visible_message("[user] installs [W] into [src].", "You install [W] into [src].")
- W.forceMove(src)
bulb = W
power_change()
else
diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm
index cbf13abeb97..3b4503c3c85 100644
--- a/code/game/machinery/gulag_item_reclaimer.dm
+++ b/code/game/machinery/gulag_item_reclaimer.dm
@@ -33,9 +33,8 @@
/obj/machinery/gulag_item_reclaimer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/card/id/prisoner))
if(!inserted_id)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.forceMove(src)
inserted_id = I
to_chat(user, "You insert [I].")
return
@@ -82,18 +81,13 @@
switch(action)
if("handle_id")
if(inserted_id)
- if(!usr.get_active_held_item())
- usr.put_in_hands(inserted_id)
- inserted_id = null
- else
- inserted_id.forceMove(get_turf(src))
- inserted_id = null
+ usr.put_in_hands(inserted_id)
+ inserted_id = null
else
- var/obj/item/I = usr.get_active_held_item()
- if(istype(I, /obj/item/card/id/prisoner))
- if(!usr.drop_item())
+ var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
+ if(I)
+ if(!usr.transferItemToLoc(I, src))
return
- I.forceMove(src)
inserted_id = I
if("release_items")
var/mob/M = locate(params["mobref"])
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 2097b171460..98bef7480b3 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -95,10 +95,8 @@
if(beaker)
to_chat(user, "There is already a reagent container loaded!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
-
- W.forceMove(src)
beaker = W
to_chat(user, "You attach [W] to [src].")
update_icon()
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 204ae83c9d9..863eb3286b9 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -786,11 +786,9 @@ GLOBAL_LIST_EMPTY(allCasters)
else
qdel(photo)
photo = null
- if(istype(user.get_active_held_item(), /obj/item/photo))
- photo = user.get_active_held_item()
- if(!user.drop_item())
- return
- photo.loc = src
+ photo = user.is_holding_item_of_type(/obj/item/photo)
+ if(photo && !user.transferItemToLoc(photo, src))
+ photo = null
if(issilicon(user))
var/list/nametemp = list()
var/find
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index cedb94b7b32..26559c5ef9f 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -71,8 +71,6 @@
add_fingerprint(user)
if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter))
to_chat(usr, "You put [W] back into [src].")
- if(!user.drop_item())
- return
qdel(W)
return
else if (istype(W, /obj/item/wrench))
diff --git a/code/game/machinery/porta_turret/portable_turret_construct.dm b/code/game/machinery/porta_turret/portable_turret_construct.dm
index 7eace086360..ab16ee67ede 100644
--- a/code/game/machinery/porta_turret/portable_turret_construct.dm
+++ b/code/game/machinery/porta_turret/portable_turret_construct.dm
@@ -84,9 +84,8 @@
if(PTURRET_INTERNAL_ARMOUR_ON)
if(istype(I, /obj/item/gun/energy)) //the gun installation part
var/obj/item/gun/energy/E = I
- if(!user.drop_item())
+ if(!user.transferItemToLoc(E, src))
return
- E.forceMove(src)
installed_gun = E
to_chat(user, "You add [I] to the turret.")
build_step = PTURRET_GUN_EQUIPPED
@@ -101,7 +100,7 @@
if(PTURRET_GUN_EQUIPPED)
if(isprox(I))
build_step = PTURRET_SENSORS_ON
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(I))
return
to_chat(user, "You add the proximity sensor to the turret.")
qdel(I)
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 4a72fa90c6d..d373e1267a0 100755
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -50,9 +50,8 @@
to_chat(user, "Your gun has no external power connector.")
return 1
- if(!user.drop_item())
+ if(!user.transferItemToLoc(G, src))
return 1
- G.loc = src
charging = G
use_power = ACTIVE_POWER_USE
update_icon(scan = TRUE)
diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm
index 957f533a293..a9162b85f84 100644
--- a/code/game/machinery/slotmachine.dm
+++ b/code/game/machinery/slotmachine.dm
@@ -83,16 +83,15 @@
if(istype(I, /obj/item/coin))
var/obj/item/coin/C = I
if(prob(2))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(C, drop_location()))
return
- C.loc = loc
C.throw_at(user, 3, 10)
if(prob(10))
balance = max(balance - SPIN_PRICE, 0)
to_chat(user, "[src] spits your coin back out!")
else
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(C))
return
to_chat(user, "You insert a [C.cmineral] coin into [src]'s slot!")
balance += C.value
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 886798156e4..b45b393ab2d 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -140,18 +140,13 @@
if(cell)
to_chat(user, "There is already a power cell inside!")
return
- else
- // insert cell
- var/obj/item/stock_parts/cell/C = usr.get_active_held_item()
- if(istype(C))
- if(!user.drop_item())
- return
- cell = C
- C.loc = src
- C.add_fingerprint(usr)
+ else if(!user.transferItemToLoc(I, src))
+ return
+ cell = I
+ I.add_fingerprint(usr)
- user.visible_message("\The [user] inserts a power cell into \the [src].", "You insert the power cell into \the [src].")
- SStgui.update_uis(src)
+ user.visible_message("\The [user] inserts a power cell into \the [src].", "You insert the power cell into \the [src].")
+ SStgui.update_uis(src)
else
to_chat(user, "The hatch must be open to insert a power cell!")
return
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 7c51c383fab..0854e63e5b6 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -298,32 +298,31 @@
if(suit)
to_chat(user, "The unit already contains a suit!.")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
suit = I
else if(istype(I, /obj/item/clothing/head/helmet))
if(helmet)
to_chat(user, "The unit already contains a helmet!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
helmet = I
else if(istype(I, /obj/item/clothing/mask))
if(mask)
to_chat(user, "The unit already contains a mask!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
mask = I
else
if(storage)
to_chat(user, "The auxiliary storage compartment is full!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
storage = I
- I.loc = src
visible_message("[user] inserts [I] into [src]", "You load [I] into [src].")
update_icon()
return
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index 24365464a80..acd5f51d3f2 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -150,11 +150,10 @@
to_chat(user, "The cover is screwed on, it won't pry off!")
else if(istype(I, /obj/item/bombcore))
if(!payload)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
payload = I
to_chat(user, "You place [payload] into [src].")
- payload.loc = src
else
to_chat(user, "[payload] is already loaded into [src]! You'll have to remove it first.")
else if(istype(I, /obj/item/weldingtool))
@@ -463,11 +462,10 @@
return
else if(istype(I, /obj/item/reagent_containers/glass/beaker) || istype(I, /obj/item/reagent_containers/glass/bottle))
if(beakers.len < max_beakers)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
beakers += I
to_chat(user, "You load [src] with [I].")
- I.loc = src
else
to_chat(user, "The [I] wont fit! The [src] can only hold up to [max_beakers] containers.")
return
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 0039b2e1e03..7240804d8fc 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -189,9 +189,8 @@
var/obj/item/reagent_containers/food/snacks/S = W
if(!S.junkiness)
if(!iscompartmentfull(user))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
- W.loc = src
food_load(W)
to_chat(user, "You insert [W] into [src]'s chef compartment.")
else
@@ -279,9 +278,8 @@
if(!premium.len)
to_chat(user, "[src] doesn't have a coin slot.")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
- W.loc = src
coin = W
to_chat(user, "You insert [W] into [src].")
return
diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm
index 7091bfd72a7..a75294c28f3 100644
--- a/code/game/mecha/mecha_defense.dm
+++ b/code/game/mecha/mecha_defense.dm
@@ -161,7 +161,7 @@
var/obj/item/mecha_parts/mecha_equipment/E = W
spawn()
if(E.can_attach(src))
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(W))
return
E.attach(src)
user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src].")
@@ -226,11 +226,10 @@
else if(istype(W, /obj/item/stock_parts/cell))
if(state==4)
if(!cell)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
var/obj/item/stock_parts/cell/C = W
to_chat(user, "You install the powercell.")
- C.forceMove(src)
cell = C
log_message("Powercell installed")
else
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index 3f32b18178c..41ba67d6165 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -128,7 +128,7 @@
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
if(..())
- M.drop_item()
+ M.drop_all_held_items()
M.adjustOxyLoss(1)
M.emote("cough")
return 1
@@ -205,7 +205,6 @@
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
if(..())
- M.drop_item()
M.Sleeping(200)
M.emote("cough")
return 1
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index a82b75784cd..96803032d56 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -529,7 +529,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
to_chat(M, "You become nearsighted!")
if(prob(50))
if(M.stat != DEAD)
- if(M.drop_item())
+ if(M.drop_all_held_items())
to_chat(M, "You drop what you're holding and clutch at your eyes!")
M.adjust_blurriness(10)
M.Unconscious(20)
diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm
index 25b1a60955c..4be687a3a01 100644
--- a/code/game/objects/items/handcuffs.dm
+++ b/code/game/objects/items/handcuffs.dm
@@ -59,7 +59,7 @@
if(target.handcuffed)
return
- if(!user.drop_item() && !dispense)
+ if(!user.temporarilyRemoveItemFromInventory(src) && !dispense)
return
var/obj/item/restraints/handcuffs/cuffs = src
@@ -68,7 +68,7 @@
else if(dispense)
cuffs = new type()
- cuffs.loc = target
+ cuffs.forceMove(target)
target.handcuffed = cuffs
target.update_handcuffed()
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index d727c517bdd..cff958926dc 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -233,7 +233,7 @@
/obj/item/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)
if(user && target == user)
- user.drop_item()
+ user.dropItemToGround(src)
if(proximity_flag)
consume_everything(target)
..()
@@ -243,7 +243,7 @@
if(ismob(target))
var/mob/M
if(src.loc == M)
- M.drop_item()
+ M.dropItemToGround(src)
consume_everything(target)
/obj/item/melee/supermatter_sword/pickup(user)
@@ -267,7 +267,7 @@
/obj/item/melee/supermatter_sword/suicide_act(mob/user)
user.visible_message("[user] touches [src]'s blade. It looks like [user.p_theyre()] tired of waiting for the radiation to kill [user.p_them()]!")
- user.drop_item()
+ user.dropItemToGround(src, TRUE)
shard.CollidedWith(user)
/obj/item/melee/supermatter_sword/proc/consume_everything(target)
diff --git a/code/game/objects/items/paiwire.dm b/code/game/objects/items/paiwire.dm
index 4a75750edf7..994082c5faf 100644
--- a/code/game/objects/items/paiwire.dm
+++ b/code/game/objects/items/paiwire.dm
@@ -7,8 +7,7 @@
var/obj/machinery/machine
/obj/item/pai_cable/proc/plugin(obj/machinery/M, mob/living/user)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(src, M))
return
user.visible_message("[user] inserts [src] into a data port on [M].", "You insert [src] into a data port on [M].", "You hear the satisfying click of a wire jack fastening into place.")
- src.loc = M
machine = M
\ No newline at end of file
diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm
index ad6a7ed1272..8607addb4b3 100644
--- a/code/game/objects/items/pneumaticCannon.dm
+++ b/code/game/objects/items/pneumaticCannon.dm
@@ -122,7 +122,7 @@
return
if(user.disabilities & CLUMSY && prob(75) && clumsyCheck)
user.visible_message("[user] loses their grip on [src], causing it to go off!", "[src] slips out of your hands and goes off!")
- user.drop_item()
+ user.dropItemToGround(src, TRUE)
if(prob(10))
target = get_turf(user)
else
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 3d7b4a96031..f47c5d30eb1 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -254,7 +254,7 @@
if(!isturf(loc))
to_chat(user, "You cannot install[M], the frame has to be standing on the ground to be perfectly precise!")
return
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(M))
to_chat(user, "[M] is stuck to your hand!")
return
qdel(M)
diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm
index d8ff523c252..30c881790ca 100644
--- a/code/game/objects/items/storage/backpack.dm
+++ b/code/game/objects/items/storage/backpack.dm
@@ -48,7 +48,7 @@
/obj/item/storage/backpack/holding/suicide_act(mob/living/user)
user.visible_message("[user] is jumping into [src]! It looks like [user.p_theyre()] trying to commit suicide.")
- user.drop_item()
+ user.dropItemToGround(src, TRUE)
user.Stun(100, ignore_canstun = TRUE)
sleep(20)
playsound(src, "rustle", 50, 1, -5)
diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm
index 489f1c6bf07..313988b7d47 100644
--- a/code/game/objects/items/storage/boxes.dm
+++ b/code/game/objects/items/storage/boxes.dm
@@ -57,11 +57,9 @@
close_all()
to_chat(user, "You fold [src] flat.")
- var/obj/item/I = new foldable(get_turf(src))
- user.drop_item()
- user.put_in_hands(I)
- user.update_inv_hands()
+ var/obj/item/I = new foldable
qdel(src)
+ user.put_in_hands(I)
/obj/item/storage/box/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/packageWrap))
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 47ff52811be..706e0aacfb4 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -1023,8 +1023,8 @@
throwforce = 12 //pelt your enemies to death with lumps of snow
/obj/item/toy/snowball/afterattack(atom/target as mob|obj|turf|area, mob/user)
- user.drop_item()
- src.throw_at(target, throw_range, throw_speed)
+ if(user.dropItemToGround(src))
+ throw_at(target, throw_range, throw_speed)
/obj/item/toy/snowball/throw_impact(atom/hit_atom)
if(!..())
@@ -1042,8 +1042,8 @@
w_class = WEIGHT_CLASS_BULKY //Stops people from hiding it in their bags/pockets
/obj/item/toy/beach_ball/afterattack(atom/target as mob|obj|turf|area, mob/user)
- user.drop_item()
- src.throw_at(target, throw_range, throw_speed)
+ if(user.dropItemToGround(src))
+ throw_at(target, throw_range, throw_speed)
/*
* Xenomorph action figure
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index cdb0ba9f457..85d124fefc4 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -53,7 +53,7 @@
return
if(iscyborg(user))
return
- if(!user.drop_item())
+ if(!user.drop_all_held_items())
return
if (O.loc != src.loc)
step(O, get_dir(O, src))
diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm
index 9d6985c6208..606b10da0ac 100644
--- a/code/game/objects/structures/beds_chairs/chair.dm
+++ b/code/game/objects/structures/beds_chairs/chair.dm
@@ -58,14 +58,14 @@
playsound(src.loc, W.usesound, 50, 1)
deconstruct()
else if(istype(W, /obj/item/assembly/shock_kit))
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(W))
return
var/obj/item/assembly/shock_kit/SK = W
var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
E.setDir(dir)
E.part = SK
- SK.loc = E
+ SK.forceMove(E)
SK.master = E
qdel(src)
else
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 68de701967c..f6e2023943d 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -27,7 +27,8 @@ LINEN BINS
..()
/obj/item/bedsheet/attack_self(mob/user)
- user.drop_item()
+ if(!user.dropItemToGround(src))
+ return
if(layer == initial(layer))
layer = ABOVE_MOB_LAYER
to_chat(user, "You cover yourself with [src].")
@@ -275,18 +276,16 @@ LINEN BINS
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/bedsheet))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.loc = src
sheets.Add(I)
amount++
to_chat(user, "You put [I] in [src].")
update_icon()
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
to_chat(user, "\The [I] is stuck to your hand, you cannot hide it among the sheets!")
return
- I.loc = src
hidden = I
to_chat(user, "You hide [I] among the sheets.")
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 3d77be1bb53..4e3056f39ae 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -229,8 +229,7 @@
"You cut \the [src] apart with \the [W].")
deconstruct(TRUE)
return 0
- if(user.drop_item()) // so we put in unlit welder too
- W.forceMove(loc)
+ if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
return 1
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
var/obj/item/weldingtool/WT = W
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index f051c643784..61aab75efc3 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -603,10 +603,9 @@
if(do_after(user, 40, target = src))
if( src.state != 1 )
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
- W.loc = src
to_chat(user, "You install the airlock electronics.")
src.state = 2
src.name = "near finished airlock assembly"
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index e61e1a18708..0a3574b1a66 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -54,9 +54,8 @@
return
if(istype(I, /obj/item/extinguisher))
if(!stored_extinguisher && opened)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- contents += I
stored_extinguisher = I
to_chat(user, "You place [I] in [src].")
update_icon()
diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm
index 803c4d46278..afcd855caf0 100644
--- a/code/game/objects/structures/fireaxe.dm
+++ b/code/game/objects/structures/fireaxe.dm
@@ -53,10 +53,9 @@
if(F.wielded)
to_chat(user, "Unwield the [F.name] first.")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(F, src))
return
fireaxe = F
- F.forceMove(src)
to_chat(user, "You place the [F.name] back in the [name].")
update_icon()
return
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 3d7e9be21a6..b3b60228348 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -259,9 +259,8 @@
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
- if(!user.drop_item())
+ if(!user.transferItemToLoc(P, drop_location()))
return
- P.loc = src.loc
to_chat(user, "You fit the pipe into \the [src].")
else
return ..()
diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm
index 24a6bd4ceb7..ac6a69ed935 100644
--- a/code/game/objects/structures/guncase.dm
+++ b/code/game/objects/structures/guncase.dm
@@ -39,9 +39,8 @@
return
if(istype(I, gun_category) && open)
if(LAZYLEN(contents) < capacity)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.forceMove(src)
to_chat(user, "You place [I] in [src].")
update_icon()
else
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 58db777abe6..747e0b33173 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -32,9 +32,8 @@
return 1
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.loc = src
updateUsrDialog()
to_chat(user, "You put [I] into [src].")
return
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 54730f5f7a3..dd25c652514 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -160,10 +160,9 @@ FLOOR SAFES
. = 1 //no afterattack
if(I.w_class + space <= maxspace)
space += I.w_class
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
to_chat(user, "\The [I] is stuck to your hand, you cannot put it in the safe!")
return
- I.forceMove(src)
to_chat(user, "You put [I] in [src].")
updateUsrDialog()
return
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index 5d566fdd199..f718649207a 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -104,7 +104,6 @@
"You attach the sign to [T].")
playsound(T, 'sound/items/deconstruct.ogg', 50, 1)
new sign_path(T)
- user.drop_item()
qdel(src)
else
return ..()
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 9f1c92d4d31..31521a12da6 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -131,8 +131,7 @@
// If the tray IS empty, continue on (tray will be placed on the table like other items)
if(user.a_intent != INTENT_HARM && !(I.flags_1 & ABSTRACT_1))
- if(user.drop_item())
- I.Move(loc)
+ if(user.transferItemToLoc(I, drop_location()))
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
@@ -441,7 +440,7 @@
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
if ((!( istype(O, /obj/item) ) || user.get_active_held_item() != O))
return
- if(!user.drop_item())
+ if(!user.dropItemToGround(O))
return
if(O.loc != src.loc)
step(O, get_dir(O, src))
@@ -454,8 +453,7 @@
return
if(user.a_intent == INTENT_HARM)
return ..()
- if(user.drop_item())
- W.Move(loc)
+ if(user.transferItemToLoc(W, drop_location()))
return 1
/obj/structure/rack/attack_paw(mob/living/user)
@@ -518,7 +516,7 @@
building = TRUE
to_chat(user, "You start constructing a rack...")
if(do_after(user, 50, target = user, progress=TRUE))
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(src))
return
var/obj/structure/rack/R = new /obj/structure/rack(user.loc)
user.visible_message("[user] assembles \a [R].\
diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm
index 16990103097..076f39b85f0 100644
--- a/code/game/objects/structures/tank_dispenser.dm
+++ b/code/game/objects/structures/tank_dispenser.dm
@@ -62,9 +62,8 @@
to_chat(user, "[src] can't hold any more of [I].")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.loc = src
to_chat(user, "You put [I] in [src].")
update_icon()
diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm
index fde6a391c3e..ece2d2cf443 100644
--- a/code/game/objects/structures/target_stake.dm
+++ b/code/game/objects/structures/target_stake.dm
@@ -23,12 +23,11 @@
/obj/structure/target_stake/attackby(obj/item/target/T, mob/user)
if(pinned_target)
return
- if(istype(T) && user.drop_item())
+ if(istype(T) && user.transferItemToLoc(T, drop_location()))
pinned_target = T
T.pinnedLoc = src
T.density = TRUE
T.layer = OBJ_LAYER + 0.01
- T.loc = loc
to_chat(user, "You slide the target into the stake.")
/obj/structure/target_stake/attack_hand(mob/user)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 47aad947418..bb0213ef0bf 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -88,10 +88,9 @@
if(w_items + I.w_class > WEIGHT_CLASS_HUGE)
to_chat(user, "The cistern is full!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
to_chat(user, "\The [I] is stuck to your hand, you cannot put it in the cistern!")
return
- I.loc = src
w_items += I.w_class
to_chat(user, "You carefully place [I] into the cistern.")
@@ -173,10 +172,9 @@
if(I.w_class > 1)
to_chat(user, "[I] is too large for the drain enclosure.")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
to_chat(user, "\[I] is stuck to your hand, you cannot put it in the drain enclosure!")
return
- I.forceMove(src)
hiddenitem = I
to_chat(user, "You place [I] into the drain enclosure.")
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index 20c4f18a46d..520ba2ee69f 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -209,11 +209,10 @@
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/electronics/airlock))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly...")
- W.loc = src
if(do_after(user, 40, target = src))
if(!src || electronics)
diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm
index 0dd3673f6a4..f0fb7c44480 100644
--- a/code/game/turfs/simulated/floor/light_floor.dm
+++ b/code/game/turfs/simulated/floor/light_floor.dm
@@ -72,7 +72,7 @@
if(..())
return
if(istype(C, /obj/item/light/bulb)) //only for light tiles
- if(state && user.drop_item())
+ if(state && user.temporarilyRemoveItemFromInventory(C))
qdel(C)
state = 0 //fixing it by bashing it with a light bulb, fun eh?
update_icon()
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index 0dcd6762138..ebd2214aba2 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -89,22 +89,20 @@
var/mob/M = user
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
- if(!M.drop_item()) //Remove the assembly from your hands
+ if(!M.temporarilyRemoveItemFromInventory(src)) //Remove the assembly from your hands
return
- var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
+ var/obj/item/device/onetankbomb/R = new
- M.temporarilyRemoveItemFromInventory(src, TRUE) //Remove the tank from your character,in case you were holding it
- if(!M.put_in_hands(R)) //Equips the bomb if possible, or puts it on the floor.
- forceMove(get_turf(M))
+ M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
R.bombassembly = S //Tell the bomb about its assembly part
S.master = R //Tell the assembly about its new owner
- S.loc = R //Move the assembly out of the fucking way
+ S.forceMove(R) //Move the assembly out of the fucking way
R.bombtank = src //Same for tank
master = R
- loc = R
+ forceMove(R)
R.update_icon()
return
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index a3a3796f466..853f422c1c9 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -276,10 +276,9 @@
if(beaker)
to_chat(user, "A beaker is already loaded into [src]!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
beaker = I
- I.loc = src
user.visible_message("[user] places [I] in [src].", \
"You place [I] in [src].")
var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list)
diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
index 9a2ecb6fea7..96a5b8e4894 100644
--- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
+++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
@@ -80,9 +80,8 @@
if(istype(W, /obj/item/tank))
if(!(stat & BROKEN))
var/obj/item/tank/T = W
- if(holding || !user.drop_item())
+ if(holding || !user.transferItemToLoc(T, src))
return
- T.loc = src
holding = T
update_icon()
else if(istype(W, /obj/item/wrench))
diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm
index e960e549f73..f519e567a64 100644
--- a/code/modules/awaymissions/mission_code/Academy.dm
+++ b/code/modules/awaymissions/mission_code/Academy.dm
@@ -174,7 +174,7 @@
/obj/item/dice/d20/fate/equipped(mob/user, slot)
if(!ishuman(user) || !user.mind || (user.mind in SSticker.mode.wizards))
to_chat(user, "You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.")
- user.drop_item()
+ user.dropItemToGround(src)
/obj/item/dice/d20/fate/proc/effect(var/mob/living/carbon/human/user,roll)
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 985db1947e3..2f6b632ae82 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -592,7 +592,7 @@ BLIND // can't see anything
to_chat(user, "[src] already has an accessory.")
return
else
- if(user && !user.drop_item())
+ if(user && !user.temporarilyRemoveItemFromInventory(I))
return
if(!A.attach(src, user))
return
diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
index 67fd0171530..63ff85ac17b 100644
--- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm
+++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
@@ -22,13 +22,10 @@
/obj/item/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target, mob/living/user, ranged = 0)
//Creates a shattering noise and replaces the bottle with a broken_bottle
- var/new_location = get_turf(loc)
+ var/new_location = get_turf(src)
var/obj/item/broken_bottle/B = new /obj/item/broken_bottle(new_location)
- if(ranged)
- B.loc = new_location
- else
- user.drop_item()
- user.put_in_active_hand(B)
+ if(!ranged)
+ user.put_in_hands(B)
B.icon_state = src.icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
index 0f27265b4b6..df323a99ff7 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
@@ -58,10 +58,9 @@ insert ascii eagle on american flag background here
else
if(is_type_in_typecache(I, deepfry_blacklisted_items))
. = ..()
- else if(user.drop_item() && !frying)
+ else if(!frying && user.transferItemToLoc(I, src))
to_chat(user, "You put [I] into [src].")
frying = I
- frying.forceMove(src)
icon_state = "fryer_on"
/obj/machinery/deepfryer/process()
diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
index ee296900272..d6037af55b0 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
@@ -68,8 +68,6 @@
if(istype(O, /obj/item/reagent_containers/food/drinks/drinkingglass))
var/obj/item/reagent_containers/food/drinks/drinkingglass/DG = O
if(!DG.reagents.total_volume) //glass is empty
- if(!user.drop_item())
- return
qdel(DG)
glasses++
to_chat(user, "The [src] accepts the drinking glass, sterilizing it.")
@@ -78,9 +76,8 @@
to_chat(user, "The [src] is at full capacity.")
else
var/obj/item/reagent_containers/food/snacks/S = O
- if(!user.drop_item())
+ if(!user.transferItemToLoc(S, src))
return
- S.loc = src
if(stored_food[sanitize(S.name)])
stored_food[sanitize(S.name)]++
else
diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
index e25b29f7216..fd2471b96eb 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
@@ -142,11 +142,10 @@
to_chat(user, "[src] is full, you can't put anything in!")
return 1
else
- if(!user.drop_item())
+ if(!user.transferItemToLoc(O, src))
to_chat(user, "\the [O] is stuck to your hand, you cannot put it in \the [src]!")
return 0
- O.loc = src
user.visible_message( \
"[user] has added \the [O] to \the [src].", \
"You add \the [O] to \the [src].")
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index 6e245bd3865..fb871f2c3a4 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -195,8 +195,7 @@
if(P)
user.visible_message("[user] put [O] into [src].", \
"You put [O] into [src].")
- user.drop_item()
- O.loc = src
+ user.transferItemToLoc(O, src, TRUE)
return 1
else
if(user.a_intent != INTENT_HARM)
diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm
index 82fcc8c5389..6788d1fc924 100644
--- a/code/modules/food_and_drinks/pizzabox.dm
+++ b/code/modules/food_and_drinks/pizzabox.dm
@@ -178,20 +178,18 @@
if(pizza)
to_chat(user, "[src] already has \a [pizza.name]!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
pizza = I
- I.loc = src
to_chat(user, "You put [I] in [src].")
update_icon()
return
else if(istype(I, /obj/item/bombcore/pizza))
if(open && !bomb)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
wires = new /datum/wires/explosive/pizza(src)
bomb = I
- I.loc = src
to_chat(user, "You put [I] in [src]. Sneeki breeki...")
update_icon()
return
diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm
index 736a6732a00..1073f0d898e 100644
--- a/code/modules/holodeck/items.dm
+++ b/code/modules/holodeck/items.dm
@@ -104,7 +104,7 @@
/obj/structure/holohoop/attackby(obj/item/W as obj, mob/user as mob, params)
if(get_dist(src,user)<2)
- if(user.drop_item(src))
+ if(user.transferItemToLoc(W, drop_location()))
visible_message(" [user] dunks [W] into \the [src]!")
/obj/structure/holohoop/attack_hand(mob/user)
@@ -211,9 +211,7 @@
/obj/machinery/conveyor/holodeck
/obj/machinery/conveyor/holodeck/attackby(obj/item/I, mob/user, params)
- if(user.drop_item())
- I.loc = src.loc
- else
+ if(!user.transferItemToLoc(I, drop_location()))
return ..()
/obj/item/paper/fluff/holodeck/trek_diploma
diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm
index 5c9b0dac5ed..1535173f8d4 100644
--- a/code/modules/hydroponics/biogenerator.dm
+++ b/code/modules/hydroponics/biogenerator.dm
@@ -95,9 +95,8 @@
if(beaker)
to_chat(user, "A container is already loaded into the machine.")
else
- if(!user.drop_item())
+ if(!user.transferItemToLoc(O, src))
return
- O.loc = src
beaker = O
to_chat(user, "You add the container to the machine.")
update_icon()
diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm
index 9439346bba4..de881a0611c 100644
--- a/code/modules/hydroponics/gene_modder.dm
+++ b/code/modules/hydroponics/gene_modder.dm
@@ -80,7 +80,7 @@
if(seed)
to_chat(user, "A sample is already loaded into the machine!")
else
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory())
return
insert_seed(I)
to_chat(user, "You add [I] to the machine.")
@@ -90,10 +90,9 @@
if(disk)
to_chat(user, "A data disk is already loaded into the machine!")
else
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
disk = I
- disk.loc = src
to_chat(user, "You add [I] to the machine.")
interact(user)
else
@@ -269,7 +268,7 @@
else
var/obj/item/I = usr.get_active_held_item()
if (istype(I, /obj/item/seeds))
- if(!usr.drop_item())
+ if(!usr.temporarilyRemoveItemFromInventory(I))
return
insert_seed(I)
to_chat(usr, "You add [I] to the machine.")
@@ -283,10 +282,9 @@
else
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/disk/plantgene))
- if(!usr.drop_item())
+ if(!usr.transferItemToLoc(I, src))
return
disk = I
- disk.loc = src
to_chat(usr, "You add [I] to the machine.")
else if(href_list["op"] == "insert" && disk && disk.gene && seed)
if(!operation) // Wait for confirmation
diff --git a/code/modules/hydroponics/grown/cereals.dm b/code/modules/hydroponics/grown/cereals.dm
index 5e327015268..7834ed15e82 100644
--- a/code/modules/hydroponics/grown/cereals.dm
+++ b/code/modules/hydroponics/grown/cereals.dm
@@ -87,8 +87,7 @@
/obj/item/reagent_containers/food/snacks/grown/meatwheat/attack_self(mob/living/user)
user.visible_message("[user] crushes [src] into meat.", "You crush [src] into something that resembles meat.")
playsound(user, 'sound/effects/blobattack.ogg', 50, 1)
- var/obj/item/reagent_containers/food/snacks/meat/slab/meatwheat/M = new(get_turf(user))
- user.drop_item()
+ var/obj/item/reagent_containers/food/snacks/meat/slab/meatwheat/M = new
qdel(src)
user.put_in_hands(M)
return 1
diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm
index b32fa12a133..485ab6bfd85 100644
--- a/code/modules/hydroponics/grown/nettle.dm
+++ b/code/modules/hydroponics/grown/nettle.dm
@@ -115,4 +115,4 @@
if(prob(20))
M.Unconscious(force / 0.3)
M.Knockdown(force / 0.75)
- M.drop_item()
+ M.drop_all_held_items()
diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm
index cba3406a771..54805f3141b 100644
--- a/code/modules/hydroponics/seed_extractor.dm
+++ b/code/modules/hydroponics/seed_extractor.dm
@@ -13,7 +13,7 @@
if(istype(O, /obj/item/reagent_containers/food/snacks/grown/))
var/obj/item/reagent_containers/food/snacks/grown/F = O
if(F.seed)
- if(user && !user.drop_item()) //couldn't drop the item
+ if(user && !user.temporarilyRemoveItemFromInventory(O)) //couldn't drop the item
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
@@ -25,7 +25,7 @@
else if(istype(O, /obj/item/grown))
var/obj/item/grown/F = O
if(F.seed)
- if(user && !user.drop_item())
+ if(user && !user.temporarilyRemoveItemFromInventory(O))
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
@@ -181,13 +181,12 @@
if(ismob(O.loc))
var/mob/M = O.loc
- if(!M.drop_item())
+ if(!M.transferItemToLoc(O, src))
return 0
else if(istype(O.loc, /obj/item/storage))
var/obj/item/storage/S = O.loc
S.remove_from_storage(O,src)
- O.loc = src
. = 1
for (var/datum/seed_pile/N in piles)
if (O.plantname == N.name && O.lifespan == N.lifespan && O.endurance == N.endurance && O.maturation == N.maturation && O.production == N.production && O.yield == N.yield && O.potency == N.potency)
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 33f02bc7593..711ac4f33af 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -84,9 +84,8 @@
if(2)
if(is_type_in_list(I, allowed_books))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.loc = src
update_icon()
else if(istype(I, /obj/item/storage/bag/books))
var/obj/item/storage/bag/books/B = I
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index dc48bbae2d5..081ecdcdaa5 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -507,9 +507,8 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
/obj/machinery/libraryscanner/attackby(obj/O, mob/user, params)
if(istype(O, /obj/item/book))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(O, src))
return
- O.loc = src
else
return ..()
@@ -576,9 +575,8 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
if(busy)
to_chat(user, "The book binder is busy. Please wait for completion of previous operation.")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(P, src))
return
- P.loc = src
user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
audible_message("[src] begins to hum as it warms up its printing drums.")
busy = TRUE
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index d419ce7e38b..d76278a4104 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -67,8 +67,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
B.handle_item_insertion(src)
uses_left--
if(uses_left <= 0)
- user.drop_item(src)
- loc = A
+ user.transferItemToLoc(src, A, TRUE)
var/mutable_appearance/balloon
var/mutable_appearance/balloon2
var/mutable_appearance/balloon3
diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm
index 7c16f2f4203..12c9bfb30e5 100644
--- a/code/modules/mining/laborcamp/laborstacker.dm
+++ b/code/modules/mining/laborcamp/laborstacker.dm
@@ -24,9 +24,8 @@
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id/prisoner))
if(!inserted_id)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.forceMove(src)
inserted_id = I
to_chat(user, "You insert [I].")
return
@@ -83,9 +82,8 @@
else
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/card/id/prisoner))
- if(!usr.drop_item())
+ if(!usr.transferItemToLoc(I, src))
return
- I.forceMove(src)
inserted_id = I
if("claim_points")
inserted_id.points += stacking_machine.points
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 406d4444a81..5ab687cc665 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -1005,7 +1005,7 @@
if(H == L)
continue
to_chat(H, "You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!")
- H.put_in_hands_or_del(new /obj/item/kitchen/knife/butcher(H))
+ H.put_in_hands(new /obj/item/kitchen/knife/butcher(H), TRUE)
qdel(src)
diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm
index 38e02474f4b..437073a1fcd 100644
--- a/code/modules/mining/machine_redemption.dm
+++ b/code/modules/mining/machine_redemption.dm
@@ -166,9 +166,8 @@
if(istype(W, /obj/item/card/id))
var/obj/item/card/id/I = user.get_active_held_item()
if(istype(I) && !istype(inserted_id))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.forceMove(src)
inserted_id = I
interact(user)
return
diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm
index 8ae3632d340..5a228973cee 100644
--- a/code/modules/mining/machine_vending.dm
+++ b/code/modules/mining/machine_vending.dm
@@ -116,9 +116,8 @@
else if(href_list["choice"] == "insert")
var/obj/item/card/id/I = usr.get_active_held_item()
if(istype(I))
- if(!usr.drop_item())
+ if(!usr.transferItemToLoc(I, src))
return
- I.loc = src
inserted_id = I
to_chat(usr, "You insert the ID into [src]'s card slot.")
else
@@ -155,9 +154,8 @@
if(istype(I, /obj/item/card/id))
var/obj/item/card/id/C = usr.get_active_held_item()
if(istype(C) && !istype(inserted_id))
- if(!usr.drop_item())
+ if(!usr.transferItemToLoc(C, src))
return
- C.loc = src
inserted_id = C
to_chat(usr, "You insert the ID into [src]'s card slot.")
interact(user)
diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm
index 2836bd67f83..17c89b3af99 100644
--- a/code/modules/mining/satchel_ore_boxdm.dm
+++ b/code/modules/mining/satchel_ore_boxdm.dm
@@ -11,9 +11,7 @@
/obj/structure/ore_box/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/ore))
- if(!user.drop_item())
- return
- W.forceMove(src)
+ user.transferItemToLoc(W, src)
else if (istype(W, /obj/item/storage))
var/obj/item/storage/S = W
for(var/obj/item/ore/O in S.contents)
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 59e7db1286f..486a918c064 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -222,26 +222,10 @@
I.dropped(src)
return FALSE
-
-/mob/proc/put_in_hands_or_del(obj/item/I)
- return put_in_hands(I, TRUE)
-
-
-/mob/proc/drop_item_v() //this is dumb.
- if(stat == CONSCIOUS && isturf(loc))
- return drop_item()
- return FALSE
-
-
/mob/proc/drop_all_held_items()
+ . = FALSE
for(var/obj/item/I in held_items)
- dropItemToGround(I)
-
-//Drops the item in our active hand.
-/mob/proc/drop_item()
- var/obj/item/held = get_active_held_item()
- return dropItemToGround(held)
-
+ . |= dropItemToGround(I)
//Here lie drop_from_inventory and before_item_take, already forgotten and not missed.
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index aa15e28e66d..6ac5ab1bada 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -115,9 +115,8 @@
//since these people will be dead M != usr
if(!C.getorgan(/obj/item/organ/brain))
- if(!C.get_bodypart("head"))
+ if(!C.get_bodypart("head") || !C.temporarilyRemoveItemFromInventory(src))
return
- user.drop_item()
var/msg = "[C] has [src] inserted into [C.p_their()] head by [user]."
if(C == user)
msg = "[user] inserts [src] into [user.p_their()] head!"
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
index a09734ff494..36ed5ec8840 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm
@@ -51,7 +51,7 @@
"[M] has pushed down [src]!")
else
if (prob(50))
- drop_item()
+ dropItemToGround(get_active_held_item())
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("[M] has disarmed [src]!", \
"[M] has disarmed [src]!", null, COMBAT_MESSAGE_RANGE)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 7f7f9c1a8aa..323af207b59 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -204,7 +204,7 @@
return 0
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stunned instead.
- if(get_active_held_item() && drop_item())
+ if(dropItemToGround(get_active_held_item()))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("[M] disarmed [src]!", \
"[M] disarmed [src]!")
@@ -256,7 +256,7 @@
apply_damage(damage, BRUTE, affecting, armor_block)
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
- if(get_active_held_item() && drop_item())
+ if(dropItemToGround(get_active_held_item()))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("[M] disarmed [src]!", \
"[M] disarmed [src]!")
diff --git a/code/modules/mob/living/carbon/human/interactive.dm b/code/modules/mob/living/carbon/human/interactive.dm
index 404610c73ec..afa167ced63 100644
--- a/code/modules/mob/living/carbon/human/interactive.dm
+++ b/code/modules/mob/living/carbon/human/interactive.dm
@@ -657,7 +657,7 @@
insert_into_backpack()
//---------FASHION
if(istype(TARGET, /obj/item/clothing))
- drop_item()
+ temporarilyRemoveItemFromInventory(TARGET, TRUE)
dressup(TARGET)
update_hands = 1
if(MYPDA in src.loc || MYID in src.loc)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index ec22a5bb0c5..88fb3499fb4 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1198,7 +1198,7 @@
target.stop_pulling()
else
I = target.get_active_held_item()
- if(target.drop_item())
+ if(target.dropItemToGround(I))
target.visible_message("[user] has disarmed [target]!", \
"[user] has disarmed [target]!", null, COMBAT_MESSAGE_RANGE)
else
diff --git a/code/modules/mob/living/carbon/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm
index 20054d16bcd..e51017d8992 100644
--- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm
@@ -69,11 +69,9 @@
add_logs(M, src, "pushed")
visible_message("[M] has pushed down [src]!", \
"[M] has pushed down [src]!", null, COMBAT_MESSAGE_RANGE)
- else
- if(drop_item())
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
- visible_message("[M] has disarmed [src]!", \
- "[M] has disarmed [src]!", null, COMBAT_MESSAGE_RANGE)
+ else if(dropItemToGround(get_active_held_item()))
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ visible_message("[M] has disarmed [src]!", "[M] has disarmed [src]!", null, COMBAT_MESSAGE_RANGE)
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
@@ -113,12 +111,10 @@
"[M] has tackled down [name]!", null, COMBAT_MESSAGE_RANGE)
else
I = get_active_held_item()
- if(drop_item())
- visible_message("[M] has disarmed [name]!", \
- "[M] has disarmed [name]!", null, COMBAT_MESSAGE_RANGE)
+ if(dropItemToGround(I))
+ visible_message("[M] has disarmed [name]!", "[M] has disarmed [name]!", null, COMBAT_MESSAGE_RANGE)
else
- I = null//did not manage to actually disarm the item, gross but no time to refactor
-
+ I = null
add_logs(M, src, "disarmed", "[I ? " removing \the [I]" : ""]")
updatehealth()
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 381c9988654..3b7950df5e9 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -424,9 +424,8 @@
else if(cell)
to_chat(user, "There is a power cell already installed!")
else
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
- W.loc = src
cell = W
to_chat(user, "You insert the power cell.")
update_icons()
@@ -515,7 +514,7 @@
else if(U.locked)
to_chat(user, "The upgrade is locked and cannot be used yet!")
else
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(U))
return
if(U.action(src))
to_chat(user, "You apply the upgrade to [src].")
@@ -526,12 +525,13 @@
upgrades += U
else
to_chat(user, "Upgrade error.")
+ U.forceMove(drop_location())
else if(istype(W, /obj/item/device/toner))
if(toner >= tonermax)
to_chat(user, "The toner level of [src] is at its highest level possible!")
else
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(W))
return
toner = tonermax
qdel(W)
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 3e053b80af7..46a62a1d509 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -142,9 +142,6 @@
for(var/key in alarm_types_clear)
alarm_types_clear[key] = 0
-/mob/living/silicon/drop_item()
- return
-
/mob/living/silicon/can_inject(mob/user, error_msg)
if(error_msg)
to_chat(user, "Their outer shell is too tough.")
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 1afcdaaed4b..98b1b46ed8c 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -846,9 +846,8 @@ Pass a positive integer as an argument to override a bot's default speed.
else if(allow_pai && !key)
if(!locked && !open)
if(card.pai && card.pai.mind)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(card, src))
return
- card.forceMove(src)
paicard = card
user.visible_message("[user] inserts [card] into [src]!","You insert [card] into [src].")
paicard.pai.mind.transfer_to(src)
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index bbbe4e310c0..3a46e46bebb 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -223,10 +223,9 @@
if(!isnull(reagent_glass))
to_chat(user, "There is already a beaker loaded!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
- W.loc = src
reagent_glass = W
to_chat(user, "You insert [W].")
show_controls(user)
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 69d53594f20..c2cc13fb630 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -84,11 +84,9 @@
if(open)
on = FALSE
else if(istype(I, /obj/item/stock_parts/cell) && open && !cell)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- var/obj/item/stock_parts/cell/C = I
- C.loc = src
- cell = C
+ cell = I
visible_message("[user] inserts a cell into [src].",
"You insert the new cell into [src].")
else if(istype(I, /obj/item/crowbar) && open && cell)
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 9e595bc2095..2544167752a 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -174,7 +174,7 @@
usr.visible_message("[usr] pets [src].","You rest your hand on [src]'s back for a moment.")
return
- if(!usr.drop_item())
+ if(!usr.temporarilyRemoveItemFromInventory(item_to_add))
to_chat(usr, "\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s back!")
return
@@ -189,7 +189,7 @@
if(!allowed)
to_chat(usr, "You set [item_to_add] on [src]'s back, but it falls off!")
- item_to_add.loc = loc
+ item_to_add.forceMove(drop_location())
if(prob(25))
step_rand(item_to_add)
for(var/i in list(1,2,4,8,4,8,4,dir))
@@ -197,8 +197,7 @@
sleep(1)
return
- usr.drop_item()
- item_to_add.loc = src
+ item_to_add.forceMove(src)
src.inventory_back = item_to_add
update_corgi_fluff()
regenerate_icons()
@@ -226,7 +225,7 @@
user.visible_message("[user] pets [src].","You rest your hand on [src]'s head for a moment.")
return
- if(user && !user.drop_item())
+ if(user && !user.temporarilyRemoveItemFromInventory(item_to_add))
to_chat(user, "\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head!")
return 0
@@ -243,13 +242,13 @@
user.visible_message("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once.",
"You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks.",
"You hear a friendly-sounding bark.")
- item_to_add.loc = src
+ item_to_add.forceMove(src)
src.inventory_head = item_to_add
update_corgi_fluff()
regenerate_icons()
else
to_chat(user, "You set [item_to_add] on [src]'s head, but it falls off!")
- item_to_add.loc = loc
+ item_to_add.forceMove(drop_location())
if(prob(25))
step_rand(item_to_add)
for(var/i in list(1,2,4,8,4,8,4,dir))
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 0f8689b8514..f92bee5b3e8 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -268,7 +268,6 @@
if(!stat && eggsleft < 8)
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
user.visible_message(feedmsg)
- user.drop_item()
qdel(O)
eggsleft += rand(1, 4)
else
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index fc2cf729d7b..5f54710d8da 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -244,8 +244,8 @@
var/obj/item/device/radio/headset/headset_to_add = item_to_add
- usr.drop_item()
- headset_to_add.loc = src
+ if(!usr.transferItemToLoc(headset_to_add, src))
+ return
src.ears = headset_to_add
to_chat(usr, "You fit the headset onto [src].")
@@ -338,7 +338,6 @@
drop_held_item(0)
else if(istype(O, /obj/item/reagent_containers/food/snacks/cracker)) //Poly wants a cracker.
qdel(O)
- user.drop_item()
if(health < maxHealth)
adjustBruteLoss(-10)
speak_chance *= 1.27 // 20 crackers to go from 1% to 100%
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 4da630bb31f..a66b45d4a21 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -53,10 +53,11 @@
/client/Northwest()
- if(!usr.get_active_held_item())
+ var/obj/item/I = usr.get_active_held_item()
+ if(!I)
to_chat(usr, "You have nothing to drop in your hand!")
return
- usr.drop_item()
+ usr.dropItemToGround(I)
//This gets called when you press the delete button.
/client/verb/delete_key_pressed()
@@ -85,8 +86,8 @@
/client/verb/drop_item()
set hidden = 1
- if(!iscyborg(mob))
- mob.drop_item_v()
+ if(!iscyborg(mob) && mob.stat == CONSCIOUS)
+ mob.dropItemToGround(mob.get_active_held_item())
return
diff --git a/code/modules/modular_computers/file_system/programs/card.dm b/code/modules/modular_computers/file_system/programs/card.dm
index ead6a35eeaa..0562bf700df 100644
--- a/code/modules/modular_computers/file_system/programs/card.dm
+++ b/code/modules/modular_computers/file_system/programs/card.dm
@@ -175,9 +175,8 @@
else
var/obj/item/I = usr.get_active_held_item()
if (istype(I, /obj/item/card/id))
- if(!usr.drop_item())
+ if(!usr.transferItemToLoc(I, computer))
return
- I.forceMove(computer)
card_slot.stored_card = I
if("auth")
if(auth_card)
@@ -191,9 +190,8 @@
else
var/obj/item/I = usr.get_active_held_item()
if (istype(I, /obj/item/card/id))
- if(!usr.drop_item())
+ if(!usr.transferItemToLoc(I, computer))
return
- I.forceMove(computer)
card_slot.stored_card2 = I
if("PRG_terminate")
if(computer && ((id_card.assignment in head_subordinates) || id_card.assignment == "Assistant"))
diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm
index adec1aa19d2..99eb6f1a238 100644
--- a/code/modules/modular_computers/laptop_vendor.dm
+++ b/code/modules/modular_computers/laptop_vendor.dm
@@ -244,7 +244,7 @@
if(istype(I, /obj/item/stack/spacecash))
var/obj/item/stack/spacecash/c = I
- if(!user.drop_item(c))
+ if(!user.temporarilyRemoveItemFromInventory(c))
return
credits += c.value
visible_message("[usr] inserts [c.value] credits into the [src].")
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index 3eac093f1b3..22fe9a75a99 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -47,10 +47,9 @@
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/paper) || istype(P, /obj/item/folder) || istype(P, /obj/item/photo) || istype(P, /obj/item/documents))
- if(!user.drop_item())
+ if(!user.transferItemToLoc(P, src))
return
to_chat(user, "You put [P] in [src].")
- P.loc = src
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm
index 2c704b8568b..4a85d03df76 100644
--- a/code/modules/paperwork/paper_cutter.dm
+++ b/code/modules/paperwork/paper_cutter.dm
@@ -44,16 +44,15 @@
/obj/item/papercutter/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/paper) && !storedpaper)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(P, src))
return
playsound(loc, "pageturn", 60, 1)
to_chat(user, "You place [P] in [src].")
- P.loc = src
storedpaper = P
update_icon()
return
if(istype(P, /obj/item/hatchet/cutterblade) && !storedcutter)
- if(!user.drop_item())
+ if(!user.transferItemToLoc(P, src))
return
to_chat(user, "You replace [src]'s [P].")
P.loc = src
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index 0dcd5d09a0e..d4e78c4ef3c 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -240,7 +240,7 @@
updateUsrDialog()
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
- O.loc = src
+ O.forceMove(src)
to_chat(user, "You insert [O] into [src].")
flick("photocopier1", src)
updateUsrDialog()
@@ -261,7 +261,7 @@
resistance_flags |= FLAMMABLE
fire_act()
else
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(O))
return
copy = O
do_insertion(O, user)
@@ -270,7 +270,7 @@
else if(istype(O, /obj/item/photo))
if(copier_empty())
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(O))
return
photocopy = O
do_insertion(O, user)
@@ -279,7 +279,7 @@
else if(istype(O, /obj/item/documents))
if(copier_empty())
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(O))
return
doccopy = O
do_insertion(O, user)
@@ -288,7 +288,7 @@
else if(istype(O, /obj/item/device/toner))
if(toner <= 0)
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(O))
return
qdel(O)
toner = 40
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 056be0d0e2b..89b409dfe40 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -449,9 +449,8 @@
if (stat & MAINT)
to_chat(user, "There is no connector for your power cell!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(W, src))
return
- W.forceMove(src)
cell = W
user.visible_message(\
"[user.name] has inserted the power cell to [src.name]!",\
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 9943170f783..2b7fe06e05a 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -315,7 +315,7 @@
src.add_fingerprint(user)
var/obj/item/light/L = W
if(istype(L, light_type))
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory())
return
src.add_fingerprint(user)
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index 8399f73e79d..9b5592af3b0 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -87,10 +87,9 @@ GLOBAL_LIST_EMPTY(rad_collectors)
if(loaded_tank)
to_chat(user, "There's already a plasma tank loaded!")
return TRUE
- if(!user.drop_item())
- return TRUE
+ if(!user.transferItemToLoc(W, src))
+ return
loaded_tank = W
- W.forceMove(src)
update_icons()
else if(istype(W, /obj/item/crowbar))
if(loaded_tank)
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index dcc8c0a2007..fb530f128fc 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -240,7 +240,7 @@
if(!tracker)
if(istype(W, /obj/item/electronics/tracker))
- if(!user.drop_item())
+ if(!user.temporarilyRemoveItemFromInventory(W))
return
tracker = 1
qdel(W)
diff --git a/code/modules/projectiles/box_magazine.dm b/code/modules/projectiles/box_magazine.dm
index 29e27d18ba5..324470ede40 100644
--- a/code/modules/projectiles/box_magazine.dm
+++ b/code/modules/projectiles/box_magazine.dm
@@ -81,8 +81,7 @@
if(istype(A, /obj/item/ammo_casing))
var/obj/item/ammo_casing/AC = A
if(give_round(AC, replace_spent))
- user.drop_item()
- AC.forceMove(src)
+ user.transferItemToLoc(AC, src, TRUE)
num_loaded++
if(num_loaded)
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index e5767e48baf..564bcd04d81 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -164,7 +164,7 @@
to_chat(user, "You shoot yourself in the foot with [src]!")
var/shot_leg = pick("l_leg", "r_leg")
process_fire(user,user,0,params, zone_override = shot_leg)
- user.drop_item()
+ user.dropItemToGround(src, TRUE)
return
if(weapon_weight == WEAPON_HEAVY && user.get_inactive_held_item())
diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm
index 833c6cb7304..584445a5736 100644
--- a/code/modules/projectiles/guns/ballistic/revolver.dm
+++ b/code/modules/projectiles/guns/ballistic/revolver.dm
@@ -358,5 +358,5 @@
if(process_fire(user, user, 0, zone_override = "head"))
user.visible_message("[user] somehow manages to shoot [user.p_them()]self in the face!", "You somehow shoot yourself in the face! How the hell?!")
user.emote("scream")
- user.drop_item()
+ user.drop_all_held_items()
user.Knockdown(80)
diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm
index 730c1969e82..105e1704290 100644
--- a/code/modules/projectiles/guns/ballistic/shotgun.dm
+++ b/code/modules/projectiles/guns/ballistic/shotgun.dm
@@ -172,11 +172,11 @@
if(guns_left)
var/obj/item/gun/ballistic/shotgun/boltaction/enchanted/GUN = new gun_type
GUN.guns_left = guns_left - 1
- user.drop_item()
+ user.dropItemToGround(src, TRUE)
user.swap_hand()
user.put_in_hands(GUN)
else
- user.drop_item()
+ user.dropItemToGround(src, TRUE)
discard_gun(user)
// Automatic Shotguns//
diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm
index 5ee2ecec053..8772ae05c05 100644
--- a/code/modules/projectiles/guns/misc/blastcannon.dm
+++ b/code/modules/projectiles/guns/misc/blastcannon.dm
@@ -49,12 +49,11 @@
if(!T.tank_one || !T.tank_two)
to_chat(user, "What good would an incomplete bomb do?")
return FALSE
- if(!user.drop_item(O))
+ if(!user.transferItemToLoc(O, src))
to_chat(user, "The [O] seems to be stuck to your hand!")
return FALSE
user.visible_message("[user] attaches the [O] to the [src]!")
bomb = O
- O.forceMove(src)
update_icon()
return TRUE
return ..()
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index 21b5a2b07f8..60d1f647547 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -190,9 +190,7 @@
M.emote("laugh")
if(prob(33))
M.visible_message("[M]'s hands flip out and flail everywhere!")
- var/obj/item/I = M.get_active_held_item()
- if(I)
- M.drop_item()
+ M.drop_all_held_items()
..()
M.adjustToxLoss(1, 0)
M.adjustBrainLoss(pick(0.5, 0.6, 0.7, 0.8, 0.9, 1))
@@ -269,9 +267,7 @@
if(prob(20))
M.emote(pick("twitch","drool","moan"))
if(prob(33))
- var/obj/item/I = M.get_active_held_item()
- if(I)
- M.drop_item()
+ M.drop_all_held_items()
..()
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm
index 72001d5ca9d..f1b076ca686 100755
--- a/code/modules/reagents/chemistry/reagents/food_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm
@@ -256,7 +256,6 @@
victim.confused = max(M.confused, 3)
victim.damageoverlaytemp = 60
victim.Knockdown(60)
- victim.drop_item()
return
else if ( eyes_covered ) // Eye cover is better than mouth cover
victim.blur_eyes(3)
@@ -270,7 +269,6 @@
victim.confused = max(M.confused, 6)
victim.damageoverlaytemp = 75
victim.Knockdown(100)
- victim.drop_item()
victim.update_damage_hud()
/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/M)
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 38f3d68eff8..aa85a9dfaf8 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -626,27 +626,20 @@
/datum/reagent/medicine/morphine/overdose_process(mob/living/M)
if(prob(33))
- var/obj/item/I = M.get_active_held_item()
- if(I)
- M.drop_item()
+ M.drop_all_held_items()
M.Dizzy(2)
M.Jitter(2)
..()
/datum/reagent/medicine/morphine/addiction_act_stage1(mob/living/M)
if(prob(33))
- var/obj/item/I = M.get_active_held_item()
- if(I)
- M.drop_item()
- M.Dizzy(2)
+ M.drop_all_held_items()
M.Jitter(2)
..()
/datum/reagent/medicine/morphine/addiction_act_stage2(mob/living/M)
if(prob(33))
- var/obj/item/I = M.get_active_held_item()
- if(I)
- M.drop_item()
+ M.drop_all_held_items()
M.adjustToxLoss(1*REM, 0)
. = 1
M.Dizzy(3)
@@ -655,9 +648,7 @@
/datum/reagent/medicine/morphine/addiction_act_stage3(mob/living/M)
if(prob(33))
- var/obj/item/I = M.get_active_held_item()
- if(I)
- M.drop_item()
+ M.drop_all_held_items()
M.adjustToxLoss(2*REM, 0)
. = 1
M.Dizzy(4)
@@ -666,9 +657,7 @@
/datum/reagent/medicine/morphine/addiction_act_stage4(mob/living/M)
if(prob(33))
- var/obj/item/I = M.get_active_held_item()
- if(I)
- M.drop_item()
+ M.drop_all_held_items()
M.adjustToxLoss(3*REM, 0)
. = 1
M.Dizzy(5)
diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm
index 49e375b7231..2a194ee95c4 100644
--- a/code/modules/recycling/conveyor2.dm
+++ b/code/modules/recycling/conveyor2.dm
@@ -141,8 +141,7 @@
to_chat(user, "You reverse [src]'s direction.")
else if(user.a_intent != INTENT_HARM)
- if(user.drop_item())
- I.loc = src.loc
+ user.transferItemToLoc(I, drop_location())
else
return ..()
diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm
index 351e9a67613..b73ec3d009d 100644
--- a/code/modules/recycling/disposal-unit.dm
+++ b/code/modules/recycling/disposal-unit.dm
@@ -96,7 +96,7 @@
return
if(user.a_intent != INTENT_HARM)
- if(!user.drop_item() || (I.flags_1 & ABSTRACT_1))
+ if((I.flags_1 & ABSTRACT_1) || !user.temporarilyRemoveItemFromInventory(I))
return
place_item_in_disposal(I, user)
update_icon()
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index 5d3cde7aac9..790cba08896 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -43,12 +43,11 @@ Note: Must be placed within 3 tiles of the R&D Console
if (temp_tech.len == 0)
to_chat(user, "You cannot deconstruct this item!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(O, src))
to_chat(user, "\The [O] is stuck to your hand, you cannot put it in the [src.name]!")
return
busy = TRUE
loaded_item = O
- O.forceMove(src)
to_chat(user, "You add the [O.name] to the [src.name]!")
flick("d_analyzer_la", src)
addtimer(CALLBACK(src, .proc/finish_loading), 10)
diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm
index 4d8938b1b8a..3a2b1f6b7fa 100644
--- a/code/modules/research/experimentor.dm
+++ b/code/modules/research/experimentor.dm
@@ -122,10 +122,9 @@
if (temp_tech.len == 0)
to_chat(user, "You cannot experiment on this item!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(O, src))
return
loaded_item = O
- O.loc = src
to_chat(user, "You add the [O.name] to the machine.")
flick("h_lathe_load", src)
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index bfe7970e9f8..d912bc908e7 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -127,9 +127,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else
to_chat(user, "Machine cannot accept disks in that format.")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(D, src))
return
- D.loc = src
to_chat(user, "You add the disk to the machine!")
else if(!(linked_destroy && linked_destroy.busy) && !(linked_lathe && linked_lathe.busy) && !(linked_imprinter && linked_imprinter.busy))
. = ..()
diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm
index 1be515f1774..02180b273fc 100644
--- a/code/modules/research/xenobiology/xenobio_camera.dm
+++ b/code/modules/research/xenobiology/xenobio_camera.dm
@@ -70,7 +70,6 @@
if(istype(O, /obj/item/reagent_containers/food/snacks/monkeycube))
monkeys++
to_chat(user, "You feed [O] to [src]. It now has [monkeys] monkey cubes stored.")
- user.drop_item()
qdel(O)
return
else if(istype(O, /obj/item/storage/bag))
diff --git a/code/modules/spells/spell_types/conjure.dm b/code/modules/spells/spell_types/conjure.dm
index 08837c956dc..c73c5de58a2 100644
--- a/code/modules/spells/spell_types/conjure.dm
+++ b/code/modules/spells/spell_types/conjure.dm
@@ -75,9 +75,8 @@
item = null
else
for(var/mob/living/carbon/C in targets)
- if(C.drop_item())
- item = make_item()
- C.put_in_hands(item)
+ if(C.dropItemToGround(C.get_active_held_item()))
+ C.put_in_hands(make_item(), TRUE)
/obj/effect/proc_holder/spell/targeted/conjure_item/Destroy()
if(item)
diff --git a/code/modules/spells/spell_types/devil.dm b/code/modules/spells/spell_types/devil.dm
index 9d1afdcebc6..b1867413a3c 100644
--- a/code/modules/spells/spell_types/devil.dm
+++ b/code/modules/spells/spell_types/devil.dm
@@ -49,7 +49,7 @@
for(var/mob/living/carbon/C in targets)
if(C.mind && user.mind)
if(C.stat == DEAD)
- if(user.drop_item())
+ if(user.dropItemToGround(user.get_active_held_item()))
var/obj/item/paper/contract/infernal/revive/contract = new(user.loc, C.mind, user.mind)
user.put_in_hands(contract)
else
diff --git a/code/modules/spells/spell_types/devil_boons.dm b/code/modules/spells/spell_types/devil_boons.dm
index a0be169d85c..5d335745d2b 100644
--- a/code/modules/spells/spell_types/devil_boons.dm
+++ b/code/modules/spells/spell_types/devil_boons.dm
@@ -14,7 +14,7 @@
/obj/effect/proc_holder/spell/targeted/summon_wealth/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/C in targets)
- if(user.drop_item())
+ if(user.dropItemToGround(user.get_active_held_item()))
var/obj/item = pick(
new /obj/item/coin/gold(user.loc),
new /obj/item/coin/diamond(user.loc),
diff --git a/code/modules/spells/spell_types/infinite_guns.dm b/code/modules/spells/spell_types/infinite_guns.dm
index 6036d1a70bb..feb6eeddb6b 100644
--- a/code/modules/spells/spell_types/infinite_guns.dm
+++ b/code/modules/spells/spell_types/infinite_guns.dm
@@ -14,12 +14,9 @@
/obj/effect/proc_holder/spell/targeted/infinite_guns/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/C in targets)
- C.drop_item()
- C.swap_hand()
- C.drop_item()
+ C.drop_all_held_items()
var/GUN = new summon_path
C.put_in_hands(GUN)
- C.swap_hand(C.get_held_index_of_item(GUN))
/obj/effect/proc_holder/spell/targeted/infinite_guns/gun
diff --git a/code/modules/surgery/cavity_implant.dm b/code/modules/surgery/cavity_implant.dm
index a37502a96ba..8bad429102a 100644
--- a/code/modules/surgery/cavity_implant.dm
+++ b/code/modules/surgery/cavity_implant.dm
@@ -29,9 +29,8 @@
return 0
else
user.visible_message("[user] stuffs [tool] into [target]'s [target_zone]!", "You stuff [tool] into [target]'s [target_zone].")
- user.drop_item()
+ user.transferItemToLoc(tool, target, TRUE)
CH.cavity_item = tool
- tool.loc = target
return 1
else
if(IC)
diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm
index db3771ad215..0073c59f8d0 100644
--- a/code/modules/surgery/dental_implant.dm
+++ b/code/modules/surgery/dental_implant.dm
@@ -15,8 +15,7 @@
if(!istype(tool))
return 0
- user.drop_item()
- tool.loc = target
+ user.transferItemToLoc(tool, target, TRUE)
var/datum/action/item_action/hands_free/activate_pill/P = new(tool)
P.button.name = "Activate [tool.name]"
diff --git a/code/modules/surgery/limb_augmentation.dm b/code/modules/surgery/limb_augmentation.dm
index 2357ff134aa..2efd79539ae 100644
--- a/code/modules/surgery/limb_augmentation.dm
+++ b/code/modules/surgery/limb_augmentation.dm
@@ -53,7 +53,6 @@
L.change_bodypart_status(BODYPART_ROBOTIC, TRUE)
L.icon = tool.icon
L.max_damage = tool.max_damage
- user.drop_item()
qdel(tool)
target.update_body_parts()
target.updatehealth()
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index 42bfd30893f..1fa7fee496e 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -121,7 +121,7 @@
tool = I
else
I = tool
- user.drop_item()
+ user.temporarilyRemoveItemFromInventory(I, TRUE)
I.Insert(target)
user.visible_message("[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!",
"You insert [tool] into [target]'s [parse_zone(target_zone)].")
diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm
index caa6cc7a974..0de1683fbd2 100644
--- a/code/modules/surgery/organs/autosurgeon.dm
+++ b/code/modules/surgery/organs/autosurgeon.dm
@@ -49,9 +49,8 @@
else if(!uses)
to_chat(user, "[src] has already been used up.")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
- I.forceMove(src)
storedorgan = I
to_chat(user, "You insert the [I] into [src].")
else if(istype(I, /obj/item/screwdriver))
diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm
index d1699cb2576..9308154c486 100644
--- a/code/modules/surgery/organs/heart.dm
+++ b/code/modules/surgery/organs/heart.dm
@@ -89,7 +89,7 @@
/obj/item/organ/heart/cursed/attack(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target)
if(H == user && istype(H))
playsound(user,'sound/effects/singlebeat.ogg',40,1)
- user.drop_item()
+ user.temporarilyRemoveItemFromInventory(src, TRUE)
Insert(user)
else
return ..()
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index 4fdda7a7bcc..681dcb21cf8 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -92,10 +92,9 @@
if(status == ORGAN_ORGANIC)
var/obj/item/reagent_containers/food/snacks/S = prepare_eat()
if(S)
- H.drop_item()
- H.put_in_active_hand(S)
- S.attack(H, H)
qdel(src)
+ if(H.put_in_active_hand(S))
+ S.attack(H, H)
else
..()
diff --git a/code/modules/surgery/prosthetic_replacement.dm b/code/modules/surgery/prosthetic_replacement.dm
index e817416d7e8..2dddb95872d 100644
--- a/code/modules/surgery/prosthetic_replacement.dm
+++ b/code/modules/surgery/prosthetic_replacement.dm
@@ -63,9 +63,8 @@
tool.desc = "A container for holding body parts."
tool.cut_overlays()
tool = tool.contents[1]
- if(istype(tool, /obj/item/bodypart))
+ if(istype(tool, /obj/item/bodypart) && user.temporarilyRemoveItemFromInventory(tool))
var/obj/item/bodypart/L = tool
- user.drop_item()
L.attach_limb(target)
if(organ_rejection_dam)
target.adjustToxLoss(organ_rejection_dam)
diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm
index 7be42b6e4df..0d97cb63c19 100644
--- a/code/modules/vehicles/pimpin_ride.dm
+++ b/code/modules/vehicles/pimpin_ride.dm
@@ -47,10 +47,9 @@
if(mybag)
to_chat(user, "[src] already has a trashbag hooked!")
return
- if(!user.drop_item())
+ if(!user.transferItemToLoc(I, src))
return
to_chat(user, "You hook the trashbag onto [src].")
- I.loc = src
mybag = I
update_icon()
else if(istype(I, /obj/item/janiupgrade))