diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm
index 5dac0813820..8e94f07b2be 100644
--- a/code/ATMOSPHERICS/atmospherics.dm
+++ b/code/ATMOSPHERICS/atmospherics.dm
@@ -221,9 +221,9 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/attackby(var/obj/item/W, mob/user)
if(istype(W, /obj/item/pipe)) //lets you autodrop
var/obj/item/pipe/pipe = W
- user.drop_item(pipe)
- pipe.setPipingLayer(src.piping_layer) //align it with us
- return 1
+ if(user.drop_item(pipe))
+ pipe.setPipingLayer(src.piping_layer) //align it with us
+ return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if(src.machine_flags & WRENCHMOVE)
diff --git a/code/ATMOSPHERICS/hvac/chiller.dm b/code/ATMOSPHERICS/hvac/chiller.dm
index d8a503eeb3c..c57a12ea274 100644
--- a/code/ATMOSPHERICS/hvac/chiller.dm
+++ b/code/ATMOSPHERICS/hvac/chiller.dm
@@ -83,11 +83,11 @@
if(panel_open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
- usr.drop_item(C, src)
- cell = C
- C.add_fingerprint(usr)
+ if(usr.drop_item(C, src))
+ cell = C
+ C.add_fingerprint(usr)
- usr.visible_message("[usr] inserts a power cell into \the [src].", "You insert the power cell into \the [src].")
+ usr.visible_message("[usr] inserts a power cell into \the [src].", "You insert the power cell into \the [src].")
src.updateDialog()
return
diff --git a/code/ATMOSPHERICS/hvac/spaceheater.dm b/code/ATMOSPHERICS/hvac/spaceheater.dm
index 3d3680679bc..053e9059b36 100644
--- a/code/ATMOSPHERICS/hvac/spaceheater.dm
+++ b/code/ATMOSPHERICS/hvac/spaceheater.dm
@@ -114,10 +114,10 @@
// insert cell
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
- user.drop_item(C, src)
- cell = C
- C.add_fingerprint(usr)
- user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].")
+ if(user.drop_item(C, src))
+ cell = C
+ C.add_fingerprint(usr)
+ user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].")
else
to_chat(user, "The hatch must be open to insert a power cell.")
return
@@ -253,11 +253,11 @@
if(panel_open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
- usr.drop_item(C, src)
- cell = C
- C.add_fingerprint(usr)
+ if(usr.drop_item(C, src))
+ cell = C
+ C.add_fingerprint(usr)
- usr.visible_message("[usr] inserts a power cell into \the [src].", "You insert the power cell into \the [src].")
+ usr.visible_message("[usr] inserts a power cell into \the [src].", "You insert the power cell into \the [src].")
updateDialog()
else
diff --git a/code/ATMOSPHERICS/pipe/pipe_dispenser.dm b/code/ATMOSPHERICS/pipe/pipe_dispenser.dm
index 2ccdd812eb8..d576196c518 100644
--- a/code/ATMOSPHERICS/pipe/pipe_dispenser.dm
+++ b/code/ATMOSPHERICS/pipe/pipe_dispenser.dm
@@ -140,13 +140,13 @@
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob)
src.add_fingerprint(usr)
if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter) || istype(W, /obj/item/pipe_gsensor))
- to_chat(usr, "You put [W] back to [src].")
- user.drop_item(W, src)
- if(istype(W, /obj/item/pipe))
- returnToPool(W)
- else
- qdel(W)
- return
+ if(user.drop_item(W, src))
+ to_chat(usr, "You put [W] back to [src].")
+ if(istype(W, /obj/item/pipe))
+ returnToPool(W)
+ else
+ qdel(W)
+ return
else
return ..()
diff --git a/code/ATMOSPHERICS/pipe/pipe_planner.dm b/code/ATMOSPHERICS/pipe/pipe_planner.dm
index f0a40c844a2..1cbcc817a31 100644
--- a/code/ATMOSPHERICS/pipe/pipe_planner.dm
+++ b/code/ATMOSPHERICS/pipe/pipe_planner.dm
@@ -46,8 +46,8 @@
/datum/context_click/pipe_planner/action(obj/item/used_item, mob/user, params)
if(istype(used_item, /obj/item/pipe))
var/obj/item/pipe/pipe = used_item
- user.drop_item(pipe, get_turf(holder))
- var/dis = PIPING_LAYER_DEFAULT + (PIPING_LAYER_INCREMENT * return_clicked_id_by_params(params))
- pipe.setPipingLayer(dis)
- return 1
+ if(user.drop_item(pipe, get_turf(holder)))
+ var/dis = PIPING_LAYER_DEFAULT + (PIPING_LAYER_INCREMENT * return_clicked_id_by_params(params))
+ pipe.setPipingLayer(dis)
+ return 1
return 0
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index 6ef961b8f50..ec1262b5e7f 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -894,8 +894,8 @@
if(istype(W, /obj/item/pipe_meter))
var/obj/item/pipe_meter/meter = W
- user.drop_item(meter, src.loc)
- meter.setAttachLayer(src.piping_layer)
+ if(user.drop_item(meter, src.loc))
+ meter.setAttachLayer(src.piping_layer)
if(istype(W,/obj/item/device/analyzer))
var/obj/item/device/analyzer/A = W
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port.dm
index c96ea1ac4ed..190854aeadc 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port.dm
@@ -17,10 +17,10 @@
if(cur_assembly)
to_chat(user, "There is already a fuel rod assembly in there!")
else
- cur_assembly = I
- user.drop_item(I, src)
- icon_state = "port1"
- to_chat(user, "You insert [I] into [src]. Touch the panel again to insert [I] into the injector.")
+ if(user.drop_item(I, src))
+ cur_assembly = I
+ icon_state = "port1"
+ to_chat(user, "You insert [I] into [src]. Touch the panel again to insert [I] into the injector.")
/obj/machinery/rust_fuel_assembly_port/attack_hand(mob/user)
add_fingerprint(user)
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
index 758097c13d1..345ec3d8006 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
@@ -73,10 +73,10 @@
if(istype(W, /obj/item/weapon/fuel_assembly) && !cur_assembly)
if(emergency_insert_ready)
- cur_assembly = W
- user.drop_item(W, src)
- emergency_insert_ready = 0
- return
+ if(user.drop_item(W, src))
+ cur_assembly = W
+ emergency_insert_ready = 0
+ return
..()
return
diff --git a/code/WorkInProgress/Chinsky/ashtray.dm b/code/WorkInProgress/Chinsky/ashtray.dm
index 8df7fd3e87a..f4f353fc458 100644
--- a/code/WorkInProgress/Chinsky/ashtray.dm
+++ b/code/WorkInProgress/Chinsky/ashtray.dm
@@ -22,7 +22,7 @@
if (contents.len >= max_butts)
to_chat(user, "This ashtray is full.")
return
- user.drop_item(W, src)
+ user.drop_item(W, src, force_drop = 1)
var/obj/item/clothing/mask/cigarette/cig = W
if(istype(cig, /obj/item/weapon/cigbutt))
to_chat(user, "You drop the [cig] into [src].")
diff --git a/code/WorkInProgress/Mini/ATM.dm b/code/WorkInProgress/Mini/ATM.dm
index 57150a16136..6c64077f32c 100644
--- a/code/WorkInProgress/Mini/ATM.dm
+++ b/code/WorkInProgress/Mini/ATM.dm
@@ -89,11 +89,11 @@ log transactions
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = I
if(!held_card)
- usr.drop_item(idcard, src)
- held_card = idcard
- if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number)
- authenticated_account = null
- src.attack_hand(user)
+ if(usr.drop_item(idcard, src))
+ held_card = idcard
+ if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number)
+ authenticated_account = null
+ src.attack_hand(user)
else if(authenticated_account)
if(istype(I,/obj/item/weapon/spacecash))
var/obj/item/weapon/spacecash/dosh = I
@@ -456,8 +456,8 @@ log transactions
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item(I, src)
- held_card = I
+ if(usr.drop_item(I, src))
+ held_card = I
if("logout")
authenticated_account = null
failsafe = 1
diff --git a/code/WorkInProgress/kilakk/fax.dm b/code/WorkInProgress/kilakk/fax.dm
index 15d32315001..91488686041 100644
--- a/code/WorkInProgress/kilakk/fax.dm
+++ b/code/WorkInProgress/kilakk/fax.dm
@@ -155,8 +155,8 @@ var/list/alldepartments = list("Central Command")
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item(I, src)
- scan = I
+ if(usr.drop_item(I, src))
+ scan = I
authenticated = 0
if(href_list["dept"])
@@ -180,11 +180,11 @@ var/list/alldepartments = list("Central Command")
if(istype(O, /obj/item/weapon/paper))
if(!tofax)
- user.drop_item(O, src)
- tofax = O
- to_chat(user, "You insert the paper into \the [src].")
- flick("faxsend", src)
- updateUsrDialog()
+ if(user.drop_item(O, src))
+ tofax = O
+ to_chat(user, "You insert the paper into \the [src].")
+ flick("faxsend", src)
+ updateUsrDialog()
else
to_chat(user, "There is already something in \the [src].")
@@ -192,8 +192,8 @@ var/list/alldepartments = list("Central Command")
var/obj/item/weapon/card/id/idcard = O
if(!scan)
- usr.drop_item(idcard, src)
- scan = idcard
+ if(usr.drop_item(idcard, src))
+ scan = idcard
else if(istype(O, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
diff --git a/code/WorkInProgress/pomf/spacepods/spacepods.dm b/code/WorkInProgress/pomf/spacepods/spacepods.dm
index edf6e3e8eee..d45255a69f4 100644
--- a/code/WorkInProgress/pomf/spacepods/spacepods.dm
+++ b/code/WorkInProgress/pomf/spacepods/spacepods.dm
@@ -122,9 +122,9 @@
if(battery)
to_chat(user, "The pod already has a battery.")
return
- user.drop_item(W, src)
- battery = W
- return
+ if(user.drop_item(W, src))
+ battery = W
+ return
if(istype(W, /obj/item/device/spacepod_equipment))
if(!hatch_open)
return ..()
@@ -136,13 +136,12 @@
to_chat(user, "The pod already has a weapon system, remove it first.")
return
else
- to_chat(user, "You insert \the [W] into the equipment system.")
- user.drop_item(W, equipment_system)
- equipment_system.weapon_system = W
- equipment_system.weapon_system.my_atom = src
- new/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapon_system(src, equipment_system.weapon_system.verb_name, equipment_system.weapon_system.verb_desc) //Yes, it has to be referenced like that. W.verb_name/desc doesn't compile.
- return
-
+ if(user.drop_item(W, equipment_system))
+ to_chat(user, "You insert \the [W] into the equipment system.")
+ equipment_system.weapon_system = W
+ equipment_system.weapon_system.my_atom = src
+ new/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapon_system(src, equipment_system.weapon_system.verb_name, equipment_system.weapon_system.verb_desc) //Yes, it has to be referenced like that. W.verb_name/desc doesn't compile.
+ return
/obj/spacepod/attack_hand(mob/user as mob)
if(!hatch_open)
diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm
index d3710cfd0fa..f731eaee422 100644
--- a/code/datums/diseases/wizarditis.dm
+++ b/code/datums/diseases/wizarditis.dm
@@ -82,9 +82,8 @@ STI KALY - blind
var/mob/living/carbon/H = affected_mob
if(prob(chance))
if(!istype(H.r_hand, /obj/item/weapon/staff))
- if(H.r_hand) //no need to drop if we aren't holding anything
- H.drop_item(H.r_hand)
- H.put_in_r_hand( new /obj/item/weapon/staff(H) )
+ if(H.r_hand || H.drop_item(H.r_hand))
+ H.put_in_r_hand( new /obj/item/weapon/staff(H) )
return
return
diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm
index 26dd0cefc18..83e252aefa1 100644
--- a/code/datums/helper_datums/construction_datum.dm
+++ b/code/datums/helper_datums/construction_datum.dm
@@ -180,8 +180,8 @@
else
var/atom_name = used_atom.name
if(permanence || (Co_KEEP in given_step))
- user.drop_item(used_atom, holder)
- used_atoms.Add(list("[steps.Find(given_step)]" = used_atom))
+ if(user.drop_item(used_atom, holder))
+ used_atoms.Add(list("[steps.Find(given_step)]" = used_atom))
else
qdel(used_atom)
given_step[Co_AMOUNT]--
@@ -352,10 +352,10 @@
else
var/atom_name = used_atom.name
if(permanence || (Co_KEEP in given_step))
- user.drop_item(used_atom, holder)
- if(!("[index][diff == FORWARD ? "+" : "-"]" in used_atoms))
- used_atoms.Add(list("[index][diff == FORWARD ? "+" : "-"]" = list()))
- used_atoms["[index][diff == FORWARD ? "+" : "-"]"] += used_atom
+ if(user.drop_item(used_atom, holder))
+ if(!("[index][diff == FORWARD ? "+" : "-"]" in used_atoms))
+ used_atoms.Add(list("[index][diff == FORWARD ? "+" : "-"]" = list()))
+ used_atoms["[index][diff == FORWARD ? "+" : "-"]"] += used_atom
else
qdel(used_atom)
given_step[Co_AMOUNT]--
diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm
index 598ada500e5..cc7dad51b21 100644
--- a/code/datums/wires/wires.dm
+++ b/code/datums/wires/wires.dm
@@ -141,8 +141,8 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
// Attach
else
if(istype(I, /obj/item/device/assembly/signaler))
- L.drop_item(I)
- Attach(colour, I)
+ if(L.drop_item(I))
+ Attach(colour, I)
else
to_chat(L, "You need a remote signaller!")
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 85260c69c16..13252de6c94 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -306,8 +306,8 @@ var/global/list/PDA_Manifest = list()
siemens_coefficient = 1
/obj/item/weapon/beach_ball/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
- user.drop_item(src)
- src.throw_at(target, throw_range, throw_speed)
+ if(user.drop_item(src))
+ src.throw_at(target, throw_range, throw_speed)
/obj/effect/stop
var/victim = null
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 48b9b75f60e..46c53807a39 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -358,19 +358,19 @@
if(I.w_class) //if it has a defined weight
if(I.w_class == 2.0 || I.w_class == 3.0) //just one is too specific, so don't change this
if(!weight1)
- user.drop_item(I, src)
- weight1 = I
- user.show_message("You tie [weight1] to the [src].")
- update_icon()
- //del(I)
- return
+ if(user.drop_item(I, src))
+ weight1 = I
+ user.show_message("You tie [weight1] to the [src].")
+ update_icon()
+ //del(I)
+ return
if(!weight2) //just in case
- user.drop_item(I, src)
- weight2 = I
- user.show_message("You tie [weight2] to the [src].")
- update_icon()
- //del(I)
- return
+ if(user.drop_item(I, src))
+ weight2 = I
+ user.show_message("You tie [weight2] to the [src].")
+ update_icon()
+ //del(I)
+ return
else
user.show_message("There are already two weights on this [src]!")
return
@@ -423,14 +423,14 @@
IED = null
return
if(2,3)
- user.drop_item(I, src)
- var/turf/bombturf = get_turf(src)
- var/area/A = get_area(bombturf)
- var/log_str = "[key_name(usr)]? has rigged a beartrap with an IED at [A.name] (JMP)."
- message_admins(log_str)
- log_game(log_str)
- to_chat(user, "You sneak the [IED] underneath the pressure plate and connect the trigger wire.")
- desc = "A trap used to catch bears and other legged creatures. There is an IED hooked up to it."
+ if(user.drop_item(I, src))
+ var/turf/bombturf = get_turf(src)
+ var/area/A = get_area(bombturf)
+ var/log_str = "[key_name(usr)]? has rigged a beartrap with an IED at [A.name] (JMP)."
+ message_admins(log_str)
+ log_game(log_str)
+ to_chat(user, "You sneak the [IED] underneath the pressure plate and connect the trigger wire.")
+ desc = "A trap used to catch bears and other legged creatures. There is an IED hooked up to it."
else
to_chat(user, "You shouldn't be reading this message! Contact a coder or someone, something broke!")
IED = null
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index fd68e270cd3..87ec2d66581 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -224,11 +224,10 @@
if(beaker)
to_chat(user, "A beaker is already loaded into the machine.")
return
-
- beaker = item
- user.drop_item(beaker, src)
- user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
- return
+ if(user.drop_item(beaker, src))
+ beaker = item
+ user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
+ return
else if(istype(item, /obj/item/weapon/grab)) //sanity checks, you chucklefucks
var/obj/item/weapon/grab/G = item
if (!ismob(G.affecting))
diff --git a/code/game/gamemodes/endgame/xmas/snowman.dm b/code/game/gamemodes/endgame/xmas/snowman.dm
index f1b0ce210ab..abb57895ca0 100644
--- a/code/game/gamemodes/endgame/xmas/snowman.dm
+++ b/code/game/gamemodes/endgame/xmas/snowman.dm
@@ -75,15 +75,14 @@
/mob/living/simple_animal/hostile/retaliate/snowman/attackby(var/obj/item/W, var/mob/user)
if(!carrot && istype(W, /obj/item/weapon/reagent_containers/food/snacks/grown/carrot))
- visible_message("[user] puts \a [W] on \the [src]'s nose.")
- user.drop_item(W, src)
- carrot = W
- overlays += "snowman_carrot"
- speak -= "Would you happen to have a carrot for my nose?"
- src.say("Ah, most excellent!")
- if(prob(30))
- call(/obj/item/weapon/winter_gift/proc/pick_a_gift)(src.loc)
-
+ if(user.drop_item(W, src))
+ visible_message("[user] puts \a [W] on \the [src]'s nose.")
+ carrot = W
+ overlays += "snowman_carrot"
+ speak -= "Would you happen to have a carrot for my nose?"
+ src.say("Ah, most excellent!")
+ if(prob(30))
+ call(/obj/item/weapon/winter_gift/proc/pick_a_gift)(src.loc)
else if(istype(W,/obj/item/clothing/head/))
if(hat)
@@ -92,10 +91,10 @@
hat = null
else
speak += "I feel so dandy!"
- user.drop_item(W, src)
- hat = W
+ if(user.drop_item(W, src))
+ hat = W
- overlays += image('icons/mob/head.dmi', hat.icon_state)
+ overlays += image('icons/mob/head.dmi', hat.icon_state)
else ..()
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 933dd337ac0..78282db147d 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -38,7 +38,7 @@ var/bomb_set
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
if (src.extended)
if (istype(O, /obj/item/weapon/disk/nuclear))
- usr.drop_item(O, src)
+ usr.drop_item(O, src, force_drop = 1)
src.auth = O
src.add_fingerprint(user)
return
@@ -188,7 +188,7 @@ var/bomb_set
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/disk/nuclear))
- usr.drop_item(I, src)
+ usr.drop_item(I, src, force_drop = 1) //FORCE DROP for balance reasons
src.auth = I
if (src.auth)
if (href_list["type"])
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index 3610a1f91a9..3526de57bde 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -81,9 +81,9 @@
if ((( istype(O, /obj/item/weapon) ) || user.get_active_hand() == O))
- user.drop_item(O)
- if (O.loc != src.loc)
- step(O, get_dir(O, src))
+ if(user.drop_item(O))
+ if (O.loc != src.loc)
+ step(O, get_dir(O, src))
return
else
if(!ismob(O)) //humans only
diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm
index c66fdcbb5ec..d06149b8c79 100644
--- a/code/game/machinery/atmoalter/portable_atmospherics.dm
+++ b/code/game/machinery/atmoalter/portable_atmospherics.dm
@@ -86,10 +86,10 @@
if (src.holding)
return 0
var/obj/item/weapon/tank/T = W
- user.drop_item(T, src)
- src.holding = T
- update_icon()
- return 1
+ if(user.drop_item(T, src))
+ src.holding = T
+ update_icon()
+ return 1
else if (istype(W, /obj/item/weapon/wrench))
if(connected_port)
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 68c45afcb49..1a18eb5af8f 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -177,9 +177,10 @@
else
to_chat(user, "You cannot recycle your built in tools.")
return 1
- user.drop_item(I, src)
- materials.removeFrom(I.materials)
- user.visible_message("[user] puts \the [I] into \the [src]'s recycling unit.",
- "You put \the [I] in \the [src]'s reycling unit.")
- qdel(I)
+
+ if(user.drop_item(I, src))
+ materials.removeFrom(I.materials)
+ user.visible_message("[user] puts \the [I] into \the [src]'s recycling unit.",
+ "You put \the [I] in \the [src]'s reycling unit.")
+ qdel(I)
return 1
diff --git a/code/game/machinery/bees_apiary.dm b/code/game/machinery/bees_apiary.dm
index 8c1af986a37..a4a029871d0 100644
--- a/code/game/machinery/bees_apiary.dm
+++ b/code/game/machinery/bees_apiary.dm
@@ -71,12 +71,12 @@
if(health > 0)
to_chat(user, "There is already a queen in there.")
else
- health = 10
- nutrilevel = min(10,nutrilevel+10)
- user.drop_item(O)
- qdel(O)
- to_chat(user, "You carefully insert the queen into [src], she gets busy making a hive.")
- bees_in_hive = 0
+ if(user.drop_item(O))
+ health = 10
+ nutrilevel = min(10,nutrilevel+10)
+ qdel(O)
+ to_chat(user, "You carefully insert the queen into [src], she gets busy making a hive.")
+ bees_in_hive = 0
else if(istype(O, /obj/item/beezeez))
beezeez += 100
nutrilevel += 10
diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm
index 143d89b34f6..5e52a0599c5 100644
--- a/code/game/machinery/bioprinter.dm
+++ b/code/game/machinery/bioprinter.dm
@@ -86,19 +86,19 @@
return
// Meat for biomass.
else if(!prints_prosthetics && istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
- visible_message("\The [src] processes \the [W].")
- stored_matter += 50
- user.drop_item(W)
- qdel(W)
- return
+ if(user.drop_item(W))
+ visible_message("\The [src] processes \the [W].")
+ stored_matter += 50
+ qdel(W)
+ return
// Steel for matter.
else if(prints_prosthetics && istype(W, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = W
- visible_message("\The [src] processes \the [W].")
- stored_matter += M.amount * 10
- user.drop_item(M)
- returnToPool(M)
- return
+ if(user.drop_item(M))
+ visible_message("\The [src] processes \the [W].")
+ stored_matter += M.amount * 10
+ returnToPool(M)
+ return
else if(istype(W, /obj/item/weapon/wrench))
user.visible_message("[user] begins to [anchored? "unfasten" : "fasten"] \the [src].", "You begin to [anchored? "unfasten" : "fasten"] \the [src].", "You hear a ratchet.")
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm
index bde1bae1d87..26064da094b 100644
--- a/code/game/machinery/bots/cleanbot.dm
+++ b/code/game/machinery/bots/cleanbot.dm
@@ -339,14 +339,14 @@ text("[src.oddbutton ? "Yes" : "No"
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob)
..()
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
- user.drop_item(W)
- qdel(W)
- var/turf/T = get_turf(src.loc)
- var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot(T)
- A.name = src.created_name
- to_chat(user, "You add the robot arm to the bucket and sensor assembly. Beep boop!")
- user.drop_from_inventory(src)
- qdel(src)
+ if(user.drop_item(W))
+ qdel(W)
+ var/turf/T = get_turf(src.loc)
+ var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot(T)
+ A.name = src.created_name
+ to_chat(user, "You add the robot arm to the bucket and sensor assembly. Beep boop!")
+ user.drop_from_inventory(src)
+ qdel(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm
index 1d3adc79b3c..38e7ad895ad 100644
--- a/code/game/machinery/bots/ed209bot.dm
+++ b/code/game/machinery/bots/ed209bot.dm
@@ -213,14 +213,14 @@ Auto Patrol: []"},
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user) && !open && !emagged)
src.locked = !src.locked
- to_chat(user, "Controls are now [src.locked ? "locked" : "unlocked"].")
+ to_chat(user, "Controls are now [src.locked ? "locked" : "unlocked"].")
else
if(emagged)
- to_chat(user, "ERROR")
+ to_chat(user, "ERROR")
if(open)
- to_chat(user, "Please close the access panel before locking it.")
+ to_chat(user, "Please close the access panel before locking it.")
else
- to_chat(user, "Access denied.")
+ to_chat(user, "Access denied.")
else
..()
if (!istype(W, /obj/item/weapon/screwdriver) && (!src.target))
@@ -236,7 +236,7 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/Emag(mob/user as mob)
..()
if(open && !locked)
- if(user) to_chat(user, "You short out [src]'s target assessment circuits.")
+ if(user) to_chat(user, "You short out [src]'s target assessment circuits.")
spawn(0)
for(var/mob/O in hearers(src, null))
O.show_message("[src] buzzes oddly!", 1)
@@ -295,7 +295,7 @@ Auto Patrol: []"},
// if can't reach perp for long enough, go idle
if (src.frustration >= 8)
// for(var/mob/O in hearers(src, null))
-// to_chat(O, "[src] beeps, \"Backup requested! Suspect has evaded arrest.\"")
+// to_chat(O, "[src] beeps, \"Backup requested! Suspect has evaded arrest.\"")
src.target = null
src.last_found = world.time
src.frustration = 0
@@ -546,9 +546,9 @@ Auto Patrol: []"},
return
/*
- to_chat(world, "rec signal: [signal.source]")
+ to_chat(world, "rec signal: [signal.source]")
for(var/x in signal.data)
- to_chat(world, "* [x] = [signal.data[x]]")
+ to_chat(world, "* [x] = [signal.data[x]]")
*/
var/recv = signal.data["command"]
@@ -631,7 +631,7 @@ Auto Patrol: []"},
signal.transmission_method = 1
//for(var/key in keyval)
// signal.data[key] = keyval[key]
-// to_chat(world, "sent [key],[keyval[key]] on [freq]")
+// to_chat(world, "sent [key],[keyval[key]] on [freq]")
signal.data = keyval
if (signal.data["findbeacon"])
frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
@@ -948,17 +948,17 @@ Auto Patrol: []"},
switch(build_step)
if(0,1)
if( istype(W, /obj/item/robot_parts/l_leg) || istype(W, /obj/item/robot_parts/r_leg) )
- user.drop_item(W)
- qdel(W)
- build_step++
- to_chat(user, "You add the robot leg to [src].")
- name = "legs/frame assembly"
- if(build_step == 1)
- item_state = "ed209_leg"
- icon_state = "ed209_leg"
- else
- item_state = "ed209_legs"
- icon_state = "ed209_legs"
+ if(user.drop_item(W))
+ qdel(W)
+ build_step++
+ to_chat(user, "You add the robot leg to [src].")
+ name = "legs/frame assembly"
+ if(build_step == 1)
+ item_state = "ed209_leg"
+ icon_state = "ed209_leg"
+ else
+ item_state = "ed209_legs"
+ icon_state = "ed209_legs"
if(2)
if( istype(W, /obj/item/clothing/suit/redtag) )
@@ -966,13 +966,13 @@ Auto Patrol: []"},
else if( istype(W, /obj/item/clothing/suit/bluetag) )
lasercolor = "b"
if( lasercolor || istype(W, /obj/item/clothing/suit/armor/vest) )
- user.drop_item(W)
- qdel(W)
- build_step++
- to_chat(user, "You add the armor to [src].")
- name = "vest/legs/frame assembly"
- item_state = "[lasercolor]ed209_shell"
- icon_state = "[lasercolor]ed209_shell"
+ if(user.drop_item(W))
+ qdel(W)
+ build_step++
+ to_chat(user, "You add the armor to [src].")
+ name = "vest/legs/frame assembly"
+ item_state = "[lasercolor]ed209_shell"
+ icon_state = "[lasercolor]ed209_shell"
if(3)
if( istype(W, /obj/item/weapon/weldingtool) )
@@ -980,40 +980,43 @@ Auto Patrol: []"},
if(WT.remove_fuel(0,user))
build_step++
name = "shielded frame assembly"
- to_chat(user, "You welded the vest to [src].")
+ to_chat(user, "You welded the vest to [src].")
if(4)
if( istype(W, /obj/item/clothing/head/helmet) )
- user.drop_item(W)
- qdel(W)
- build_step++
- to_chat(user, "You add the helmet to [src].")
- name = "covered and shielded frame assembly"
- item_state = "[lasercolor]ed209_hat"
- icon_state = "[lasercolor]ed209_hat"
+ if(user.drop_item(W))
+ qdel(W)
+ build_step++
+ to_chat(user, "You add the helmet to [src].")
+ name = "covered and shielded frame assembly"
+ item_state = "[lasercolor]ed209_hat"
+ icon_state = "[lasercolor]ed209_hat"
if(5)
if( isprox(W) )
- user.drop_item(W)
- qdel(W)
- build_step++
- to_chat(user, "You add the prox sensor to [src].")
- name = "covered, shielded and sensored frame assembly"
- item_state = "[lasercolor]ed209_prox"
- icon_state = "[lasercolor]ed209_prox"
+ if(user.drop_item(W))
+ qdel(W)
+ build_step++
+ to_chat(user, "You add the prox sensor to [src].")
+ name = "covered, shielded and sensored frame assembly"
+ item_state = "[lasercolor]ed209_prox"
+ icon_state = "[lasercolor]ed209_prox"
if(6)
if( istype(W, /obj/item/stack/cable_coil) )
var/obj/item/stack/cable_coil/coil = W
var/turf/T = get_turf(user)
- to_chat(user, "You start to wire [src]...")
+ to_chat(user, "You start to wire [src]...")
sleep(40)
if(get_turf(user) == T)
coil.use(1)
build_step++
- to_chat(user, "You wire the ED-209 assembly.")
+ to_chat(user, "You wire the ED-209 assembly.")
name = "wired ED-209 assembly"
if(7)
+ if(!user.drop_item(W))
+ return
+
switch(lasercolor)
if("b")
if( !istype(W, /obj/item/weapon/gun/energy/laser/bluetag) )
@@ -1030,30 +1033,31 @@ Auto Patrol: []"},
else
return
build_step++
- to_chat(user, "You add [W] to [src].")
+ to_chat(user, "You add [W] to [src].")
src.item_state = "[lasercolor]ed209_taser"
src.icon_state = "[lasercolor]ed209_taser"
- user.drop_item(W)
qdel(W)
if(8)
if( istype(W, /obj/item/weapon/screwdriver) )
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
var/turf/T = get_turf(user)
- to_chat(user, "Now attaching the gun to the frame...")
+ to_chat(user, "Now attaching the gun to the frame...")
sleep(40)
if(get_turf(user) == T)
build_step++
name = "armed [name]"
- to_chat(user, "Taser gun attached.")
+ to_chat(user, "Taser gun attached.")
if(9)
if( istype(W, /obj/item/weapon/cell) )
+ if(!user.drop_item(W))
+ return
+
build_step++
- to_chat(user, "You complete the ED-209.")
+ to_chat(user, "You complete the ED-209.")
var/turf/T = get_turf(src)
new /obj/machinery/bot/ed209(T,created_name,lasercolor)
- user.drop_item(W)
qdel(W)
user.drop_from_inventory(src)
qdel(src)
diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm
index d0922ecb78f..f0037443681 100644
--- a/code/game/machinery/bots/farmbot.dm
+++ b/code/game/machinery/bots/farmbot.dm
@@ -178,11 +178,11 @@
if ( get_total_ferts() >= Max_Fertilizers )
to_chat(user, "The fertilizer storage is full!")
return
- user.drop_item(W, src)
- to_chat(user, "You insert [W].")
- flick("farmbot_hatch",src)
- src.updateUsrDialog()
- return
+ if(user.drop_item(W, src))
+ to_chat(user, "You insert [W].")
+ flick("farmbot_hatch",src)
+ src.updateUsrDialog()
+ return
else
..()
diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm
index 94e5c43f116..d4319b56350 100644
--- a/code/game/machinery/bots/medbot.dm
+++ b/code/game/machinery/bots/medbot.dm
@@ -178,7 +178,7 @@
src.reagent_glass.loc = get_turf(src)
src.reagent_glass = null
else
- to_chat(usr, "You cannot eject the beaker because the panel is locked.")
+ to_chat(usr, "You cannot eject the beaker because the panel is locked.")
else if ((href_list["togglevoice"]) && (!src.locked || issilicon(usr)))
src.shut_up = !src.shut_up
@@ -196,29 +196,29 @@
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user) && !open && !emagged)
src.locked = !src.locked
- to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]")
+ to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]")
src.updateUsrDialog()
else
if(emagged)
- to_chat(user, "ERROR")
+ to_chat(user, "ERROR")
if(open)
- to_chat(user, "Please close the access panel before locking it.")
+ to_chat(user, "Please close the access panel before locking it.")
else
- to_chat(user, "Access denied.")
+ to_chat(user, "Access denied.")
else if (istype(W, /obj/item/weapon/reagent_containers/glass))
if(src.locked)
- to_chat(user, "You cannot insert a beaker because the panel is locked.")
+ to_chat(user, "You cannot insert a beaker because the panel is locked.")
return
if(!isnull(src.reagent_glass))
- to_chat(user, "There is already a beaker loaded.")
+ to_chat(user, "There is already a beaker loaded.")
return
- user.drop_item(W, src)
- src.reagent_glass = W
- to_chat(user, "You insert [W].")
- src.updateUsrDialog()
- return
+ if(user.drop_item(W, src))
+ src.reagent_glass = W
+ to_chat(user, "You insert [W].")
+ src.updateUsrDialog()
+ return
else
..()
@@ -229,7 +229,7 @@
..()
if(open && !locked)
declare_crit = 0
- if(user) to_chat(user, "You short out [src]'s reagent synthesis circuits.")
+ if(user) to_chat(user, "You short out [src]'s reagent synthesis circuits.")
spawn(0)
for(var/mob/O in hearers(src, null))
O.show_message("[src] buzzes oddly!", 1)
@@ -559,7 +559,7 @@
//Making a medibot!
if(src.contents.len >= 1)
- to_chat(user, "You need to empty [src] out first.")
+ to_chat(user, "You need to empty [src] out first.")
return
var/obj/item/weapon/firstaid_arm_assembly/A = new /obj/item/weapon/firstaid_arm_assembly
@@ -573,7 +573,7 @@
qdel(S)
S = null
user.put_in_hands(A)
- to_chat(user, "You add the robot arm to the first aid kit.")
+ to_chat(user, "You add the robot arm to the first aid kit.")
user.drop_from_inventory(src)
qdel(src)
@@ -591,10 +591,11 @@
switch(build_step)
if(0)
if(istype(W, /obj/item/device/healthanalyzer))
+<<<<<<< 636687c2a83b23b7efc3a052c68c16a6ced66ca8
user.drop_item(W)
qdel(W)
src.build_step++
- to_chat(user, "You add the health sensor to [src].")
+ to_chat(user, "You add the health sensor to [src].")
src.name = "First aid/robot arm/health analyzer assembly"
src.overlays += image('icons/obj/aibots.dmi', "na_scanner")
@@ -603,13 +604,34 @@
user.drop_item(W)
qdel(W)
src.build_step++
- to_chat(user, "You complete the Medibot! Beep boop.")
+ to_chat(user, "You complete the Medibot! Beep boop.")
var/turf/T = get_turf(src)
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
S.skin = src.skin
S.name = src.created_name
user.drop_from_inventory(src)
qdel(src)
+=======
+ if(user.drop_item(W))
+ qdel(W)
+ src.build_step++
+ user << "You add the health sensor to [src]."
+ src.name = "First aid/robot arm/health analyzer assembly"
+ src.overlays += image('icons/obj/aibots.dmi', "na_scanner")
+
+ if(1)
+ if(isprox(W))
+ if(user.drop_item(W))
+ qdel(W)
+ src.build_step++
+ user << "You complete the Medibot! Beep boop."
+ var/turf/T = get_turf(src)
+ var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
+ S.skin = src.skin
+ S.name = src.created_name
+ user.drop_from_inventory(src)
+ del(src)
+>>>>>>> adds clown glue
/obj/machinery/bot/medbot/declare()
diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm
index d29f19e2f2d..2ed507f4a4f 100644
--- a/code/game/machinery/bots/mulebot.dm
+++ b/code/game/machinery/bots/mulebot.dm
@@ -122,9 +122,9 @@ var/global/mulebot_count = 0
else if(istype(I,/obj/item/weapon/cell) && open && !cell)
var/obj/item/weapon/cell/C = I
- user.drop_item(C, src)
- cell = C
- updateDialog()
+ if(user.drop_item(C, src))
+ cell = C
+ updateDialog()
else if(istype(I,/obj/item/weapon/wirecutters)||istype(I,/obj/item/device/multitool))
attack_hand(user)
else if(istype(I,/obj/item/weapon/screwdriver))
@@ -304,12 +304,12 @@ var/global/mulebot_count = 0
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
- usr.drop_item(C, src)
- cell = C
- C.add_fingerprint(usr)
+ if(usr.drop_item(C, src))
+ cell = C
+ C.add_fingerprint(usr)
- usr.visible_message("[usr] inserts a power cell into [src].", "You insert the power cell into [src].")
- updateDialog()
+ usr.visible_message("[usr] inserts a power cell into [src].", "You insert the power cell into [src].")
+ updateDialog()
if("stop")
diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm
index b059ff78aa9..5ff2c276791 100644
--- a/code/game/machinery/bots/secbot.dm
+++ b/code/game/machinery/bots/secbot.dm
@@ -189,14 +189,14 @@ Auto Patrol: []"},
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.allowed(user) && !open && !emagged)
src.locked = !src.locked
- to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]")
+ to_chat(user, "Controls are now [src.locked ? "locked." : "unlocked."]")
else
if(emagged)
- to_chat(user, "ERROR")
+ to_chat(user, "ERROR")
if(open)
- to_chat(user, "Please close the access panel before locking it.")
+ to_chat(user, "Please close the access panel before locking it.")
else
- to_chat(user, "Access denied.")
+ to_chat(user, "Access denied.")
else
..()
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
@@ -211,7 +211,7 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/Emag(mob/user as mob)
..()
if(open && !locked)
- if(user) to_chat(user, "You short out [src]'s target assessment circuits.")
+ if(user) to_chat(user, "You short out [src]'s target assessment circuits.")
spawn(0)
for(var/mob/O in hearers(src, null))
O.show_message("[src] buzzes oddly!", 1)
@@ -244,7 +244,7 @@ Auto Patrol: []"},
// if can't reach perp for long enough, go idle
if(src.frustration >= 8)
// for(var/mob/O in hearers(src, null))
-// to_chat(O, "[src] beeps, \"Backup requested! Suspect has evaded arrest.\"")
+// to_chat(O, "[src] beeps, \"Backup requested! Suspect has evaded arrest.\"")
src.target = null
src.last_found = world.time
src.frustration = 0
@@ -519,9 +519,9 @@ Auto Patrol: []"},
return
/*
- to_chat(world, "rec signal: [signal.source]")
+ to_chat(world, "rec signal: [signal.source]")
for(var/x in signal.data)
- to_chat(world, "* [x] = [signal.data[x]]")
+ to_chat(world, "* [x] = [signal.data[x]]")
*/
var/recv = signal.data["command"]
@@ -605,7 +605,7 @@ Auto Patrol: []"},
//for(var/key in keyval)
// signal.data[key] = keyval[key]
signal.data = keyval
-// to_chat(world, "sent [key],[keyval[key]] on [freq]")
+// to_chat(world, "sent [key],[keyval[key]] on [freq]")
if(signal.data["findbeacon"])
frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
else if(signal.data["type"] == "secbot")
@@ -807,7 +807,7 @@ Auto Patrol: []"},
qdel(S)
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
user.put_in_hands(A)
- to_chat(user, "You add the signaler to the helmet.")
+ to_chat(user, "You add the signaler to the helmet.")
user.drop_from_inventory(src)
qdel(src)
else
@@ -820,33 +820,33 @@ Auto Patrol: []"},
if(WT.remove_fuel(0,user))
src.build_step++
src.overlays += image('icons/obj/aibots.dmi', "hs_hole")
- to_chat(user, "You weld a hole in [src]!")
+ to_chat(user, "You weld a hole in [src]!")
else if(isprox(W) && (src.build_step == 1))
- user.drop_item(W)
- src.build_step++
- to_chat(user, "You add the prox sensor to [src]!")
- src.overlays += image('icons/obj/aibots.dmi', "hs_eye")
- src.name = "helmet/signaler/prox sensor assembly"
- qdel(W)
+ if(user.drop_item(W))
+ src.build_step++
+ to_chat(user, "You add the prox sensor to [src]!")
+ src.overlays += image('icons/obj/aibots.dmi', "hs_eye")
+ src.name = "helmet/signaler/prox sensor assembly"
+ qdel(W)
else if(((istype(W, /obj/item/robot_parts/l_arm)) || (istype(W, /obj/item/robot_parts/r_arm))) && (src.build_step == 2))
- user.drop_item(W)
- src.build_step++
- to_chat(user, "You add the robot arm to [src]!")
- src.name = "helmet/signaler/prox sensor/robot arm assembly"
- src.overlays += image('icons/obj/aibots.dmi', "hs_arm")
- qdel(W)
+ if(user.drop_item(W))
+ src.build_step++
+ to_chat(user, "You add the robot arm to [src]!")
+ src.name = "helmet/signaler/prox sensor/robot arm assembly"
+ src.overlays += image('icons/obj/aibots.dmi', "hs_arm")
+ qdel(W)
else if((istype(W, /obj/item/weapon/melee/baton)) && (src.build_step >= 3))
- user.drop_item(W)
- src.build_step++
- to_chat(user, "You complete the Securitron! Beep boop.")
- var/obj/machinery/bot/secbot/S = new /obj/machinery/bot/secbot
- S.loc = get_turf(src)
- S.name = src.created_name
- qdel(W)
- qdel(src)
+ if(user.drop_item(W))
+ src.build_step++
+ to_chat(user, "You complete the Securitron! Beep boop.")
+ var/obj/machinery/bot/secbot/S = new /obj/machinery/bot/secbot
+ S.loc = get_turf(src)
+ S.name = src.created_name
+ qdel(W)
+ qdel(src)
else if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
diff --git a/code/game/machinery/candymachine.dm b/code/game/machinery/candymachine.dm
index c87e812ffd2..712b78083cf 100644
--- a/code/game/machinery/candymachine.dm
+++ b/code/game/machinery/candymachine.dm
@@ -17,21 +17,21 @@
return ..()
if (is_type_in_list(O, list(/obj/item/weapon/coin/, /obj/item/weapon/reagent_containers/food/snacks/chococoin)))
if(emagged == 1)
- user.drop_item(O, src)
- user.visible_message("[user] puts a coin into [src] and turns the knob.", "You put a coin into [src] and turn the knob.")
- src.visible_message("[src] rattles ominously!")
- sleep(rand(10,15))
- src.visible_message("[src] dispenses a strange sweet!")
- new /obj/item/weapon/reagent_containers/food/snacks/sweet/strange(src.loc)
- qdel(O)
+ if(user.drop_item(O, src))
+ user.visible_message("[user] puts a coin into [src] and turns the knob.", "You put a coin into [src] and turn the knob.")
+ src.visible_message("[src] rattles ominously!")
+ sleep(rand(10,15))
+ src.visible_message("[src] dispenses a strange sweet!")
+ new /obj/item/weapon/reagent_containers/food/snacks/sweet/strange(src.loc)
+ qdel(O)
else
- user.drop_item(O, src)
- user.visible_message("[user] puts a coin into [src] and turns the knob.", "You put a coin into [src] and turn the knob.")
- src.visible_message("[src] clicks softly.")
- sleep(rand(10,15))
- src.visible_message("[src] dispenses a sweet!")
- new /obj/item/weapon/reagent_containers/food/snacks/sweet(src.loc)
- qdel(O)
+ if(user.drop_item(O, src))
+ user.visible_message("[user] puts a coin into [src] and turns the knob.", "You put a coin into [src] and turn the knob.")
+ src.visible_message("[src] clicks softly.")
+ sleep(rand(10,15))
+ src.visible_message("[src] dispenses a sweet!")
+ new /obj/item/weapon/reagent_containers/food/snacks/sweet(src.loc)
+ qdel(O)
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/customizable/candy/coin))
to_chat(user, "That coin is smudgy and oddly soft, you don't think that would work.")
return
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index 6c1444794a1..780c06651f7 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -79,10 +79,10 @@
to_chat(user, "[src] blinks red as you try to insert the cell!")
return
- user.drop_item(W, src)
- charging = W
- user.visible_message("[user] inserts a cell into [src].", "You insert a cell into [src].")
- chargelevel = -1
+ if(user.drop_item(W, src))
+ charging = W
+ user.visible_message("[user] inserts a cell into [src].", "You insert a cell into [src].")
+ chargelevel = -1
updateicon()
/obj/machinery/cell_charger/emag(mob/user)
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index 2f8385a5a56..83d0b93fb6a 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -516,9 +516,9 @@
qdel(W)
return
else if (istype(W, /obj/item) && get_dist(src,user)<2)
- user.drop_item(W, src.loc)
- visible_message("[user] dunks [W] into the [src]!", 3)
- return
+ if(user.drop_item(W, src.loc))
+ visible_message("[user] dunks [W] into the [src]!", 3)
+ return
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(istype(mover,/obj/item) && mover.throwing)
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 48a7c2c44e4..8d0d2f5ce0c 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -41,11 +41,11 @@
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
- playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
- to_chat(user, "You place the circuit board inside the frame.")
- icon_state = "1"
- circuit = P
- user.drop_item(P, src)
+ if(user.drop_item(P, src))
+ playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ to_chat(user, "You place the circuit board inside the frame.")
+ icon_state = "1"
+ circuit = P
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
to_chat(user, "You screw the circuit board into place.")
@@ -135,6 +135,10 @@
to_chat(user, "This [P] does not seem to fit.")
return
+ if(!user.drop_item(P, src))
+ user << "You can't let go of \the [P]!"
+ return
+
if(P:brainmob.mind)
ticker.mode.remove_cultist(P:brainmob.mind, 1)
ticker.mode.remove_revolutionary(P:brainmob.mind, 1)
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 0f461d9e206..8e135111522 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -341,11 +341,12 @@
if(istype(P, /obj/item/weapon/circuitboard) && !circuit)
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "computer")
+ if(!user.drop_item(B, src)) return
+
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You place the circuit board inside the frame.")
src.icon_state = "1"
src.circuit = P
- user.drop_item(B, src)
else
to_chat(user, "This frame does not accept circuit boards of this type!")
return 1
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 744721a3bcd..69f51233584 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -105,14 +105,14 @@
return ..()
if(!is_centcom() && !scan && (access_change_ids in id_card.access))
- user.drop_item(id_card, src)
- scan = id_card
+ if(user.drop_item(id_card, src))
+ scan = id_card
else if(is_centcom() && !scan && ((access_cent_creed in id_card.access) || (access_cent_captain in id_card.access)))
- user.drop_item(id_card, src)
- scan = id_card
+ if(user.drop_item(id_card, src))
+ scan = id_card
else if(!modify)
- user.drop_item(id_card, src)
- modify = id_card
+ if(user.drop_item(id_card, src))
+ modify = id_card
nanomanager.update_uis(src)
attack_hand(user)
@@ -215,8 +215,8 @@
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item(I, src)
- modify = I
+ if(usr.drop_item(I, src))
+ modify = I
if ("scan")
if (scan)
@@ -231,8 +231,8 @@
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item(I, src)
- scan = I
+ if(usr.drop_item(I, src))
+ scan = I
if("access")
if(href_list["allowed"])
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 5b4bb81cb78..3093318db4b 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -160,8 +160,8 @@
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item(I, src)
- src.scan = I
+ if(usr.drop_item(I, src))
+ src.scan = I
else if (href_list["logout"])
src.authenticated = null
src.screen = null
diff --git a/code/game/machinery/computer/pda_terminal.dm b/code/game/machinery/computer/pda_terminal.dm
index 74013bc95c5..88792652fdd 100644
--- a/code/game/machinery/computer/pda_terminal.dm
+++ b/code/game/machinery/computer/pda_terminal.dm
@@ -54,9 +54,9 @@
return ..()
if(!pda_device)
- user.drop_item(user_pda, src)
- pda_device = user_pda
- update_icon()
+ if(user.drop_item(user_pda, src))
+ pda_device = user_pda
+ update_icon()
nanomanager.update_uis(src)
attack_hand(user)
@@ -119,8 +119,8 @@
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/device/pda))
- usr.drop_item(I, src)
- pda_device = I
+ if(usr.drop_item(I, src))
+ pda_device = I
update_icon()
if ("purchase")
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 7d5d155b9ef..6f96be83688 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -26,9 +26,9 @@
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob)
if(istype(O, /obj/item/weapon/card/id) && !scan)
- usr.drop_item(O, src)
- scan = O
- to_chat(user, "You insert [O].")
+ if(usr.drop_item(O, src))
+ scan = O
+ to_chat(user, "You insert \the [O].")
..()
/obj/machinery/computer/secure_data/attack_ai(mob/user as mob)
@@ -43,7 +43,7 @@
if(..())
return
if (src.z > 6)
- to_chat(user, "Unable to establish a connection: You're too far away from the station!")
+ to_chat(user, "Unable to establish a connection: You're too far away from the station!")
return
var/dat
@@ -239,8 +239,8 @@ What a mess.*/
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item(I, src)
- scan = I
+ if(usr.drop_item(I, src))
+ scan = I
if("Log Out")
authenticated = null
diff --git a/code/game/machinery/computer/slot_machine.dm b/code/game/machinery/computer/slot_machine.dm
index 93889f374f9..812685d6e9b 100644
--- a/code/game/machinery/computer/slot_machine.dm
+++ b/code/game/machinery/computer/slot_machine.dm
@@ -314,11 +314,11 @@
var/obj/item/weapon/spacecash/S = I
var/money_add = S.amount * S.worth
- user.drop_item(I)
- qdel(I)
+ if(user.drop_item(I))
+ qdel(I)
- src.stored_money += money_add
- src.updateUsrDialog()
+ src.stored_money += money_add
+ src.updateUsrDialog()
/obj/machinery/computer/slot_machine/proc/can_play() //If no money in OUR account, return 0
if(!our_money_account)
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 46187bdd898..d5154d423df 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -79,10 +79,13 @@
if(istype(P, /obj/item/weapon/circuitboard))
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "machine")
+ if(!user.drop_item(B, src))
+ user << "You can't let go of \the [B]!"
+ return
+
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You add the circuit board to the frame.")
circuit = P
- user.drop_item(B, src)
set_build_state(3)
components = list()
req_components = circuit.req_components.Copy()
@@ -200,11 +203,11 @@
else
to_chat(user, "You do not have enough [P]!")
- user.drop_item(P, src)
- components += P
- req_components[I]--
- update_desc()
- break
+ if(user.drop_item(P, src))
+ components += P
+ req_components[I]--
+ update_desc()
+ break
to_chat(user, desc)
if(P && P.loc != src && !istype(P, /obj/item/stack/cable_coil))
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 0f1e1a1ae9e..a41be290374 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -312,9 +312,9 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
if(beaker)
to_chat(user, "A beaker is already loaded into the machine.")
return
- beaker = G
- user.drop_item(G, src)
- user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
+ if(user.drop_item(G, src))
+ beaker = G
+ user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
if(istype(G, /obj/item/weapon/wrench))//FUCK YOU PARENT, YOU AREN'T MY REAL DAD
return
if(..())
diff --git a/code/game/machinery/defibcharger.dm b/code/game/machinery/defibcharger.dm
index 6937bc05788..e2f1a079454 100644
--- a/code/game/machinery/defibcharger.dm
+++ b/code/game/machinery/defibcharger.dm
@@ -107,7 +107,9 @@ obj/machinery/recharger/defibcharger/wallcharger/attackby(obj/item/weapon/G as o
if(a.power_equip == 0)
to_chat(user, "[src] blinks red as you try to insert [D]!")
return
- user.drop_item(G, src)
- charging = G
- use_power = 2
- update_icon()
+ if(user.drop_item(G, src))
+ charging = G
+ use_power = 2
+ update_icon()
+ else
+ user << "You can't let go of \the [G]!"
diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm
index fc882b68e1c..da087d25e50 100644
--- a/code/game/machinery/embedded_controller/embedded_controller_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm
@@ -38,9 +38,9 @@
switch(build)
if(0) // Empty hull
if(istype(W, /obj/item/weapon/screwdriver))
- to_chat(usr, "You begin removing screws from \the [src] backplate...")
+ to_chat(usr, "You begin removing screws from \the [src] backplate...")
if(do_after(user, src, 50))
- to_chat(usr, "You unscrew \the [src] from the wall.")
+ to_chat(usr, "You unscrew \the [src] from the wall.")
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
new /obj/item/mounted/frame/airlock_controller(get_turf(src))
qdel(src)
@@ -48,20 +48,20 @@
if(istype(W, /obj/item/weapon/circuitboard))
var/obj/item/weapon/circuitboard/C=W
if(C.board_type!="embedded controller")
- to_chat(user, "You cannot install this type of board into an embedded controller.")
+ to_chat(user, "You cannot install this type of board into an embedded controller.")
return
- to_chat(usr, "You begin to insert \the [C] into \the [src].")
+ to_chat(usr, "You begin to insert \the [C] into \the [src].")
if(do_after(user, src, 10))
- to_chat(usr, "You secure \the [C]!")
- user.drop_item(C, src)
- _circuitboard=C
- playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
- build++
- update_icon()
+ if(user.drop_item(C, src))
+ to_chat(usr, "You secure \the [C]!")
+ _circuitboard=C
+ playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
+ build++
+ update_icon()
return 1
if(1) // Circuitboard installed
if(istype(W, /obj/item/weapon/crowbar))
- to_chat(usr, "You begin to pry out \the [W] into \the [src].")
+ to_chat(usr, "You begin to pry out \the [W] into \the [src].")
if(do_after(user, src, 10))
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
build--
@@ -79,7 +79,7 @@
return 1
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C=W
- to_chat(user, "You start adding cables to \the [src]...")
+ to_chat(user, "You start adding cables to \the [src]...")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, src, 20) && C.amount >= 10)
C.use(5)
@@ -90,7 +90,7 @@
"You add cables to \the [src].")
if(2) // Circuitboard installed, wired.
if(istype(W, /obj/item/weapon/wirecutters))
- to_chat(usr, "You begin to remove the wiring from \the [src].")
+ to_chat(usr, "You begin to remove the wiring from \the [src].")
if(do_after(user, src, 50))
new /obj/item/stack/cable_coil(loc,5)
user.visible_message(\
@@ -100,7 +100,7 @@
update_icon()
return 1
if(istype(W, /obj/item/weapon/screwdriver))
- to_chat(user, "You begin to complete \the [src]...")
+ to_chat(user, "You begin to complete \the [src]...")
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, src, 20))
if(!_circuitboard)
@@ -145,7 +145,7 @@
/obj/machinery/embedded_controller/attack_hand(mob/user as mob)
if(!user.dexterity_check())
- to_chat(user, "You do not have the dexterity to use this.")
+ to_chat(user, "You do not have the dexterity to use this.")
return
if(build<2) return 1
src.ui_interact(user)
@@ -222,7 +222,7 @@
var/re_init=0
if("set_tag" in href_list)
if(!(href_list["set_tag"] in vars))
- to_chat(usr, "Something went wrong: Unable to find [href_list["set_tag"]] in vars!")
+ to_chat(usr, "Something went wrong: Unable to find [href_list["set_tag"]] in vars!")
return 1
var/current_tag = src.vars[href_list["set_tag"]]
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag", src, current_tag) as null|text),1,MAX_MESSAGE_LEN)
@@ -239,13 +239,13 @@
if(!O)
return 1
if(!canLink(O))
- to_chat(usr, "You can't link with that device.")
+ to_chat(usr, "You can't link with that device.")
return 1
if(unlinkFrom(usr, O))
- to_chat(usr, "A green light flashes on \the [P], confirming the link was removed.")
+ to_chat(usr, "A green light flashes on \the [P], confirming the link was removed.")
else
- to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices.")
+ to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices.")
update_mt_menu=1
if("link" in href_list)
@@ -253,33 +253,33 @@
if(!O)
return 1
if(!canLink(O,href_list))
- to_chat(usr, "You can't link with that device.")
+ to_chat(usr, "You can't link with that device.")
return 1
if (isLinkedWith(O))
- to_chat(usr, "A red light flashes on \the [P]. The two devices are already linked.")
+ to_chat(usr, "A red light flashes on \the [P]. The two devices are already linked.")
return 1
if(linkWith(usr, O, href_list))
- to_chat(usr, "A green light flashes on \the [P], confirming the link has been created.")
+ to_chat(usr, "A green light flashes on \the [P], confirming the link has been created.")
re_init = 1//this is the only thing different, crappy, I know
else
- to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when linking the two devices.")
+ to_chat(usr, "A red light flashes on \the [P]. It appears something went wrong when linking the two devices.")
update_mt_menu=1
if("buffer" in href_list)
if(istype(src, /obj/machinery/telecomms))
if(!hasvar(src, "id"))
- to_chat(usr, "A red light flashes and nothing changes.")
+ to_chat(usr, "A red light flashes and nothing changes.")
return
else if(!hasvar(src, "id_tag"))
- to_chat(usr, "A red light flashes and nothing changes.")
+ to_chat(usr, "A red light flashes and nothing changes.")
return
P.buffer = src
- to_chat(usr, "A green light flashes, and the device appears in the multitool buffer.")
+ to_chat(usr, "A green light flashes, and the device appears in the multitool buffer.")
update_mt_menu=1
if("flush" in href_list)
- to_chat(usr, "A green light flashes, and the device disappears from the multitool buffer.")
+ to_chat(usr, "A green light flashes, and the device disappears from the multitool buffer.")
P.buffer = null
update_mt_menu=1
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 0fde1becc23..475b3b9e9c8 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -77,8 +77,8 @@
to_chat(user, "There already is a power cell already installed.")
return
else
- user.drop_item(W, src)
- cell = W
- user.visible_message("[user] inserts \the [src] into \the [src].", \
- "You insert \the [src] into \the [src].")
- update_icon()
+ if(user.drop_item(W, src))
+ cell = W
+ user.visible_message("[user] inserts \the [src] into \the [src].", \
+ "You insert \the [src] into \the [src].")
+ update_icon()
diff --git a/code/game/machinery/gashapon.dm b/code/game/machinery/gashapon.dm
index 0d0fc30b981..2237e9a742c 100644
--- a/code/game/machinery/gashapon.dm
+++ b/code/game/machinery/gashapon.dm
@@ -11,6 +11,7 @@
machine_flags = WRENCHMOVE | FIXED2WORK
/obj/machinery/gashapon/attackby(var/obj/O as obj, var/mob/user as mob)
+<<<<<<< 636687c2a83b23b7efc3a052c68c16a6ced66ca8
if (is_type_in_list(O, list(/obj/item/weapon/coin/, /obj/item/weapon/reagent_containers/food/snacks/chococoin)))
user.drop_item(O, src)
user.visible_message("[user] puts a coin into [src] and turns the knob.", "You put a coin into [src] and turn the knob.")
@@ -24,6 +25,17 @@
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/customizable/candy/coin))
to_chat(user, "That coin is smudgy and oddly soft, you don't think that would work.")
return
+=======
+ if (istype(O, /obj/item/weapon/coin/))
+ if(user.drop_item(O, src))
+ user.visible_message("[user] puts a coin into [src] and turns the knob.", "You put a coin into [src] and turn the knob.")
+ src.visible_message("[src] clicks softly.")
+ sleep(rand(10,15))
+ src.visible_message("[src] dispenses a capsule!")
+ var/obj/item/weapon/capsule/b = new(src.loc)
+ b.icon_state = "capsule[rand(1,12)]"
+ qdel(O)
+>>>>>>> adds clown glue
else
return ..()
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 520e886be60..33784af14df 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -75,11 +75,11 @@
to_chat(user, "There is already a reagent container loaded!")
return
- user.drop_item(W, src)
- src.beaker = W
- to_chat(user, "You attach \the [W] to \the [src].")
- src.update_icon()
- return
+ if(user.drop_item(W, src))
+ src.beaker = W
+ to_chat(user, "You attach \the [W] to \the [src].")
+ src.update_icon()
+ return
else
return ..()
diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm
index a55db358a88..130bbaa21b5 100644
--- a/code/game/machinery/kitchen/microwave.dm
+++ b/code/game/machinery/kitchen/microwave.dm
@@ -110,7 +110,7 @@
src.dirty = 0 // just to be sure
src.flags = OPENCONTAINER
else
- to_chat(user, "It's broken!")
+ to_chat(user, "It's broken!")
return 1
else if(src.dirty==100) // The microwave is all dirty so can't be used!
var/obj/item/weapon/reagent_containers/R = O
@@ -132,29 +132,29 @@
src.flags = OPENCONTAINER
return 1
else //Otherwise bad luck!!
- to_chat(user, "It's too dirty!")
+ to_chat(user, "It's too dirty!")
return 1
if(..())
return 1
if(holdingitems && holdingitems.len >= limit)
- to_chat(usr, "The machine cannot hold anymore items.")
+ to_chat(usr, "The machine cannot hold anymore items.")
return 1
else if(istype(O, /obj/item/weapon/storage/bag/plants) || istype(O, /obj/item/weapon/storage/bag/food/borg))
var/obj/item/weapon/storage/bag/B = O
for (var/obj/item/weapon/reagent_containers/food/snacks/G in O.contents)
B.remove_from_storage(G,src)
if(contents && contents.len >= limit) //Sanity checking so the microwave doesn't overfill
- to_chat(user, "You fill the Microwave to the brim.")
+ to_chat(user, "You fill the Microwave to the brim.")
break
if(!O.contents.len)
- to_chat(user, "You empty \the [O] into the Microwave.")
+ to_chat(user, "You empty \the [O] into the Microwave.")
src.updateUsrDialog()
return 0
if (!is_type_in_list(O.contents))
- to_chat(user, "Your [O] contains components unsuitable for cookery.")
+ to_chat(user, "Your [O] contains components unsuitable for cookery.")
return 1
user.before_take_item(O)
@@ -171,24 +171,24 @@
"You add one of [O] to \the [src].")
else
// user.before_take_item(O) //This just causes problems so far as I can tell. -Pete
- user.drop_item(O, src)
- user.visible_message( \
- "[user] has added \the [O] to \the [src].", \
- "You add \the [O] to \the [src].")
+ if(user.drop_item(O, src))
+ user.visible_message( \
+ "[user] has added \the [O] to \the [src].", \
+ "You add \the [O] to \the [src].")
else if(is_type_in_list(O,accepts_reagents_from))
if (!O.reagents)
return 1
for (var/datum/reagent/R in O.reagents.reagent_list)
if (!(R.id in acceptable_reagents))
- to_chat(user, "Your [O] contains components unsuitable for cookery.")
+ to_chat(user, "Your [O] contains components unsuitable for cookery.")
return 1
//G.reagents.trans_to(src,G.amount_per_transfer_from_this)
else if(istype(O,/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = O
- to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].")
+ to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].")
return 1
else
- to_chat(user, "You have no idea what you can cook with this [O].")
+ to_chat(user, "You have no idea what you can cook with this [O].")
return 1
src.updateUsrDialog()
@@ -202,7 +202,7 @@
user.set_machine(src)
interact(user)
return 1
- to_chat(user, "You aren't equipped to interface with technology this old!")
+ to_chat(user, "You aren't equipped to interface with technology this old!")
return 0
/obj/machinery/microwave/attack_hand(mob/user as mob)
@@ -386,7 +386,7 @@
if (src.reagents.total_volume)
src.dirty++
src.reagents.clear_reagents()
- to_chat(usr, "You dispose of the microwave contents.")
+ to_chat(usr, "You dispose of the microwave contents.")
src.updateUsrDialog()
/obj/machinery/microwave/proc/muck_start()
diff --git a/code/game/machinery/kitchen/monkeyrecycler.dm b/code/game/machinery/kitchen/monkeyrecycler.dm
index db72f501492..c54c9b5a96c 100644
--- a/code/game/machinery/kitchen/monkeyrecycler.dm
+++ b/code/game/machinery/kitchen/monkeyrecycler.dm
@@ -50,7 +50,7 @@
if(target.wear_mask || target.l_hand || target.r_hand || target.back || target.uniform || target.hat)
to_chat(user, "The monkey may not have abiotic items on.")
else
- user.drop_item(G)
+ user.drop_item(G, force_drop = 1)
qdel(target)
target = null
to_chat(user, "You stuff the monkey in the machine.")
diff --git a/code/game/machinery/mommi_spawner.dm b/code/game/machinery/mommi_spawner.dm
index 375c87a86ae..e6383eb52d8 100644
--- a/code/game/machinery/mommi_spawner.dm
+++ b/code/game/machinery/mommi_spawner.dm
@@ -127,14 +127,14 @@
to_chat(user, "\The [src] doesn't have enough metal to complete this task.")
return TRUE
- building=1
- update_icon()
- user.drop_item(O, src)
- mmi.icon = null
- mmi.invisibility = 101
- spawn(50)
- makeMoMMI(mmi.brainmob)
- return TRUE
+ if(user.drop_item(O, src))
+ building=1
+ update_icon()
+ mmi.icon = null
+ mmi.invisibility = 101
+ spawn(50)
+ makeMoMMI(mmi.brainmob)
+ return TRUE
/obj/machinery/mommi_spawner/proc/makeMoMMI(var/mob/user)
var/turf/T = get_turf(src)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index d229d469123..d17baf83984 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -1048,8 +1048,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(photo)
return EjectPhoto(user)
if(istype(user.get_active_hand(), /obj/item/weapon/photo))
- photo = user.get_active_hand()
- user.drop_item(photo, src)
+ if(user.drop_item(photo, src))
+ photo = user.get_active_hand()
/obj/machinery/newscaster/proc/EjectPhoto(mob/user as mob)
if(!photo) return
diff --git a/code/game/machinery/pdapainter.dm b/code/game/machinery/pdapainter.dm
index f0ec1aa74c6..efdf0584da9 100644
--- a/code/game/machinery/pdapainter.dm
+++ b/code/game/machinery/pdapainter.dm
@@ -91,10 +91,10 @@ Feel free to do whatever with this if you think it lacks.
else
var/obj/item/device/pda/P = O
if(istype(P))
- user.drop_item(P, src)
- storedpda = P
- //P.add_fingerprint(usr)
- update_icon()
+ if(user.drop_item(P, src))
+ storedpda = P
+ //P.add_fingerprint(usr)
+ update_icon()
/obj/machinery/pdapainter/attack_hand(mob/user as mob)
..()
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 1b51f83ae24..caf32b1e078 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -56,12 +56,15 @@
if (istype(G, /obj/item/weapon/gun/energy/staff))
to_chat(user, "The recharger rejects the magical apparatus.")
return
+ if(!user.drop_item(G, src))
+ user << "You can't let go of \the [G]!"
+ return
+
appearance_backup = G.appearance
var/matrix/M = matrix()
M.Scale(0.625)
M.Translate(0,6)
G.transform = M
- user.drop_item(G, src)
charging = G
if(!self_powered)
use_power = 2
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index d58b3255f86..8dc582fa236 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -105,10 +105,10 @@
/obj/machinery/recharge_station/attackby(var/obj/item/W, var/mob/living/user)
if(is_type_in_list(W, acceptable_upgradeables))
if(!(locate(W.type) in upgrade_holder))
- user.drop_item(W, src)
- upgrade_holder.Add(W)
- to_chat(user, "You add \the [W] to \the [src].")
- return
+ if(user.drop_item(W, src))
+ upgrade_holder.Add(W)
+ to_chat(user, "You add \the [W] to \the [src].")
+ return
else
to_chat(user, "\The [src] already contains something resembling a [W.name].")
return
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 1365e041cad..1dccad4c2c5 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -594,11 +594,11 @@
if(src.SUIT)
to_chat(user, "The unit already contains a suit.")
return
- to_chat(user, "You load the [S.name] into the storage compartment.")
- user.drop_item(S, src)
- src.SUIT = S
- src.update_icon()
- src.updateUsrDialog()
+ if(user.drop_item(S, src))
+ to_chat(user, "You load the [S.name] into the storage compartment.")
+ src.SUIT = S
+ src.update_icon()
+ src.updateUsrDialog()
return
if( istype(I,/obj/item/clothing/head/helmet) )
if(!src.isopen)
@@ -607,12 +607,12 @@
if(src.HELMET)
to_chat(user, "The unit already contains a helmet.")
return
- to_chat(user, "You load the [H.name] into the storage compartment.")
- user.drop_item(H, src)
- src.HELMET = H
- src.update_icon()
- src.updateUsrDialog()
- return
+ if(user.drop_item(H, src))
+ to_chat(user, "You load the [H.name] into the storage compartment.")
+ src.HELMET = H
+ src.update_icon()
+ src.updateUsrDialog()
+ return
if( istype(I,/obj/item/clothing/mask) )
if(!src.isopen)
return
@@ -620,11 +620,11 @@
if(src.MASK)
to_chat(user, "The unit already contains a mask.")
return
- to_chat(user, "You load the [M.name] into the storage compartment.")
- user.drop_item(M, src)
- src.MASK = M
- src.update_icon()
- src.updateUsrDialog()
+ if(user.drop_item(M, src))
+ to_chat(user, "You load the [M.name] into the storage compartment.")
+ src.MASK = M
+ src.update_icon()
+ src.updateUsrDialog()
return
if( istype(I,/obj/item/clothing/shoes) )
if(!src.isopen)
@@ -633,11 +633,11 @@
if(src.BOOTS)
to_chat(user, "The unit already contains shoes.")
return
- to_chat(user, "You load \the [M.name] into the storage compartment.")
- user.drop_item(M, src)
- src.BOOTS = M
- src.update_icon()
- src.updateUsrDialog()
+ if(user.drop_item(M, src))
+ to_chat(user, "You load \the [M.name] into the storage compartment.")
+ src.BOOTS = M
+ src.update_icon()
+ src.updateUsrDialog()
return
src.update_icon()
src.updateUsrDialog()
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 8849a402a3a..ec2d92f5c03 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -54,7 +54,7 @@
to_chat(user, "You insert the cables.")
A.amount -= 5
if(A.amount <= 0)
- user.drop_item(A)
+ user.drop_item(A, force_drop = 1)
returnToPool(A)
construct_op --
stat &= ~BROKEN // the machine's not borked anymore!
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 9ebb53939b5..1afa2c0ba56 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -185,9 +185,9 @@
var/obj/item/weapon/card/id/I = C.get_active_hand()
if(istype(I))
if(check_access(I))
- C.drop_item(I, src)
- auth = I
- create_log("has logged in.", usr)
+ if(C.drop_item(I, src))
+ auth = I
+ create_log("has logged in.", usr)
else
create_log("has logged out.", usr)
auth.loc = src.loc
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index d5b1feb1f0a..8aa2ba3dff1 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -36,9 +36,12 @@
if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf))
+ if(!user.drop_item(I))
+ user << "You can't let go of \the [I]!"
+ return
+
to_chat(usr, "You insert the coordinates into the machine.")
to_chat(usr, "A message flashes across the screen reminding the traveller that the nuclear authentication disk is to remain on the station at all times.")
- user.drop_item(I)
qdel(I)
/* FUCK YOU
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index e657635f0b1..c6a416d54bc 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -364,10 +364,10 @@ var/global/num_vending_terminals = 1
return
else if(premium.len > 0 && is_type_in_list(W, list(/obj/item/weapon/coin/, /obj/item/weapon/reagent_containers/food/snacks/chococoin)))
if (isnull(coin))
- user.drop_item(W, src)
- coin = W
- to_chat(user, "You insert a coin into [src].")
- src.updateUsrDialog()
+ if(user.drop_item(W, src))
+ coin = W
+ to_chat(user, "You insert a coin into [src].")
+ src.updateUsrDialog()
else
to_chat(user, "There's already a coin in [src].")
return
@@ -376,10 +376,10 @@ var/global/num_vending_terminals = 1
return
else if(istype(W, /obj/item/voucher))
if(can_accept_voucher(W, user))
- user.drop_item(W, src)
- to_chat(user, "You insert [W] into [src].")
- return voucher_act(W, user)
- src.updateUsrDialog()
+ if(user.drop_item(W, src))
+ to_chat(user, "You insert [W] into [src].")
+ return voucher_act(W, user)
+ src.updateUsrDialog()
else
to_chat(user, "\The [src] refuses to take [W].")
return 1
@@ -399,9 +399,9 @@ var/global/num_vending_terminals = 1
src.updateUsrDialog()
else
if(is_type_in_list(W, allowed_inputs))
- user.drop_item(W, src)
- add_item(W)
- src.updateUsrDialog()
+ if(user.drop_item(W, src))
+ add_item(W)
+ src.updateUsrDialog()
/*else if(istype(W, /obj/item/weapon/card) && currently_vending)
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
@@ -1346,12 +1346,12 @@ var/global/num_vending_terminals = 1
return
to_chat(usr, "You begin to insert \the [C] into \the [src].")
if(do_after(user, src, 10))
- to_chat(usr, "You secure \the [C]!")
- user.drop_item(C, src)
- _circuitboard=C
- playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
- build++
- update_icon()
+ if(user.drop_item(C, src))
+ to_chat(usr, "You secure \the [C]!")
+ _circuitboard=C
+ playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
+ build++
+ update_icon()
return 1
if(1) // Circuitboard installed
if(istype(W, /obj/item/weapon/crowbar))
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index c7f7bf4969e..d620ce57718 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -245,8 +245,8 @@
else if(istype(W,/obj/item/toy/crayon) ||istype(W,/obj/item/weapon/stamp))
if( wash_state in list( 1, 3, 6 ) )
if(!crayon)
- user.drop_item(W, src)
- crayon = W
+ if(user.drop_item(W, src))
+ crayon = W
else if(istype(W,/obj/item/weapon/grab))
if( (wash_state == 1) && hacked)
var/obj/item/weapon/grab/G = W
@@ -305,8 +305,8 @@
if(contents.len < 5)
if ( wash_state in list(1, 3) )
- user.drop_item(W, src)
- wash_state = 3
+ if(user.drop_item(W, src))
+ wash_state = 3
else
to_chat(user, "You can't put the item in right now.")
else
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index c3fda2cfab4..085ad793ddd 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -726,10 +726,10 @@
var/obj/item/mecha_parts/mecha_equipment/E = W
spawn()
if(E.can_attach(src))
- user.drop_item(W)
- E.attach(src)
- user.visible_message("[user] attaches [W] to [src]", "You attach [W] to [src]")
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
+ if(user.drop_item(W))
+ E.attach(src)
+ user.visible_message("[user] attaches [W] to [src]", "You attach [W] to [src]")
+ playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
else
to_chat(user, "You were unable to attach [W] to [src]")
return
@@ -799,30 +799,30 @@
else if(istype(W, /obj/item/weapon/cell))
if(state==STATE_BOLTSOPENED)
if(!src.cell)
- to_chat(user, "You install the powercell.")
- user.drop_item(W, src)
- src.cell = W
- src.log_message("Powercell installed.")
+ if(user.drop_item(W, src))
+ to_chat(user, "You install the powercell.")
+ src.cell = W
+ src.log_message("Powercell installed.")
else
to_chat(user, "There's already a powercell installed.")
return
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
if(state==STATE_BOLTSOPENED)
if(!src.tracking)
- to_chat(user, "You install the tracking beacon and safeties.")
- user.drop_item(W, src)
- src.tracking = W
- src.log_message("Exosuit tracking beacon installed.")
+ if(user.drop_item(W, src))
+ to_chat(user, "You install the tracking beacon and safeties.")
+ src.tracking = W
+ src.log_message("Exosuit tracking beacon installed.")
else
to_chat(user, "There's already a tracking beacon installed.")
return
else if(istype(W, /obj/item/device/radio/electropack))
if(state==STATE_BOLTSOPENED)
if(!src.electropack)
- to_chat(user, "You rig the electropack to the cockpit.")
- user.drop_item(W, src)
- src.electropack = W
- src.log_message("Emergency ejection routines installed.") //not exactly a legitimate upgrade!
+ if(user.drop_item(W, src))
+ to_chat(user, "You rig the electropack to the cockpit.")
+ src.electropack = W
+ src.log_message("Emergency ejection routines installed.") //not exactly a legitimate upgrade!
else
to_chat(user, "There's already an electropack installed.")
return
diff --git a/code/game/objects/closets/walllocker.dm b/code/game/objects/closets/walllocker.dm
index dd8eef8047b..648bea73c97 100644
--- a/code/game/objects/closets/walllocker.dm
+++ b/code/game/objects/closets/walllocker.dm
@@ -92,11 +92,11 @@
to_chat(usr, "The locker is full.")
return
else
- to_chat(usr, "You put \the [G] in \the [src].")
- defib = G
- update_icon()
- user.drop_item(G, src)
- return
+ if(user.drop_item(G, src))
+ to_chat(usr, "You put \the [G] in \the [src].")
+ defib = G
+ update_icon()
+ return
return
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 8f5ed6d0627..61d598a45d0 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -34,7 +34,10 @@
var/permeability_coefficient = 1 // for chemicals/diseases
siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit) - 0 is not conductive, 1 is conductive - this is a range, not binary
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
+
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
+ var/glued = 0 //If 1, can't drop it from hands!
+
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index ba732096fe8..8e91e2d21ef 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -2143,15 +2143,15 @@ obj/item/device/pda/AltClick()
else
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- user.drop_item(I, src)
- id = I
+ if(user.drop_item(I, src))
+ id = I
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
var/obj/old_id = id
- user.drop_item(I, src)
- id = I
- user.put_in_hands(old_id)
+ if(user.drop_item(I, src))
+ id = I
+ user.put_in_hands(old_id)
if(id && incoming_transactions.len)
receive_incoming_transactions(id)
return
@@ -2160,11 +2160,11 @@ obj/item/device/pda/AltClick()
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
- cartridge = C
- user.drop_item(C, src)
- to_chat(user, "You insert [cartridge] into [src].")
- if(cartridge.radio)
- cartridge.radio.hostpda = src
+ if(user.drop_item(C, src))
+ cartridge = C
+ to_chat(user, "You insert [cartridge] into [src].")
+ if(cartridge.radio)
+ cartridge.radio.hostpda = src
else if(istype(C, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = C
@@ -2188,17 +2188,17 @@ obj/item/device/pda/AltClick()
return //Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
else if(istype(C, /obj/item/device/paicard) && !src.pai)
- user.drop_item(C, src)
- pai = C
- to_chat(user, "You slot \the [C] into [src].")
- updateUsrDialog()
+ if(user.drop_item(C, src))
+ pai = C
+ to_chat(user, "You slot \the [C] into [src].")
+ updateUsrDialog()
else if(istype(C, /obj/item/weapon/pen))
var/obj/item/weapon/pen/O = locate() in src
if(O)
to_chat(user, "There is already a pen in \the [src].")
else
- user.drop_item(C, src)
- to_chat(user, "You slide \the [C] into \the [src].")
+ if(user.drop_item(C, src))
+ to_chat(user, "You slide \the [C] into \the [src].")
else if(istype(C,/obj/item/weapon/spacecash))
if(!id)
to_chat(user, "\icon[src]There is no ID in the PDA!")
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index e3e6e81f246..e89bfbd30d8 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -30,11 +30,11 @@
if(I.w_class < 3)
to_chat(user, "\The [I] is too small for \the [src]")
return 0
- to_chat(user, "You stealthily place \the [src] onto \the [A]")
- user.drop_item(src, A)
- active = 1
- camera_bugs += src
- return 1
+ if(user.drop_item(src, A))
+ to_chat(user, "You stealthily place \the [src] onto \the [A]")
+ active = 1
+ camera_bugs += src
+ return 1
/obj/item/device/camera_bug/emp_act(severity)
switch(severity)
diff --git a/code/game/objects/items/devices/deskbell.dm b/code/game/objects/items/devices/deskbell.dm
index 55bd8e0ae53..782add72be2 100644
--- a/code/game/objects/items/devices/deskbell.dm
+++ b/code/game/objects/items/devices/deskbell.dm
@@ -322,18 +322,21 @@
qdel(src)
return
if(istype(W,/obj/item/device/assembly/signaler) && !has_signaler)
- var/obj/item/device/assembly/signaler/S = W
- frequency = S.frequency
- if(S.code == NOSIGNAL_CODE) //setting a code of "30" guarantees that you'll never be triggering any remote signaling devices.
- code = 0
- else
- code = S.code
- user.drop_item(W)
- qdel(W)
- W = null
- has_signaler = 1
- update_icon()
- return
+
+ if(user.drop_item(W))
+
+ var/obj/item/device/assembly/signaler/S = W
+ frequency = S.frequency
+ if(S.code == NOSIGNAL_CODE) //setting a code of "30" guarantees that you'll never be triggering any remote signaling devices.
+ code = 0
+ else
+ code = S.code
+
+ qdel(W)
+ W = null
+ has_signaler = 1
+ update_icon()
+ return
/obj/item/device/deskbell_assembly/attack_self(mob/living/carbon/user)
if(has_signaler)
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 2fd9525b0d7..996073b93bc 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -144,15 +144,15 @@
if(istype(W, /obj/item/weapon/storage/box/lights))
if(!supply)
- user.drop_item(W, src)
- user.visible_message("[user] inserts \a [W] into \the [src]", "You insert \the [W] into \the [src] to be used as the supply container.")
- supply = W
- return
+ if(user.drop_item(W, src))
+ user.visible_message("[user] inserts \a [W] into \the [src]", "You insert \the [W] into \the [src] to be used as the supply container.")
+ supply = W
+ return
else if(!waste)
- user.drop_item(W, src)
- user.visible_message("[user] inserts \a [W] into \the [src]", "You insert \the [W] into \the [src] to be used as the waste container.")
- waste = W
- return
+ if(user.drop_item(W, src))
+ user.visible_message("[user] inserts \a [W] into \the [src]", "You insert \the [W] into \the [src] to be used as the waste container.")
+ waste = W
+ return
else
var/obj/item/weapon/storage/box/lights/lsource = W
if(!lsource.contents.len)
@@ -206,7 +206,7 @@
var/list/light_type_cur
var/list/to_dump_5 //I guess I could do this without this variable, but it would involve more string concatenation, and nobody wants that.
var/list/to_dump_all//This too
-
+
for(var/T in light_types)
light_type_cur = light_types[T] //The way you'd expect to be the good way to do this doesn't work. This is dumb, but necessary.
to_dump_5 = list()
@@ -226,7 +226,7 @@
if(waste)
dat += {"
Waste Container:
-
+
Filled: [waste.contents.len]/[waste.storage_slots]
Eject Waste Container
"}
@@ -276,7 +276,7 @@
var/list/light_type_cur
var/list/to_dump_5//I guess I could do this without this variable, but it would include more string concatenation, and nobody wants that.
var/list/to_dump_all //This too
-
+
for(var/T in light_types)
to_dump_5 = list()
to_dump_all = list()
@@ -294,7 +294,7 @@
if(waste)
dat += {"
Waste Container:
-
+
Filled: [waste.contents.len]/[waste.storage_slots]
Recycle Contents
"}
@@ -378,7 +378,7 @@
//If the light works, attempts to place it in the supply box. Otherwise, attempts to place it in the waste box.
//Fails if the light cannot be placed into the correct box for any reason.
//Returns 1 if the light is successfully inserted into the correct box, 0 if the insertion fails, and null if the item to be inserted is not a light or something very strange happens.
-/obj/item/device/lightreplacer/proc/insert_if_possible(var/obj/item/weapon/light/L)
+/obj/item/device/lightreplacer/proc/insert_if_possible(var/obj/item/weapon/light/L)
if(!istype(L))
return
if(L.status == LIGHT_OK)
diff --git a/code/game/objects/items/devices/radio/cyborg.dm b/code/game/objects/items/devices/radio/cyborg.dm
index c3a10f94534..73763304b16 100644
--- a/code/game/objects/items/devices/radio/cyborg.dm
+++ b/code/game/objects/items/devices/radio/cyborg.dm
@@ -42,8 +42,8 @@
if (!isnull(keyslot))
to_chat(user, "The radio can't hold another key!")
else
- user.drop_item(W, src)
- insert_key(W)
+ if(user.drop_item(W, src))
+ insert_key(W)
return
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 3427437bc20..1039c071535 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -299,12 +299,12 @@
return
if(!keyslot1)
- user.drop_item(W, src)
- keyslot1 = W
+ if(user.drop_item(W, src))
+ keyslot1 = W
else
- user.drop_item(W, src)
- keyslot2 = W
+ if(user.drop_item(W, src))
+ keyslot2 = W
recalculateChannels()
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 0ca81131a00..f2cf76b4b59 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -30,32 +30,32 @@
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user)
if(istype(item, /obj/item/weapon/tank))
if(tank_one && tank_two)
- to_chat(user, "There are already two tanks attached, remove one first.")
+ to_chat(user, "There are already two tanks attached, remove one first.")
return
if(!tank_one)
- tank_one = item
- user.drop_item(item, src)
- to_chat(user, "You attach the tank to the transfer valve.")
+ if(user.drop_item(item, src))
+ tank_one = item
+ to_chat(user, "You attach the tank to the transfer valve.")
else if(!tank_two)
- tank_two = item
- user.drop_item(item, src)
- to_chat(user, "You attach the tank to the transfer valve.")
+ if(user.drop_item(item, src))
+ tank_two = item
+ to_chat(user, "You attach the tank to the transfer valve.")
update_icon()
//TODO: Have this take an assemblyholder
else if(isassembly(item))
var/obj/item/device/assembly/A = item
if(A.secured)
- to_chat(user, "The device is secured.")
+ to_chat(user, "The device is secured.")
return
if(attached_device)
- to_chat(user, "There is already a device attached to the valve, remove it first.")
+ to_chat(user, "There is already a device attached to the valve, remove it first.")
return
user.remove_from_mob(item)
attached_device = A
A.loc = src
- to_chat(user, "You attach the [item] to the valve controls and secure it.")
+ to_chat(user, "You attach the [item] to the valve controls and secure it.")
A.holder = src
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
diff --git a/code/game/objects/items/mountable_frames/paintings.dm b/code/game/objects/items/mountable_frames/paintings.dm
index 3b131496bf1..988a240026d 100644
--- a/code/game/objects/items/mountable_frames/paintings.dm
+++ b/code/game/objects/items/mountable_frames/paintings.dm
@@ -136,6 +136,10 @@ var/global/list/available_paintings = list(
desc = "a blank painting."
/obj/item/mounted/frame/painting/do_build(turf/on_wall, mob/user)
+ if(!user.drop_item(src))
+ to_chat(user, "You can't let go of \the [src]!")
+ return
+
to_chat(user, "You hang the [src] on \the [on_wall]...")
add_fingerprint(user)
@@ -159,7 +163,6 @@ var/global/list/available_paintings = list(
playsound(on_wall, 'sound/items/Deconstruct.ogg', 25, 1)
- user.drop_item(src)
qdel(src)
/obj/item/mounted/frame/painting/blank
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 4c3aae6fe37..f6ba44efac7 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -129,34 +129,34 @@
qdel(src)
if(istype(W, /obj/item/robot_parts/l_leg))
if(src.l_leg) return
- user.drop_item(W, src)
- src.l_leg = W
- src.updateicon()
+ if(user.drop_item(W, src))
+ src.l_leg = W
+ src.updateicon()
if(istype(W, /obj/item/robot_parts/r_leg))
if(src.r_leg) return
- user.drop_item(W, src)
- src.r_leg = W
- src.updateicon()
+ if(user.drop_item(W, src))
+ src.r_leg = W
+ src.updateicon()
if(istype(W, /obj/item/robot_parts/l_arm))
if(src.l_arm) return
- user.drop_item(W, src)
- src.l_arm = W
- src.updateicon()
+ if(user.drop_item(W, src))
+ src.l_arm = W
+ src.updateicon()
if(istype(W, /obj/item/robot_parts/r_arm))
if(src.r_arm) return
- user.drop_item(W, src)
- src.r_arm = W
- src.updateicon()
+ if(user.drop_item(W, src))
+ src.r_arm = W
+ src.updateicon()
if(istype(W, /obj/item/robot_parts/chest))
if(src.chest) return
if(W:wires && W:cell)
- user.drop_item(W, src)
- src.chest = W
- src.updateicon()
+ if(user.drop_item(W, src))
+ src.chest = W
+ src.updateicon()
else if(!W:wires)
to_chat(user, "You need to attach wires to it first!")
else
@@ -165,9 +165,9 @@
if(istype(W, /obj/item/robot_parts/head))
if(src.head) return
if(W:flash2 && W:flash1)
- user.drop_item(W, src)
- src.head = W
- src.updateicon()
+ if(user.drop_item(W, src))
+ src.head = W
+ src.updateicon()
else
to_chat(user, "You need to attach a flash to it first!")
@@ -198,6 +198,9 @@
to_chat(user, "This [W] does not seem to fit.")
return
+ if(!user.drop_item(W))
+ return
+
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1)
for(var/P in M.mommi_assembly_parts) //Let's give back all those mommi creation components
@@ -208,8 +211,6 @@
if(!O) return
- user.drop_item(W)
-
O.mmi = W
O.invisibility = 0
O.custom_name = created_name
@@ -257,9 +258,9 @@
to_chat(user, "You have already inserted a cell!")
return
else
- user.drop_item(W, src)
- src.cell = W
- to_chat(user, "You insert the cell!")
+ if(user.drop_item(W, src))
+ src.cell = W
+ to_chat(user, "You insert the cell!")
if(istype(W, /obj/item/stack/cable_coil))
if(src.wires)
to_chat(user, "You have already inserted wire!")
@@ -278,21 +279,21 @@
to_chat(user, "You have already inserted the eyes!")
return
else if(src.flash1)
- user.drop_item(W, src)
- src.flash2 = W
- to_chat(user, "You insert the flash into the eye socket!")
+ if(user.drop_item(W, src))
+ src.flash2 = W
+ to_chat(user, "You insert the flash into the eye socket!")
else
- user.drop_item(W, src)
- src.flash1 = W
- to_chat(user, "You insert the flash into the eye socket!")
+ if(user.drop_item(W, src))
+ src.flash1 = W
+ to_chat(user, "You insert the flash into the eye socket!")
else if(istype(W, /obj/item/weapon/stock_parts/manipulator))
- to_chat(user, "You install some manipulators and modify the head, creating a functional spider-bot!")
- new /mob/living/simple_animal/spiderbot(get_turf(loc))
- user.drop_item(W)
- qdel(W)
- W = null
- qdel(src)
- return
+ if(user.drop_item(W))
+ to_chat(user, "You install some manipulators and modify the head, creating a functional spider-bot!")
+ new /mob/living/simple_animal/spiderbot(get_turf(loc))
+ qdel(W)
+ W = null
+ qdel(src)
+ return
return
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm
index c0f653c2c4b..8d6b1f6f55a 100644
--- a/code/game/objects/items/stacks/sheets/leather.dm
+++ b/code/game/objects/items/stacks/sheets/leather.dm
@@ -66,7 +66,7 @@
var/obj/item/stack/cable_coil/C = W
if(C.use(5))
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
var/obj/item/clothing/mask/necklace/xeno_claw/X = new(get_turf(src))
user.put_in_active_hand(X)
diff --git a/code/game/objects/items/stacks/teeth.dm b/code/game/objects/items/stacks/teeth.dm
index 9f87c9db971..92eae57e99b 100644
--- a/code/game/objects/items/stacks/teeth.dm
+++ b/code/game/objects/items/stacks/teeth.dm
@@ -35,7 +35,7 @@
return
if(C.use(5))
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
var/obj/item/clothing/mask/necklace/teeth/X = new(get_turf(src))
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 7edf0a73e8d..6359d005759 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -225,11 +225,11 @@
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
- user.drop_item()
- qdel(I)
- I = null
- bullets++
- to_chat(user, "You load the foam dart into the crossbow.")
+ if(user.drop_item(I))
+ qdel(I)
+ I = null
+ bullets++
+ to_chat(user, "You load the foam dart into the crossbow.")
else
to_chat(usr, "It's already fully loaded.")
diff --git a/code/game/objects/items/weapons/RCL.dm b/code/game/objects/items/weapons/RCL.dm
index adce3d64495..a70f649ca96 100644
--- a/code/game/objects/items/weapons/RCL.dm
+++ b/code/game/objects/items/weapons/RCL.dm
@@ -24,9 +24,9 @@
/obj/item/weapon/rcl/attackby(obj/item/weapon/W, mob/user)
if(istype(W,/obj/item/stack/cable_coil))
if(!loaded)
- loaded = W
- loaded.max_amount = max_amount //We store a lot.
- user.drop_item(W,src)
+ if(user.drop_item(W,src))
+ loaded = W
+ loaded.max_amount = max_amount //We store a lot.
else
loaded.preattack(W,user,1)
update_icon()
diff --git a/code/game/objects/items/weapons/airlock_painter.dm b/code/game/objects/items/weapons/airlock_painter.dm
index 28a85a5e77c..a1b90aec5cb 100644
--- a/code/game/objects/items/weapons/airlock_painter.dm
+++ b/code/game/objects/items/weapons/airlock_painter.dm
@@ -60,11 +60,10 @@
if(ink)
to_chat(user, "\the [name] already contains \a [ink].")
return
- user.drop_item(W, src)
- to_chat(user, "You install \the [W] into \the [name].")
- ink = W
- playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
-
+ if(user.drop_item(W, src))
+ to_chat(user, "You install \the [W] into \the [name].")
+ ink = W
+ playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
/obj/item/weapon/airlock_painter/attack_self(mob/user)
if(ink)
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 85d44543349..80680181d61 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -42,11 +42,11 @@ MATCHBOXES ARE ALSO IN FANCY.DM
..()
switch(lit)
if(1)
- to_chat(user, "The match is lit.")
+ to_chat(user, "The match is lit.")
if(0)
- to_chat(user, "The match is unlit and ready to be used.")
+ to_chat(user, "The match is unlit and ready to be used.")
if(-1)
- to_chat(user, "The match is burnt.")
+ to_chat(user, "The match is burnt.")
//Also updates the name, the damage and item_state for good measure
/obj/item/weapon/match/update_icon()
@@ -169,7 +169,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
..()
to_chat(user, "\The [src] is [lit ? "":"un"]lit.")//Shared with all cigarette sub-types
-
+
//Also updates the name, the damage and item_state for good measure
/obj/item/clothing/mask/cigarette/update_icon()
@@ -211,7 +211,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
..()
if(lit) //The cigarette is already lit
- to_chat(user, "\The [src] is already lit.")
+ to_chat(user, "\The [src] is already lit.")
return //Don't bother
//Items with special messages go first
@@ -252,23 +252,23 @@ MATCHBOXES ARE ALSO IN FANCY.DM
if(glass.reagents.has_reagent("sacid") || glass.reagents.has_reagent("pacid")) //Dumping into acid, a dumb idea
new type_butt(get_turf(glass))
processing_objects.Remove(src)
- to_chat(user, "Half of \the [src] dissolves with a nasty fizzle as you dip it into \the [glass].")
- user.drop_item(src)
+ to_chat(user, "Half of \the [src] dissolves with a nasty fizzle as you dip it into \the [glass].")
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
if(glass.reagents.has_reagent("water") && lit) //Dumping a lit cigarette into water, the result is obvious
new type_butt(get_turf(glass))
processing_objects.Remove(src)
- to_chat(user, "\The [src] fizzles as you dip it into \the [glass].")
- user.drop_item(src)
+ to_chat(user, "\The [src] fizzles as you dip it into \the [glass].")
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //If reagents were transfered, show the message
- to_chat(user, "You dip \the [src] into \the [glass].")
+ to_chat(user, "You dip \the [src] into \the [glass].")
else //If not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume) //Only show an explicit message if the beaker was empty, you can't tell a cigarette is "full"
- to_chat(user, "\The [glass] is empty.")
+ to_chat(user, "\The [glass] is empty.")
return
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights \the [src].")
@@ -276,7 +276,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
return //"Normal" situations were already handled in attackby, don't show a message
if(reagents.get_reagent_amount("water")) //The cigarette was dipped into water, it's useless now
- to_chat(usr, "You fail to light \the [src]. It appears to be wet.")
+ to_chat(usr, "You fail to light \the [src]. It appears to be wet.")
return
if(reagents.get_reagent_amount("plasma")) //Plasma explodes when exposed to fire
@@ -331,7 +331,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
lit = 0 //Actually unlight the cigarette so that the lighting can update correctly
update_brightness()
if(ismob(loc))
- to_chat(M, "Your [name] goes out.")
+ to_chat(M, "Your [name] goes out.")
M.u_equip(src, 0) //Un-equip it so the overlays can update
qdel(src)
return
@@ -431,7 +431,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
if(istype(W, /obj/item/weapon/match))
..()
else
- to_chat(user, "\The [src] straight out REFUSES to be lit by such uncivilized means.")
+ to_chat(user, "\The [src] straight out REFUSES to be lit by such uncivilized means.")
*/
///////////////////
@@ -554,7 +554,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
if(istype(W, /obj/item/weapon/match))
..()
else
- to_chat(user, "\The [src] straight out REFUSES to be lit by such means.")
+ to_chat(user, "\The [src] straight out REFUSES to be lit by such means.")
*/
/obj/item/clothing/mask/cigarette/pipe/cobpipe
@@ -606,7 +606,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
/obj/item/weapon/lighter/examine(mob/user)
..()
- to_chat(user, "The lighter is [lit ? "":"un"]lit")
+ to_chat(user, "The lighter is [lit ? "":"un"]lit")
//Also updates the name, the damage and item_state for good measure
/obj/item/weapon/lighter/update_icon()
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 8da7f288f63..a96bfb9a6b5 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -127,3 +127,38 @@
attack_verb = list("quacked")
hitsound = 'sound/items/quack.ogg'
honk_delay = 10
+
+/obj/item/weapon/glue
+ name = "superglue"
+ desc = "A small plastic bottle full of high quality superglue."
+
+ icon = 'icons/obj/items.dmi'
+ icon_state = "glue0"
+
+ var/spent = 0
+
+/obj/item/weapon/glue/examine(mob/user)
+ ..()
+ if(Adjacent(user))
+ user.show_message("The label reads: Instructions: 1) Gently apply glue to an object 2) Apply object to human flesh.", MESSAGE_SEE)
+
+/obj/item/weapon/glue/update_icon()
+ ..()
+ icon_state = "glue[spent]"
+
+/obj/item/weapon/glue/afterattack(obj/item/target, mob/user, flag)
+ if(!flag)
+ return
+
+ if(spent)
+ user << "There's no glue left in the bottle."
+ return
+
+ if(!istype(target)) //Can only apply to items!
+ user << "That would be a waste of glue."
+ return
+
+ user << "You gently apply the whole bottle of [src] to \the [target]."
+ update_icon()
+ spent = 1
+ target.glued = 1
diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm
index daf9c66c2dc..20e9be6e550 100644
--- a/code/game/objects/items/weapons/dice.dm
+++ b/code/game/objects/items/weapons/dice.dm
@@ -101,7 +101,7 @@
if(result == 1)
to_chat(user, "Rocks fall, you die.")
user.gib()
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
else
triggered = 1
visible_message("You hear a quiet click.")
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index ae99dfddf81..4cbe8a6ae2e 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -74,13 +74,27 @@
user.visible_message("[user.name] is trying to plant some kind of explosive on [target.name]!")
if(do_after(user, target, 50) && user.Adjacent(target))
- user.drop_item(src)
- src.target = target
+ var/glue_act = 0 //If 1, the C4 is superglued to the guy's hands - produce a funny message
+
+ if(user.drop_item(src)) //User can't drop this normally -> stick it to him (but drop it anyways, to prevent unintended features)
+ src.target = target
+ user.drop_item(src, force_drop = 1)
+ else
+ to_chat(user, "\The [src] is glued to your hands!
") //Honk
+ src.target = user
+ glue_act = 1
+
loc = null
+
if (ismob(target))
var/mob/M=target
target:attack_log += "\[[time_stamp()]\] Had the [name] planted on them by [user.real_name] ([user.ckey])"
- user.visible_message("[user.name] finished planting an explosive on [target.name]!")
+
+ if(!glue_act)
+ user.visible_message("[user.name] finished planting an explosive on [target.name]!")
+ else
+ user.visible_message("[user] found \himself unable to drop \the [src] after setting the timer on it!")
+
playsound(get_turf(src), 'sound/weapons/c4armed.ogg', 60, 1)
if(!iscarbon(user))
M.LAssailant = null
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index d577f606520..73720e3188e 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -109,9 +109,9 @@
if(isrobot(user) && !isMoMMI(user)) // MoMMI's can but borgs can't
to_chat(user, "You're a robot. No.")
return
- user.drop_item(W, src)
- to_chat(user, "You cram \the [W] into the nozzle of \the [src].")
- message_admins("[user]/[user.ckey] has crammed \a [W] into a [src].")
+ if(user.drop_item(W, src))
+ to_chat(user, "You cram \the [W] into the nozzle of \the [src].")
+ message_admins("[user]/[user.ckey] has crammed \a [W] into a [src].")
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
if(proximity_flag)
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index 6d166757a2f..e59b7cb43b7 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -102,19 +102,19 @@
var/obj/item/device/assembly/igniter/I = W
if(I.secured) return
if(igniter) return
- user.drop_item(I, src)
- igniter = I
- update_icon()
- return
+ if(user.drop_item(I, src))
+ igniter = I
+ update_icon()
+ return
if(istype(W,/obj/item/weapon/tank/plasma))
if(ptank)
to_chat(user, "There appears to already be a plasma tank loaded in [src]!")
return
- user.drop_item(W, src)
- ptank = W
- update_icon()
- return
+ if(user.drop_item(W, src))
+ ptank = W
+ update_icon()
+ return
if(istype(W, /obj/item/device/analyzer) && ptank)
var/obj/item/device/analyzer/analyzer = W
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 5665930469b..6ed13f96d83 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -37,7 +37,7 @@
item_state = "gift-large"
/obj/item/weapon/gift/attack_self(mob/user as mob)
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
if(gift)
user.put_in_active_hand(gift)
gift.add_fingerprint(user)
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 295aad3e834..ea509b7e6fa 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -110,19 +110,17 @@
if (inserted_cores > 0)
to_chat(user, " This type of grenade cannot hold more than one slime core.")
else
+ if(user.drop_item(W, src))
+ to_chat(user, " You add \the [W] to the assembly.")
+ beakers += W
+ stage = 1
+ name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
+ else if(W.reagents.total_volume)
+ if(user.drop_item(W, src))
to_chat(user, " You add \the [W] to the assembly.")
- user.drop_item(W, src)
beakers += W
- E = W
- inserted_cores++
stage = 1
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
- else if(W.reagents.total_volume)
- to_chat(user, " You add \the [W] to the assembly.")
- user.drop_item(W, src)
- beakers += W
- stage = 1
- name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else
to_chat(user, " \the [W] is empty.")
else if (istype(W,/obj/item/slime_extract))
@@ -313,22 +311,17 @@ obj/item/weapon/grenade/chem_grenade/exgrenade/attackby(obj/item/weapon/W as obj
if (inserted_cores > 1)
to_chat(user, " You cannot fit more than two slime cores in this grenade.")
else
- to_chat(user, " You add \the [W] to the assembly.")
- user.drop_item(W, src)
- beakers += W
- if (E == null)//E = first slime extract, C = second slime extract
- E = W
- else
- C = W
- inserted_cores++
- stage = 1
- name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
+ if(user.drop_item(W, src))
+ to_chat(user, " You add \the [W] to the assembly.")
+ beakers += W
+ stage = 1
+ name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else if(W.reagents.total_volume)
- to_chat(user, " You add \the [W] to the assembly.")
- user.drop_item(W, src)
- beakers += W
- stage = 1
- name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
+ if(user.drop_item(W, src))
+ to_chat(user, " You add \the [W] to the assembly.")
+ beakers += W
+ stage = 1
+ name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
else
to_chat(user, " \the [W] is empty.")
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index ab225dafa52..eda5b4cee04 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -42,8 +42,8 @@
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!( src.case ))
- user.drop_item(C, src)
- src.case = C
+ if(user.drop_item(C, src))
+ src.case = C
else
return
src.update()
diff --git a/code/game/objects/items/weapons/paiwire.dm b/code/game/objects/items/weapons/paiwire.dm
index 35ebee86759..2dc2e485f09 100644
--- a/code/game/objects/items/weapons/paiwire.dm
+++ b/code/game/objects/items/weapons/paiwire.dm
@@ -2,7 +2,7 @@
if(istype(M, /obj/machinery/door) || istype(M, /obj/machinery/camera))
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.")
if(user && user.get_active_hand() == src)
- user.drop_item(src, M)
+ user.drop_item(src, M, force_drop = 1)
src.machine = M
else
user.visible_message("[user] dumbly fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].")
diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm
index 34d1f02abb3..58f057d6722 100644
--- a/code/game/objects/items/weapons/storage/briefcase.dm
+++ b/code/game/objects/items/weapons/storage/briefcase.dm
@@ -115,8 +115,11 @@
if(item.w_class > 3.0)
to_chat(user, "\The [item] is too big to fit in the false bottom!")
return
+ if(!user.drop_item(item))
+ user << "\The [item] is stuck to your hands!"
+ return
+
stored_item = item
- user.drop_item(item)
max_w_class = 3.0 - stored_item.w_class
item.loc = null //null space here we go - to stop it showing up in the briefcase
to_chat(user, "You place \the [item] into the false bottom of the briefcase.")
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index ecdd55fd594..a367e8ad409 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -62,10 +62,10 @@
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
if(!bcell)
- user.drop_item(W, src)
- bcell = W
- to_chat(user, "You install a cell in [src].")
- update_icon()
+ if(user.drop_item(W, src))
+ bcell = W
+ to_chat(user, "You install a cell in [src].")
+ update_icon()
else
to_chat(user, "[src] already has a cell.")
diff --git a/code/game/objects/items/weapons/switchtool.dm b/code/game/objects/items/weapons/switchtool.dm
index dabe08b3194..16e9b437ef3 100644
--- a/code/game/objects/items/weapons/switchtool.dm
+++ b/code/game/objects/items/weapons/switchtool.dm
@@ -96,10 +96,10 @@
to_chat(user, "\The [src] already has a [get_module_name(module)].")
return
else
- stored_modules[module] = used_item
- user.drop_item(used_item, src)
- to_chat(user, "You successfully load \the [used_item] into \the [src]'s [get_module_name(module)] slot.")
- return 1
+ if(user.drop_item(used_item, src))
+ stored_modules[module] = used_item
+ to_chat(user, "You successfully load \the [used_item] into \the [src]'s [get_module_name(module)] slot.")
+ return 1
/obj/item/weapon/switchtool/proc/remove_module(mob/user)
deployed.loc = get_turf(user)
diff --git a/code/game/objects/items/weapons/table_rack_parts.dm b/code/game/objects/items/weapons/table_rack_parts.dm
index 2c145b80cd2..7d073540e67 100644
--- a/code/game/objects/items/weapons/table_rack_parts.dm
+++ b/code/game/objects/items/weapons/table_rack_parts.dm
@@ -22,15 +22,15 @@
var/obj/item/stack/rods/rods = W
if (rods.amount >= 4)
new /obj/item/weapon/table_parts/reinforced( user.loc )
- to_chat(user, "You reinforce the [name].")
+ to_chat(user, "You reinforce the [name].")
rods.use(4)
qdel(src)
else if (rods.amount < 4)
- to_chat(user, "You need at least four rods to do this.")
+ to_chat(user, "You need at least four rods to do this.")
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
new /obj/structure/table( user.loc )
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
@@ -47,7 +47,7 @@
/obj/item/weapon/table_parts/reinforced/attack_self(mob/user as mob)
new /obj/structure/table/reinforced( user.loc )
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
@@ -71,7 +71,7 @@
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
new /obj/structure/table/woodentable( user.loc )
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
@@ -88,7 +88,7 @@
/obj/item/weapon/table_parts/wood/poker/attack_self(mob/user as mob)
new /obj/structure/table/woodentable/poker( user.loc )
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
@@ -108,6 +108,6 @@
/obj/item/weapon/rack_parts/attack_self(mob/user as mob)
var/obj/structure/rack/R = new /obj/structure/rack( user.loc )
R.add_fingerprint(user)
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 843cdc15c11..d111869db80 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -29,10 +29,10 @@ LINEN BINS
else if(istype(I, /obj/item/weapon/kitchen/utensil/knife/plastic))
cut_time=160
if(cut_time)
- to_chat(user, "You begin cutting the [src].")
+ to_chat(user, "You begin cutting the [src].")
if(do_after(user, src, cut_time))
if(!src) return
- to_chat(user, "You have cut the [src] into rags.")
+ to_chat(user, "You have cut the [src] into rags.")
var/turf/location = get_turf(src)
for(var/x=0; x<=8; x++)
var/obj/item/weapon/reagent_containers/glass/rag/S = new/obj/item/weapon/reagent_containers/glass/rag/(location)
@@ -47,7 +47,7 @@ LINEN BINS
//todo: sharp thing code/game/objects/objs.dm
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
if(layer == initial(layer))
layer = 5
else
@@ -141,11 +141,11 @@ LINEN BINS
/obj/structure/bedsheetbin/examine(mob/user)
..()
if(amount == 0)
- to_chat(user, "There are no bed sheets in the bin.")
+ to_chat(user, "There are no bed sheets in the bin.")
else if(amount == 1)
- to_chat(user, "There is one bed sheet in the bin.")
+ to_chat(user, "There is one bed sheet in the bin.")
else
- to_chat(user, "There are [amount] bed sheets in the bin.")
+ to_chat(user, "There are [amount] bed sheets in the bin.")
/obj/structure/bedsheetbin/update_icon()
@@ -157,15 +157,14 @@ LINEN BINS
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/bedsheet))
- user.drop_item(I, src)
- sheets.Add(I)
- amount++
- to_chat(user, "You put [I] in [src].")
+ if(user.drop_item(I, src))
+ sheets.Add(I)
+ amount++
+ to_chat(user, "You put \the [I] in \the [src].")
else if(amount && !hidden && I.w_class < 4) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
- user.drop_item(I, src)
- hidden = I
- to_chat(user, "You hide [I] among the sheets.")
-
+ if(user.drop_item(I, src))
+ hidden = I
+ to_chat(user, "You hide [I] among the sheets.")
/obj/structure/bedsheetbin/attack_paw(mob/user as mob)
@@ -186,11 +185,11 @@ LINEN BINS
B.loc = user.loc
user.put_in_hands(B)
- to_chat(user, "You take [B] out of [src].")
+ to_chat(user, "You take [B] out of [src].")
if(hidden)
hidden.loc = user.loc
- to_chat(user, "[hidden] falls out of [B]!")
+ to_chat(user, "[hidden] falls out of [B]!")
hidden = null
@@ -209,7 +208,7 @@ LINEN BINS
B = new /obj/item/weapon/bedsheet(loc)
B.loc = loc
- to_chat(user, "You telekinetically remove [B] from [src].")
+ to_chat(user, "You telekinetically remove [B] from [src].")
update_icon()
if(hidden)
diff --git a/code/game/objects/structures/coatrack.dm b/code/game/objects/structures/coatrack.dm
index bcd3a07f5f2..13d8a35521e 100644
--- a/code/game/objects/structures/coatrack.dm
+++ b/code/game/objects/structures/coatrack.dm
@@ -35,18 +35,17 @@
/obj/structure/coatrack/attackby(obj/item/clothing/C, mob/user)
if (istype(C, /obj/item/clothing/suit/storage/det_suit) && !suit)
- to_chat(user, "You place your [C] on the [src]")
- playsound(get_turf(src), "rustle", 50, 1, -5)
- user.drop_item(C, src)
- suit = C
- update_icon()
-
+ if(user.drop_item(C, src))
+ to_chat(user, "You place your [C] on the [src]")
+ playsound(get_turf(src), "rustle", 50, 1, -5)
+ suit = C
+ update_icon()
else if (istype(C, /obj/item/clothing/head/det_hat) && !hat)
- to_chat(user, "You place your [C] on the [src]")
- playsound(get_turf(src), "rustle", 50, 1, -5)
- user.drop_item(C, src)
- hat = C
- update_icon()
+ if(user.drop_item(C, src))
+ to_chat(user, "You place your [C] on the [src]")
+ playsound(get_turf(src), "rustle", 50, 1, -5)
+ hat = C
+ update_icon()
else
return ..()
diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
index e96715afc9e..c58d96c415a 100644
--- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
@@ -93,8 +93,8 @@
if(F.wielded)
to_chat(user, "Unwield [F] first!")
return
+ user.drop_item(F, src, force_drop = 1)
fireaxe = O
- user.drop_item(F, src)
visible_message("[user] places [F] back into [src].", \
"You place [F] back into [src].")
update_icon()
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index 27c7dbe1dd0..91ed2b671e7 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -432,20 +432,20 @@
return
if(locked && !broken)
if (allowed(user))
- to_chat(user, "You unlock [src].")
+ to_chat(user, "You unlock [src].")
src.locked = 0
overlays.len = 0
overlays += greenlight
return
else
- to_chat(user, "[src] is locked.")
+ to_chat(user, "[src] is locked.")
return
else
..()
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/card) && src.allowed(user) && !locked && !opened && !broken)
- to_chat(user, "You lock \the [src].")
+ to_chat(user, "You lock \the [src].")
src.locked = 1
overlays.len = 0
overlays += redlight
@@ -458,7 +458,7 @@
playsound(get_turf(src), "sparks", 60, 1)
src.locked = 0
src.broken = 1
- to_chat(user, "You unlock \the [src].")
+ to_chat(user, "You unlock \the [src].")
return
return ..()
@@ -472,22 +472,23 @@
return
else if(istype(W, /obj/item/stack/cable_coil))
if(rigged)
- to_chat(user, "[src] is already rigged!")
+ to_chat(user, "[src] is already rigged!")
return
- to_chat(user, "You rig [src].")
- user.drop_item(W)
- qdel(W)
- W = null
- rigged = 1
+
+ if(user.drop_item(W))
+ to_chat(user, "You rig [src].")
+ qdel(W)
+ W = null
+ rigged = 1
return
else if(istype(W, /obj/item/device/radio/electropack))
if(rigged)
- to_chat(user, "You attach [W] to [src].")
- user.drop_item(W, src.loc)
+ if(user.drop_item(W, src.loc))
+ to_chat(user, "You attach [W] to [src].")
return
else if(istype(W, /obj/item/weapon/wirecutters))
if(rigged)
- to_chat(user, "You cut away the wiring.")
+ to_chat(user, "You cut away the wiring.")
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
rigged = 0
return
diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm
index 6f6e1ad3327..48f2b6fa049 100644
--- a/code/game/objects/structures/displaycase.dm
+++ b/code/game/objects/structures/displaycase.dm
@@ -17,10 +17,10 @@
switch(state)
if(0)
if(istype(W, /obj/item/weapon/circuitboard/airlock) && W:icon_state != "door_electronics_smoked")
- user.drop_item(W, src)
- circuit=W
- state++
- playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
+ if(user.drop_item(W, src))
+ circuit=W
+ state++
+ playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(istype(W, /obj/item/weapon/crowbar))
var/obj/machinery/constructable_frame/machine_frame/MF = new /obj/machinery/constructable_frame/machine_frame(T)
MF.state = 1
@@ -226,10 +226,10 @@
if(locked)
to_chat(user, "It's locked, you can't put anything into it.")
else if(!occupant)
- to_chat(user, "You insert \the [W] into \the [src], and it floats as the hoverfield activates.")
- user.drop_item(W, src)
- occupant=W
- update_icon()
+ if(user.drop_item(W, src))
+ to_chat(user, "You insert \the [W] into \the [src], and it floats as the hoverfield activates.")
+ occupant=W
+ update_icon()
/obj/structure/displaycase/attack_paw(mob/user as mob)
return src.attack_hand(user)
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index dd0338fd5c1..42dfeaf9cc3 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -246,7 +246,7 @@
busy = 1
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
- user.drop_item(W, src)
+ user.drop_item(W, src, force_drop = 1)
if(do_after(user, src, 40))
if(!src) return
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index 1905d9958d6..552c7fc9d1b 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -14,9 +14,9 @@
return
if(istype(O, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened)
- user.drop_item(O, src)
- has_extinguisher = O
- to_chat(user, "You place [O] in [src].")
+ if(user.drop_item(O, src))
+ has_extinguisher = O
+ to_chat(user, "You place [O] in [src].")
else
opened = !opened
else
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index f44358cd638..672ab79c8b9 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -275,9 +275,9 @@
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.
- user.drop_item(P, src.loc)
- user.visible_message("[user] fits \the [P] into \the [src]", \
- "You fit \the [P] into \the [src]")
+ if(user.drop_item(P, src.loc))
+ user.visible_message("[user] fits \the [P] into \the [src]", \
+ "You fit \the [P] into \the [src]")
else
..()
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index fbff6c34702..6904ffc0c81 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -27,44 +27,44 @@
/obj/structure/bed/chair/vehicle/janicart/examine(mob/user)
..()
if(in_range(src, user) && reagents.has_reagent("lube"))
- to_chat(user, " Something is very off about this water.")
+ to_chat(user, " Something is very off about this water.")
switch(health)
if(75 to 99)
- to_chat(user, "It appears slightly dented.")
+ to_chat(user, "It appears slightly dented.")
if(40 to 74)
- to_chat(user, "It appears heavily dented.")
+ to_chat(user, "It appears heavily dented.")
if(1 to 39)
- to_chat(user, "It appears severely dented.")
+ to_chat(user, "It appears severely dented.")
if((INFINITY * -1) to 0)
- to_chat(user, "It appears completely unsalvageable")
+ to_chat(user, "It appears completely unsalvageable")
if(mybag)
- to_chat(user, "\A [mybag] is hanging on \the [nick].")
+ to_chat(user, "\A [mybag] is hanging on \the [nick].")
/obj/structure/bed/chair/vehicle/janicart/attackby(obj/item/W, mob/user)
..()
if(istype(W, /obj/item/mecha_parts/janicart_upgrade) && !upgraded && !destroyed)
- user.drop_item(W)
- qdel(W)
- to_chat(user, "You upgrade \the [nick].")
- upgraded = 1
- name = "upgraded [name]"
- icon_state = "pussywagon_upgraded"
+ if(user.drop_item(W))
+ qdel(W)
+ to_chat(user, "You upgrade \the [nick].")
+ upgraded = 1
+ name = "upgraded [name]"
+ icon_state = "pussywagon_upgraded"
else if(istype(W, /obj/item/weapon/storage/bag/trash))
if(mybag)
- to_chat(user, "There's already a [W.name] on \the [nick]!")
+ to_chat(user, "There's already a [W.name] on \the [nick]!")
return
- to_chat(user, "You hook \the [W] onto \the [nick].")
- user.drop_item(W, src)
- mybag = W
+ if(user.drop_item(W, src))
+ to_chat(user, "You hook \the [W] onto \the [nick].")
+ mybag = W
/obj/structure/bed/chair/vehicle/janicart/mop_act(obj/item/weapon/mop/M, mob/user)
if(istype(M))
if(reagents.total_volume >= 2)
reagents.trans_to(M, 3)
- to_chat(user, "You wet the mop in \the [nick].")
+ to_chat(user, "You wet the mop in \the [nick].")
playsound(get_turf(src), 'sound/effects/slosh.ogg', 25, 1)
if(reagents.total_volume < 1)
- to_chat(user, "\The [nick] is out of water!")
+ to_chat(user, "\The [nick] is out of water!")
return 1
/obj/structure/bed/chair/vehicle/janicart/attack_hand(mob/user)
@@ -112,5 +112,5 @@
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes(0)
cleaned_human.clean_blood()
- to_chat(cleaned_human, "[src] cleans your face!")
+ to_chat(cleaned_human, "[src] cleans your face!")
return
\ No newline at end of file
diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm
index 6fa7718478e..503db81a49a 100644
--- a/code/game/objects/structures/noticeboard.dm
+++ b/code/game/objects/structures/noticeboard.dm
@@ -27,7 +27,7 @@
if(notices < 5)
O.add_fingerprint(user)
add_fingerprint(user)
- user.drop_item(O,src)
+ user.drop_item(O,src, force_drop = 1)
notices++
icon_state = "nboard0[notices]" //update sprite
to_chat(user, "You pin the paper to the noticeboard.")
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index bc56be3eb63..107f2b706a3 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -42,9 +42,9 @@ FLOOR SAFES
/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
if(user && canhear)
if(tumbler_1_pos == tumbler_1_open)
- to_chat(user, "You hear a [pick("tonk", "krunk", "plunk")] from [src].")
+ to_chat(user, "You hear a [pick("tonk", "krunk", "plunk")] from [src].")
if(tumbler_2_pos == tumbler_2_open)
- to_chat(user, "You hear a [pick("tink", "krink", "plink")] from [src].")
+ to_chat(user, "You hear a [pick("tink", "krink", "plink")] from [src].")
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
if(user) visible_message("[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!")
return 1
@@ -100,13 +100,13 @@ FLOOR SAFES
if(href_list["open"])
if(check_unlocked())
- to_chat(user, "You [open ? "close" : "open"] [src].")
+ to_chat(user, "You [open ? "close" : "open"] [src].")
open = !open
update_icon()
updateUsrDialog()
return
else
- to_chat(user, "You can't [open ? "close" : "open"] [src], the lock is engaged!")
+ to_chat(user, "You can't [open ? "close" : "open"] [src], the lock is engaged!")
return
if(href_list["decrement"])
@@ -114,11 +114,11 @@ FLOOR SAFES
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
tumbler_1_pos = decrement(tumbler_1_pos)
if(canhear)
- to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].")
+ to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].")
if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
tumbler_2_pos = decrement(tumbler_2_pos)
if(canhear)
- to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].")
+ to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].")
check_unlocked(user, canhear)
updateUsrDialog()
return
@@ -128,11 +128,11 @@ FLOOR SAFES
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
tumbler_1_pos = increment(tumbler_1_pos)
if(canhear)
- to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].")
+ to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].")
if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
tumbler_2_pos = increment(tumbler_2_pos)
if(canhear)
- to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].")
+ to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].")
check_unlocked(user, canhear)
updateUsrDialog()
return
@@ -150,17 +150,17 @@ FLOOR SAFES
/obj/structure/safe/attackby(obj/item/I as obj, mob/user as mob)
if(open)
if(I.w_class + space <= maxspace)
- space += I.w_class
- user.drop_item(I, src)
- to_chat(user, "You put [I] in [src].")
- updateUsrDialog()
+ if(user.drop_item(I, src))
+ space += I.w_class
+ to_chat(user, "You put [I] in [src].")
+ updateUsrDialog()
return
else
- to_chat(user, "[I] won't fit in [src].")
+ to_chat(user, "[I] won't fit in [src].")
return
else
if(istype(I, /obj/item/clothing/accessory/stethoscope))
- to_chat(user, "Hold [I] in one of your hands while you manipulate the dial.")
+ to_chat(user, "Hold [I] in one of your hands while you manipulate the dial.")
return
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index 82baa8ad48c..71e64bd1d91 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -18,15 +18,15 @@
if(!SK.status)
to_chat(user, "[SK] is not ready to be attached!")
return
- user.drop_item(W)
- var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
- E.dir = dir
- E.part = SK
- SK.forceMove(E)
- SK.master = E
- qdel(src)
- return
+ if(user.drop_item(W))
+ var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
+ playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
+ E.dir = dir
+ E.part = SK
+ SK.forceMove(E)
+ SK.master = E
+ qdel(src)
+ return
if(iswrench(W))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index bff5452d3b6..7079becd529 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -336,9 +336,9 @@
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
return
- user.drop_item()
- if (O.loc != src.loc)
- step(O, get_dir(O, src))
+ if(user.drop_item())
+ if (O.loc != src.loc)
+ step(O, get_dir(O, src))
return
@@ -541,15 +541,20 @@
if(istype(W,/obj/item/weapon/stock_parts/scanning_module))
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, src, 40))
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
- var/obj/machinery/optable/OPT = new /obj/machinery/optable(src.loc)
- var/obj/item/weapon/stock_parts/scanning_module/SM = W
- OPT.rating = SM.rating
- user.drop_item(W)
- qdel(W)
- qdel(src)
- return
- if (istype(W, /obj/item/weapon/weldingtool))
+ if(user.drop_item(W))
+ var/obj/machinery/optable/OPT = new /obj/machinery/optable(src.loc)
+ var/obj/item/weapon/stock_parts/scanning_module/SM = W
+ OPT.rating = SM.rating
+
+ qdel(W)
+ qdel(src)
+
+ return
+ else
+ user << "\The [W] is stuck to your hands!"
+ return
+
+ else if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!(WT.welding)/* || (params_list.len && text2num(params_list["icon-y"]) > 8)*/) //8 above the bottom of the icon
return ..()
@@ -632,9 +637,9 @@
/obj/structure/rack/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
return
- user.drop_item(O)
- if (O.loc != src.loc)
- step(O, get_dir(O, src))
+ if(user.drop_item(O))
+ if (O.loc != src.loc)
+ step(O, get_dir(O, src))
return
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob)
diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm
index 221dc3bd499..6d2739a6d67 100644
--- a/code/game/objects/structures/tank_dispenser.dm
+++ b/code/game/objects/structures/tank_dispenser.dm
@@ -59,30 +59,30 @@
/obj/structure/dispenser/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/tank/oxygen) || istype(I, /obj/item/weapon/tank/air) || istype(I, /obj/item/weapon/tank/anesthetic))
if(oxygentanks < 10)
- user.drop_item(I, src)
- oxytanks.Add(I)
- oxygentanks++
- to_chat(user, "You put [I] in [src].")
+ if(user.drop_item(I, src))
+ oxytanks.Add(I)
+ oxygentanks++
+ to_chat(user, "You put [I] in [src].")
else
- to_chat(user, "[src] is full.")
+ to_chat(user, "[src] is full.")
updateUsrDialog()
return
if(istype(I, /obj/item/weapon/tank/plasma))
if(plasmatanks < 10)
- user.drop_item(I, src)
- platanks.Add(I)
- plasmatanks++
- to_chat(user, "You put [I] in [src].")
+ if(user.drop_item(I, src))
+ platanks.Add(I)
+ plasmatanks++
+ to_chat(user, "You put [I] in [src].")
else
- to_chat(user, "[src] is full.")
+ to_chat(user, "[src] is full.")
updateUsrDialog()
return
if(istype(I, /obj/item/weapon/wrench))
if(anchored)
- to_chat(user, "You lean down and unwrench [src].")
+ to_chat(user, "You lean down and unwrench [src].")
anchored = 0
else
- to_chat(user, "You wrench [src] into place.")
+ to_chat(user, "You wrench [src] into place.")
anchored = 1
return
@@ -100,7 +100,7 @@
else
O = new /obj/item/weapon/tank/oxygen(loc)
O.loc = loc
- to_chat(usr, "You take [O] out of [src].")
+ to_chat(usr, "You take [O] out of [src].")
oxygentanks--
update_icon()
if(href_list["plasma"])
@@ -112,7 +112,7 @@
else
P = new /obj/item/weapon/tank/plasma(loc)
P.loc = loc
- to_chat(usr, "You take [P] out of [src].")
+ to_chat(usr, "You take [P] out of [src].")
plasmatanks--
update_icon()
add_fingerprint(usr)
diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm
index 60c8d49d5dd..c59123449f8 100644
--- a/code/game/objects/structures/target_stake.dm
+++ b/code/game/objects/structures/target_stake.dm
@@ -25,12 +25,12 @@
return // get rid of that pinned target first!
if(istype(W, /obj/item/target))
- density = 0
- W.density = 1
- user.drop_item(W, src.loc)
- W.layer = 3.1
- pinned_target = W
- to_chat(user, "You slide the target into the stake.")
+ if(user.drop_item(W, src.loc))
+ density = 0
+ W.density = 1
+ W.layer = 3.1
+ pinned_target = W
+ to_chat(user, "You slide the target into the stake.")
return
attack_hand(mob/user as mob)
@@ -44,9 +44,9 @@
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(pinned_target)
- to_chat(user, "You take the target out of the stake.")
+ to_chat(user, "You take the target out of the stake.")
else
pinned_target.loc = get_turf(user)
- to_chat(user, "You take the target out of the stake.")
+ to_chat(user, "You take the target out of the stake.")
pinned_target = null
\ No newline at end of file
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index f4a46fea5ac..e4032e6d772 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -106,10 +106,10 @@
if(w_items + I.w_class > 5)
to_chat(user, "The cistern is full.")
return
- user.drop_item(I, src)
- w_items += I.w_class
- to_chat(user, "You carefully place \the [I] into the cistern.")
- return
+ if(user.drop_item(I, src))
+ w_items += I.w_class
+ to_chat(user, "You carefully place \the [I] into the cistern.")
+ return
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index b83830b7092..a8cdb3ed572 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -170,18 +170,18 @@ obj/structure/windoor_assembly/Destroy()
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/circuitboard/airlock) && W:icon_state != "door_electronics_smoked")
- playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
- user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
- user.drop_item(W, src) // To prevent you using the airlock electronics on 2 windoors at once.
+ if(user.drop_item(W, src)) // To prevent you using the airlock electronics on 2 windoors at once.
+ playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
+ user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
- if(do_after(user, src, 40))
- if(!src) return
+ if(do_after(user, src, 40))
+ if(!src) return
- to_chat(user, "You've installed the airlock electronics!")
- src.name = "Near finished Windoor Assembly"
- src.electronics = W
- else
- W.forceMove(src.loc)
+ to_chat(user, "You've installed the airlock electronics!")
+ src.name = "Near finished Windoor Assembly"
+ src.electronics = W
+ else
+ W.forceMove(src.loc)
//Screwdriver to remove airlock electronics. Step 6 undone.
else if(istype(W, /obj/item/weapon/screwdriver) && electronics)
diff --git a/code/modules/Economy/Accounts.dm b/code/modules/Economy/Accounts.dm
index 10dba338538..39ccd0a1cdc 100644
--- a/code/modules/Economy/Accounts.dm
+++ b/code/modules/Economy/Accounts.dm
@@ -294,13 +294,13 @@ var/global/list/all_money_accounts = list()
emag(user)
return
if(!held_card)
- usr.drop_item(O, src)
- held_card = idcard
+ if(usr.drop_item(O, src))
+ held_card = idcard
- if(access_cent_captain in idcard.access)
- access_level = 2
- else if(access_hop in idcard.access || access_captain in idcard.access)
- access_level = 1
+ if(access_cent_captain in idcard.access)
+ access_level = 2
+ else if(access_hop in idcard.access || access_captain in idcard.access)
+ access_level = 1
else
..()
@@ -363,13 +363,13 @@ var/global/list/all_money_accounts = list()
return
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
- usr.drop_item(C, src)
- held_card = C
- if(access_level < 3)
- if(access_cent_captain in C.access)
- access_level = 2
- else if(access_hop in C.access || access_captain in C.access)
- access_level = 1
+ if(usr.drop_item(C, src))
+ held_card = C
+ if(access_level < 3)
+ if(access_cent_captain in C.access)
+ access_level = 2
+ else if(access_hop in C.access || access_captain in C.access)
+ access_level = 1
if("view_account_detail")
var/index = text2num(href_list["account_index"])
if(index && index <= all_money_accounts.len)
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index 6f645c5fd82..601ad6b0806 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -92,9 +92,10 @@
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(S)) return //Remove the assembly from your hands
+
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
- M.drop_item(S) //Remove the assembly from your hands
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index dafe95bcc20..dac6a68eadc 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -309,13 +309,13 @@ BLIND // can't see anything
if(istype(I, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = I
if(can_attach_accessory(A))
- user.drop_item(I, src)
- accessories.Add(A)
- A.on_attached(src, user)
- if(istype(loc, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = loc
- H.update_inv_w_uniform()
- return
+ if(user.drop_item(I, src))
+ accessories.Add(A)
+ A.on_attached(src, user)
+ if(istype(loc, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = loc
+ H.update_inv_w_uniform()
+ return
else
to_chat(user, "You cannot attach more accessories of this type to [src]")
return
diff --git a/code/modules/clothing/gloves/stungloves.dm b/code/modules/clothing/gloves/stungloves.dm
index da910da4206..2899619424c 100644
--- a/code/modules/clothing/gloves/stungloves.dm
+++ b/code/modules/clothing/gloves/stungloves.dm
@@ -1,7 +1,7 @@
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
if(istype(src, /obj/item/clothing/gloves/boxing)) //quick fix for stunglove overlay not working nicely with boxing gloves.
to_chat(user, "That won't work.")//i'm not putting my lips on that!
-
+
..()
return
if(istype(W, /obj/item/stack/cable_coil))
@@ -11,36 +11,36 @@
C.use(2)
wired = 1
siemens_coefficient = 3.0
- to_chat(user, "You wrap some wires around [src].")
+ to_chat(user, "You wrap some wires around [src].")
update_icon()
else
- to_chat(user, "There is not enough wire to cover [src].")
+ to_chat(user, "There is not enough wire to cover [src].")
else
- to_chat(user, "[src] are already wired.")
+ to_chat(user, "[src] are already wired.")
else if(istype(W, /obj/item/weapon/cell))
if(!wired)
- to_chat(user, "[src] need to be wired first.")
+ to_chat(user, "[src] need to be wired first.")
else if(!cell)
- user.drop_item(W, src)
- cell = W
- to_chat(user, "You attach a cell to [src].")
- update_icon()
+ if(user.drop_item(W, src))
+ cell = W
+ to_chat(user, "You attach a cell to [src].")
+ update_icon()
else
- to_chat(user, "[src] already have a cell.")
+ to_chat(user, "[src] already have a cell.")
else if(istype(W, /obj/item/weapon/wirecutters))
if(cell)
cell.updateicon()
cell.loc = get_turf(src.loc)
cell = null
- to_chat(user, "You cut the cell away from [src].")
+ to_chat(user, "You cut the cell away from [src].")
update_icon()
return
if(wired) //wires disappear into the void because fuck that shit
wired = 0
siemens_coefficient = initial(siemens_coefficient)
- to_chat(user, "You cut the wires away from [src].")
+ to_chat(user, "You cut the wires away from [src].")
update_icon()
..()
return
diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm
index 4fc53050741..1f26789cb08 100644
--- a/code/modules/clothing/under/accessories/accessory.dm
+++ b/code/modules/clothing/under/accessories/accessory.dm
@@ -28,9 +28,9 @@
return
has_suit = S
if(user)
- user.drop_item(src, has_suit)
- to_chat(user, "You attach [src] to [has_suit].")
- src.add_fingerprint(user)
+ if(user.drop_item(src, has_suit))
+ to_chat(user, "You attach [src] to [has_suit].")
+ src.add_fingerprint(user)
else
loc = has_suit
has_suit.overlays += inv_overlay
diff --git a/code/modules/context_click/remote.dm b/code/modules/context_click/remote.dm
index 9e06c3e1153..a6dfd8aa2ae 100644
--- a/code/modules/context_click/remote.dm
+++ b/code/modules/context_click/remote.dm
@@ -82,10 +82,12 @@ Remotes have procs for when attack_self() is called to handle which button is pr
return 1
if(istype(used_item, /obj/item/device/remote_button))
- if(add_button(used_item, return_clicked_id_by_params(params) )) //attempt to plug the button on
- user.drop_item(used_item, holder)
- to_chat(user, "You click \the [used_item] into \the [holder].")
- return 1
+ if(user.drop_item(used_item, holder))
+ if(add_button(used_item, return_clicked_id_by_params(params) )) //attempt to plug the button on
+ to_chat(user, "You click \the [used_item] into \the [holder].")
+ return 1
+ else
+ used_item.forceMove(get_turf(src))
var/button_id = return_clicked_id_by_params(params)
return press_button(button_id, user)
diff --git a/code/modules/detectivework/detective_work.dm b/code/modules/detectivework/detective_work.dm
index 057fb002c1d..626b734f445 100644
--- a/code/modules/detectivework/detective_work.dm
+++ b/code/modules/detectivework/detective_work.dm
@@ -171,8 +171,7 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri
I.overlays -= scanning
I.icon_state = "evidenceobj"
else
- scanning = I
- M.drop_item(I, src)
+ if(M.drop_item(I, src)) scanning = I
else
to_chat(usr, "Invalid Object Rejected.")
if("card") //Processing a fingerprint card.
@@ -190,8 +189,8 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri
card.loc = src.loc
card = null
return
- M.drop_item(I, src)
- process_card()
+ if(M.drop_item(I, src))
+ process_card()
else
to_chat(usr, "Invalid Object Rejected.")
if("database") //Viewing all records in each database
diff --git a/code/modules/detectivework/evidence.dm b/code/modules/detectivework/evidence.dm
index 65e4acddafb..34232b1e857 100644
--- a/code/modules/detectivework/evidence.dm
+++ b/code/modules/detectivework/evidence.dm
@@ -35,7 +35,7 @@
var/obj/item/weapon/storage/U = I.loc
user.client.screen -= I
U.contents.Remove(I)
- user.drop_item(I)
+ user.drop_item(I, force_drop = 1)
user.visible_message("[user] puts [I] into [src]", "You put [I] inside [src].",\
"You hear a rustle as someone puts something into a plastic bag.")
diff --git a/code/modules/food/cooking_machines.dm b/code/modules/food/cooking_machines.dm
index 8b404ed69e6..eb6e83cb52b 100644
--- a/code/modules/food/cooking_machines.dm
+++ b/code/modules/food/cooking_machines.dm
@@ -183,11 +183,12 @@ var/global/ingredientLimit = 10
if(src.foodChoices) . = src.foodChoices[(input("Select production.") in src.foodChoices)]
if (!Adjacent(user) || user.stat || user.get_active_hand() != I)
return 0
- user.drop_item(I, src)
- src.ingredient = I
- spawn() src.cook(.)
- to_chat(user, "You add \the [I.name] to \the [src.name].")
- return 1
+
+ if(user.drop_item(I, src))
+ src.ingredient = I
+ spawn() src.cook(.)
+ to_chat(user, "You add \the [I.name] to \the [src.name].")
+ return 1
else to_chat(user, "You can't put that in \the [src.name]. \n[.]")
return 0
diff --git a/code/modules/food/customizables.dm b/code/modules/food/customizables.dm
index 1f8c47e53fb..d9ffaabbd2c 100644
--- a/code/modules/food/customizables.dm
+++ b/code/modules/food/customizables.dm
@@ -111,6 +111,7 @@
if((src.contents.len >= src.ingMax) || (src.contents.len >= ingredientLimit))
to_chat(user, "That's already looking pretty stuffed.")
return
+
var/obj/item/weapon/reagent_containers/food/snacks/S = I
if(istype(S,/obj/item/weapon/reagent_containers/food/snacks/customizable))
var/obj/item/weapon/reagent_containers/food/snacks/customizable/SC = S
@@ -121,8 +122,11 @@
if(!recursiveFood && istype(I, /obj/item/weapon/reagent_containers/food/snacks/customizable))
to_chat(user, "[pick("Sorry, no recursive food.","That would be a straining topological exercise.","This world just isn't ready for your cooking genius.","It's possible that you may have a problem.","It won't fit.","You don't think that would taste very good.","Quit goofin' around.")]")
return
+ if(!user.drop_item(I, src))
+ user << "\The [I] is stuck to your hands!"
+ return
+
S.reagents.trans_to(src,S.reagents.total_volume)
- user.drop_item(I, src)
src.ingredients += S
if(src.addTop) src.overlays -= src.topping //thank you Comic
@@ -379,18 +383,19 @@
else if(istype(I,/obj/item/weapon/reagent_containers/food/snacks))
if(src.ingredients.len < src.ingMax)
var/obj/item/weapon/reagent_containers/food/snacks/S = I
+
if(!recursiveFood && istype(I, /obj/item/weapon/reagent_containers/food/snacks/customizable))
to_chat(user, "[pick("Sorry, no recursive food.","That would be a straining topological exercise.","This world just isn't ready for your cooking genius.","It's possible that you may have a problem.","It won't fit.","You don't think that would taste very good.","Quit goofin' around.")]")
return
- user.drop_item(I, src)
- to_chat(user, "You add the [S.name] to the [src.name].")
- S.reagents.trans_to(src,S.reagents.total_volume)
- src.ingredients += S
- src.updateName()
- src.overlays -= src.filling //we can't directly modify the overlay, so we have to remove it and then add it again
- var/newcolor = S.filling_color != "#FFFFFF" ? S.filling_color : AverageColor(getFlatIcon(S, S.dir, 0), 1, 1)
- src.filling.color = BlendRGB(src.filling.color, newcolor, 1/src.ingredients.len)
- src.overlays += src.filling
+ if(user.drop_item(I, src))
+ to_chat(user, "You add the [S.name] to the [src.name].")
+ S.reagents.trans_to(src,S.reagents.total_volume)
+ src.ingredients += S
+ src.updateName()
+ src.overlays -= src.filling //we can't directly modify the overlay, so we have to remove it and then add it again
+ var/newcolor = S.filling_color != "#FFFFFF" ? S.filling_color : AverageColor(getFlatIcon(S, S.dir, 0), 1, 1)
+ src.filling.color = BlendRGB(src.filling.color, newcolor, 1/src.ingredients.len)
+ src.overlays += src.filling
else to_chat(user, "That won't fit.")
else . = ..()
return
diff --git a/code/modules/food/icecreamvat.dm b/code/modules/food/icecreamvat.dm
index 2785e745039..33abdd2ab52 100644
--- a/code/modules/food/icecreamvat.dm
+++ b/code/modules/food/icecreamvat.dm
@@ -33,11 +33,11 @@
/obj/machinery/cooking/icemachine/takeIngredient(var/obj/item/I,mob/user)
if(istype(I,/obj/item/weapon/reagent_containers/glass))
if(!src.beaker)
- user.drop_item(I, src)
- src.beaker = I
- . = 1
- to_chat(user, "You add the [I.name] to the [src.name].")
- src.updateUsrDialog()
+ if(user.drop_item(I, src))
+ src.beaker = I
+ . = 1
+ to_chat(user, "You add the [I.name] to the [src.name].")
+ src.updateUsrDialog()
else to_chat(user, "The [src.name] already has a beaker.")
else if(istype(I,/obj/item/weapon/reagent_containers/food/snacks/icecream))
if(!I.reagents.has_reagent("sprinkles"))
diff --git a/code/modules/games/cards/playing_cards.dm b/code/modules/games/cards/playing_cards.dm
index ad44c17530d..287bf0fe94e 100644
--- a/code/modules/games/cards/playing_cards.dm
+++ b/code/modules/games/cards/playing_cards.dm
@@ -95,10 +95,10 @@
if(istype(I, /obj/item/toy/singlecard))
var/obj/item/toy/singlecard/C = I
if((!C.parentdeck && !strict_deck) || C.parentdeck == src)
- src.cards += C
- user.drop_item(C, src)
- user.visible_message("[user] adds a card to the bottom of the deck.",
- "You add the card to the bottom of the deck.")
+ if(user.drop_item(C, src))
+ src.cards += C
+ user.visible_message("[user] adds a card to the bottom of the deck.",
+ "You add the card to the bottom of the deck.")
else
to_chat(user, "You can't mix cards from other decks.")
update_icon()
@@ -106,13 +106,13 @@
if(istype(I, /obj/item/toy/cardhand))
var/obj/item/toy/cardhand/C = I
if((!C.parentdeck && !strict_deck) || C.parentdeck == src)
- for(var/obj/item/toy/singlecard/card in C.currenthand)
- card.loc = src
- cards += card
- user.drop_item(C)
- user.visible_message("[user] puts their hand of cards into the deck.",
- "You put the hand into the deck.")
- qdel(C)
+ if(user.drop_item(C))
+ for(var/obj/item/toy/singlecard/card in C.currenthand)
+ card.loc = src
+ cards += card
+ user.visible_message("[user] puts their hand of cards into the deck.",
+ "You put the hand into the deck.")
+ qdel(C)
else
to_chat(user, "You can't mix cards from other decks.")
update_icon()
@@ -178,11 +178,11 @@
if(currenthand.len >= max_hand_size)
to_chat(user, " You can't add any more cards to this hand.")
return
- hand_click.action(C, user, params)
- user.drop_item(C, src)
- user.visible_message("[user] adds a card to their hand.",
- "You add the [C.cardname] to your hand.")
- update_icon()
+ if(user.drop_item(C, src))
+ hand_click.action(C, user, params)
+ user.visible_message("[user] adds a card to their hand.",
+ "You add the [C.cardname] to your hand.")
+ update_icon()
else
to_chat(user, " You can't mix cards from other decks.")
return 1
@@ -275,9 +275,11 @@
if(!(C.parentdeck || src.parentdeck) || C.parentdeck == src.parentdeck)
var/obj/item/toy/cardhand/H = new/obj/item/toy/cardhand(user.loc)
H.parentdeck = C.parentdeck
+ user.drop_item(C, H, force_drop = 1)
user.put_in_active_hand(H)
to_chat(user, "You combine \the [C] and \the [src] into a hand.")
- user.drop_item(C, H)
+ user.drop_item(C, H, force_drop = 1)
+
user.remove_from_mob(src) //we could be anywhere!
src.forceMove(H)
H.currenthand += C
diff --git a/code/modules/hydroponics/eggincubator.dm b/code/modules/hydroponics/eggincubator.dm
index c9290acf6c6..68272a68b1e 100644
--- a/code/modules/hydroponics/eggincubator.dm
+++ b/code/modules/hydroponics/eggincubator.dm
@@ -51,10 +51,10 @@
if(animal_count[/mob/living/simple_animal/chicken] >= ANIMAL_CHILD_CAP)
to_chat(user, "You get the feeling there are enough chickens already.")
return 1
- user.drop_item(O, src)
- user.visible_message( \
- "\The [user] has added \the [O] to \the [src].", \
- "You add \the [O] to \the [src].")
+ if(user.drop_item(O, src))
+ user.visible_message( \
+ "\The [user] has added \the [O] to \the [src].", \
+ "You add \the [O] to \the [src].")
src.updateUsrDialog()
/obj/machinery/egg_incubator/attack_paw(mob/user as mob)
diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm
index 0fb99b00d01..9c2a14407f5 100644
--- a/code/modules/hydroponics/grown_inedible.dm
+++ b/code/modules/hydroponics/grown_inedible.dm
@@ -164,7 +164,7 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
else
to_chat(usr, "All the leaves have fallen off the nettle from violent whacking.")
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan
@@ -234,7 +234,7 @@
else
to_chat(user, "All the leaves have fallen off the deathnettle from violent whacking.")
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan
@@ -257,6 +257,6 @@
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchen/utensil/knife/large) || istype(W, /obj/item/weapon/kitchen/utensil/knife/large/ritual))
to_chat(user, "You use [W] to fashion a pipe out of the corn cob!")
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
return
diff --git a/code/modules/hydroponics/hydro_tray.dm b/code/modules/hydroponics/hydro_tray.dm
index 0a104169e13..44ef1b1a1fd 100644
--- a/code/modules/hydroponics/hydro_tray.dm
+++ b/code/modules/hydroponics/hydro_tray.dm
@@ -336,7 +336,7 @@
else if ( istype(O, /obj/item/weapon/plantspray) )
var/obj/item/weapon/plantspray/spray = O
- user.drop_item(spray)
+ user.drop_item(spray, force_drop = 1)
toxins += spray.toxicity
pestlevel -= spray.pest_kill_str
weedlevel -= spray.weed_kill_str
@@ -365,7 +365,7 @@
if(seed)
to_chat(user, "[src] is already occupied!")
else
- user.drop_item(O)
+ user.drop_item(O, force_drop = 1)
qdel(O)
var/obj/machinery/apiary/A = new(src.loc)
diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm
index b529c032374..d4ae09c5557 100644
--- a/code/modules/hydroponics/seed_extractor.dm
+++ b/code/modules/hydroponics/seed_extractor.dm
@@ -65,7 +65,7 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob
if (istype(O,/obj/item/seeds))
if (!hasSpaceCheck(user))
return
- user.drop_item()
+ user.drop_item(force_drop = 1)
moveToStorage(O)
to_chat(user, "You add [O] to [src.name].")
updateUsrDialog()
@@ -74,7 +74,7 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob
// Fruits and vegetables.
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown) || istype(O, /obj/item/weapon/grown))
- user.drop_item(O)
+ user.drop_item(O, force_drop = 1)
var/datum/seed/new_seed_type
if(istype(O, /obj/item/weapon/grown))
@@ -107,7 +107,7 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob
var/obj/item/F = O
if(F.nonplant_seed_type)
to_chat(user, "You extract some seeds from the [F.name].")
- user.drop_item(O)
+ user.drop_item(O, force_drop = 1)
var/t_amount = 0
var/t_max = rand(1,4)
while(t_amount < t_max)
diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm
index 22c7ebf67f9..e94374c47ed 100644
--- a/code/modules/hydroponics/seed_machines.dm
+++ b/code/modules/hydroponics/seed_machines.dm
@@ -95,7 +95,7 @@
if(S.seed && S.seed.immutable > 0)
to_chat(user, "That seed is not compatible with our genetics technology.")
else
- user.drop_item(S, src)
+ user.drop_item(S, src, force_drop = 1)
loaded_seed = W
to_chat(user, "You load [W] into [src].")
nanomanager.update_uis(src)
@@ -117,7 +117,9 @@
to_chat(user, "That disk does not have any gene data loaded.")
return
- user.drop_item(W, src)
+ if(!user.drop_item(W, src))
+ return
+
loaded_disk = W
to_chat(user, "You load [W] into [src].")
nanomanager.update_uis(src)
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 9663a98e77a..49763e9fff0 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -207,44 +207,44 @@
/obj/item/weapon/book/attack_self(var/mob/user as mob)
if(carved)
if(store)
- to_chat(user, "[store] falls out of [title]!")
+ to_chat(user, "[store] falls out of [title]!")
store.loc = get_turf(src.loc)
store = null
return
else
- to_chat(user, "The pages of [title] have been cut out!")
+ to_chat(user, "The pages of [title] have been cut out!")
return
if(src.dat)
user << browse("Penned by [author].
" + "[dat]", "window=book")
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
onclose(user, "book")
else
- to_chat(user, "This book is completely blank!")
+ to_chat(user, "This book is completely blank!")
/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(carved)
if(!store)
if(W.w_class < 3)
- user.drop_item(W, src)
- store = W
- to_chat(user, "You put [W] in [title].")
- return
+ if(user.drop_item(W, src))
+ store = W
+ to_chat(user, "You put [W] in [title].")
+ return
else
- to_chat(user, "[W] won't fit in [title].")
+ to_chat(user, "[W] won't fit in [title].")
return
else
- to_chat(user, "There's already something in [title]!")
+ to_chat(user, "There's already something in [title]!")
return
if(istype(W, /obj/item/weapon/pen))
if(unique)
- to_chat(user, "These pages don't seem to take the ink well. Looks like you can't modify it.")
+ to_chat(user, "These pages don't seem to take the ink well. Looks like you can't modify it.")
return
var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
switch(choice)
if("Title")
var/newtitle = reject_bad_text(stripped_input(usr, "Write a new title:"))
if(!newtitle)
- to_chat(usr, "The title is invalid.")
+ to_chat(usr, "The title is invalid.")
return
else
src.name = newtitle
@@ -252,14 +252,14 @@
if("Contents")
var/content = sanitize(input(usr, "Write your book's contents (HTML NOT allowed):") as message|null)
if(!content)
- to_chat(usr, "The content is invalid.")
+ to_chat(usr, "The content is invalid.")
return
else
src.dat += content
if("Author")
var/newauthor = stripped_input(usr, "Write the author's name:")
if(!newauthor)
- to_chat(usr, "The name is invalid.")
+ to_chat(usr, "The name is invalid.")
return
else
src.author = newauthor
@@ -268,37 +268,37 @@
else if(istype(W, /obj/item/weapon/barcodescanner))
var/obj/item/weapon/barcodescanner/scanner = W
if(!scanner.computer)
- to_chat(user, "[W]'s screen flashes: 'No associated computer found!'")
+ to_chat(user, "[W]'s screen flashes: 'No associated computer found!'")
else
switch(scanner.mode)
if(0)
scanner.book = src
- to_chat(user, "[W]'s screen flashes: 'Book stored in buffer.'")
+ to_chat(user, "[W]'s screen flashes: 'Book stored in buffer.'")
if(1)
scanner.book = src
scanner.computer.buffer_book = src.name
- to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'")
+ to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'")
if(2)
scanner.book = src
for(var/datum/borrowbook/b in scanner.computer.checkouts)
if(b.bookname == src.name)
scanner.computer.checkouts.Remove(b)
- to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'")
+ to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'")
return
- to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'")
+ to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'")
if(3)
scanner.book = src
for(var/obj/item/weapon/book in scanner.computer.inventory)
if(book == src)
- to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'")
+ to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'")
return
scanner.computer.inventory.Add(src)
- to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
+ to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
else if(istype(W, /obj/item/weapon/kitchen/utensil/knife/large) || istype(W, /obj/item/weapon/wirecutters))
if(carved) return
- to_chat(user, "You begin to carve out [title].")
+ to_chat(user, "You begin to carve out [title].")
if(do_after(user, src, 30))
- to_chat(user, "You carve out the pages from [title]! You didn't want to read it anyway.")
+ to_chat(user, "You carve out the pages from [title]! You didn't want to read it anyway.")
carved = 1
return
else
@@ -324,7 +324,7 @@
mode += 1
if(mode > 3)
mode = 0
- to_chat(user, "[src] Status Display:")
+ to_chat(user, "[src] Status Display:")
var/modedesc
switch(mode)
if(0)
@@ -337,9 +337,9 @@
modedesc = "Scan book to local buffer, attempt to add book to general inventory."
else
modedesc = "ERROR"
- to_chat(user, " - Mode [mode] : [modedesc]")
+ to_chat(user, " - Mode [mode] : [modedesc]")
if(src.computer)
- to_chat(user, "Computer has been associated with this unit.")
+ to_chat(user, "Computer has been associated with this unit.")
else
- to_chat(user, "No associated computer found. Only local scans will function properly.")
- to_chat(user, "\n")
+ to_chat(user, "No associated computer found. Only local scans will function properly.")
+ to_chat(user, "\n")
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index d0347580a8c..174c90b6f3c 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -85,7 +85,7 @@
if("[id]" in cached_books)
var/datum/cachedbook/CB = cached_books["[id]"]
if(CB.programmatic)
- to_chat(user, "That book cannot be removed from the system, as it does not actually exist in the database.")
+ to_chat(user, "That book cannot be removed from the system, as it does not actually exist in the database.")
return
var/sqlid = text2num(id)
@@ -142,7 +142,7 @@ var/global/list/library_section_names = list("Any", "Fiction", "Non-Fiction", "A
/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob)
if(istype(user,/mob/dead))
- to_chat(user, "Nope.")
+ to_chat(user, "Nope.")
return
usr.set_machine(src)
var/dat = "Scanner Control Interface\n" //
@@ -191,16 +191,16 @@ var/global/list/library_section_names = list("Any", "Fiction", "Non-Fiction", "A
/obj/machinery/bookbinder/attackby(var/obj/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/paper/nano))
- user.drop_item(O, src)
- user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
- src.visible_message("[src] begins to hum as it warms up its printing drums.")
- sleep(rand(200,400))
- src.visible_message("[src] whirs as it prints and binds a new book.")
- var/obj/item/weapon/book/b = new(src.loc)
- b.dat = O:info
- b.name = "Print Job #[rand(100, 999)]"
- b.icon_state = "book[rand(1,9)]"
- qdel(O)
- O = null
+ if(user.drop_item(O, src))
+ user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
+ src.visible_message("[src] begins to hum as it warms up its printing drums.")
+ sleep(rand(200,400))
+ src.visible_message("[src] whirs as it prints and binds a new book.")
+ var/obj/item/weapon/book/b = new(src.loc)
+ b.dat = O:info
+ b.name = "Print Job #[rand(100, 999)]"
+ b.icon_state = "book[rand(1,9)]"
+ qdel(O)
+ O = null
else
return ..()
diff --git a/code/modules/medical/cloning.dm b/code/modules/medical/cloning.dm
index 187c9e58e22..c1adccbeb7f 100644
--- a/code/modules/medical/cloning.dm
+++ b/code/modules/medical/cloning.dm
@@ -365,11 +365,11 @@
src.locked = 0
to_chat(user, "System unlocked.")
if (istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
- to_chat(user, "\The [src] processes \the [W].")
- biomass += 50
- user.drop_item(W)
- qdel(W)
- return
+ if(user.drop_item(W))
+ to_chat(user, "\The [src] processes \the [W].")
+ biomass += 50
+ qdel(W)
+ return
//Put messages in the connected computer's temp var for display.
/obj/machinery/cloning/clonepod/proc/connected_message(var/message)
diff --git a/code/modules/medical/computer/cloning.dm b/code/modules/medical/computer/cloning.dm
index 98f6f1facc8..3b514596b9d 100644
--- a/code/modules/medical/computer/cloning.dm
+++ b/code/modules/medical/computer/cloning.dm
@@ -87,11 +87,11 @@
return .
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
if (!src.diskette)
- user.drop_item(W, src)
- src.diskette = W
- to_chat(user, "You insert [W].")
- src.updateUsrDialog()
- return 1
+ if(user.drop_item(W, src))
+ src.diskette = W
+ to_chat(user, "You insert \the [W].")
+ src.updateUsrDialog()
+ return 1
return
/obj/machinery/computer/cloning/attack_paw(mob/user as mob)
diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm
index f3f5cc2c0cc..74849735a26 100644
--- a/code/modules/mining/machine_processing.dm
+++ b/code/modules/mining/machine_processing.dm
@@ -194,8 +194,8 @@
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
- usr.drop_item(I, src)
- id = I
+ if(usr.drop_item(I, src))
+ id = I
updateUsrDialog()
return 1
@@ -220,10 +220,10 @@
to_chat(usr, "There is already an ID in the console!")
return 1
- user.drop_item(W, src)
- id = W
- updateUsrDialog()
- return 1
+ if(user.drop_item(W, src))
+ id = W
+ updateUsrDialog()
+ return 1
. = ..()
diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm
index badb60555d5..486c818f707 100644
--- a/code/modules/mining/money_bag.dm
+++ b/code/modules/mining/money_bag.dm
@@ -35,14 +35,14 @@
/obj/item/weapon/moneybag/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/coin))
- var/obj/item/weapon/coin/C = W
- to_chat(user, "You add the [C.name] into the bag.")
- usr.drop_item(W, src)
+ if(usr.drop_item(W, src))
+ var/obj/item/weapon/coin/C = W
+ to_chat(user, "You add the [C.name] into the bag.")
if (istype(W, /obj/item/weapon/moneybag))
var/obj/item/weapon/moneybag/C = W
for (var/obj/O in C.contents)
contents += O
- to_chat(user, "You empty the [C.name] into the bag.")
+ to_chat(user, "You empty the [C.name] into the bag.")
return
/obj/item/weapon/moneybag/Topic(href, href_list)
diff --git a/code/modules/mining/ore_redemption.dm b/code/modules/mining/ore_redemption.dm
index 5e3780cf154..31f6f9774fd 100644
--- a/code/modules/mining/ore_redemption.dm
+++ b/code/modules/mining/ore_redemption.dm
@@ -39,8 +39,8 @@
return
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
- usr.drop_item(I, src)
- inserted_id = I
+ if(usr.drop_item(I, src))
+ inserted_id = I
/obj/machinery/mineral/ore_redemption/proc/process_sheet(var/obj/item/weapon/ore/O)
var/obj/item/stack/sheet/processed_sheet = SmeltMineral(O)
@@ -142,8 +142,8 @@
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
- usr.drop_item(I, src)
- inserted_id = I
+ if(usr.drop_item(I, src))
+ inserted_id = I
else
to_chat(usr, "No valid ID.")
return 1
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 0d44c95cdc7..4c1631a05f5 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -135,7 +135,8 @@
//Drops the item in our hand - you can specify an item and a location to drop to
-/mob/proc/drop_item(var/obj/item/to_drop, var/atom/Target)
+
+/mob/proc/drop_item(var/obj/item/to_drop, var/atom/Target, force_drop = 0)
if(!candrop) //can't drop items while etheral
return 0
@@ -146,6 +147,9 @@
if(!istype(to_drop)) //still nothing to drop?
return 0 //bail
+ if(to_drop.glued && !force_drop)
+ return 0
+
if(!Target)
Target = src.loc
@@ -162,9 +166,9 @@
return 1
return 0
-/mob/proc/drop_hands(var/atom/Target) //drops both items
- drop_item(get_active_hand(), Target)
- drop_item(get_inactive_hand(), Target)
+/mob/proc/drop_hands(var/atom/Target, force_drop = 0) //drops both items
+ drop_item(get_active_hand(), Target, force_drop)
+ drop_item(get_inactive_hand(), Target, force_drop)
//TODO: phase out this proc
/mob/proc/before_take_item(var/obj/item/W) //TODO: what is this?
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index 235ff813520..9d5bae08b67 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -89,8 +89,11 @@ obj/item/device/mmi/Destroy()
if(!brainmob)
to_chat(user, "Why are you sticking robot legs on an empty [src], you idiot?")
return TRUE
+ if(!user.drop_item(O, src))
+ to_chat(user, "You can't let go of \the [src]!")
+ return FALSE
+
contents += O
- user.drop_item(O, src)
to_chat(user, "You successfully add \the [O] to the contraption,")
return TRUE
else if(cc==mommi_assembly_parts[t])
@@ -111,12 +114,15 @@ obj/item/device/mmi/Destroy()
if(!BO.brainmob)
to_chat(user, "You aren't sure where this brain came from, but you're pretty sure it's a useless brain.")
return
-
// Checking to see if the ghost has been moused/borer'd/etc since death.
var/mob/living/carbon/brain/BM = BO.brainmob
if(!BM.client)
to_chat(user, "\The [src] indicates that their mind is completely unresponsive; there's no point.")
return
+ if(!user.drop_item(O))
+ to_chat(user, "You can't let go of \the [O]!")
+ return
+
src.visible_message("[user] sticks \a [O] into \the [src].")
brainmob = BO.brainmob
@@ -126,7 +132,6 @@ obj/item/device/mmi/Destroy()
brainmob.stat = 0
brainmob.resurrect()
- user.drop_item(O)
qdel(O)
O = null
diff --git a/code/modules/mob/living/carbon/brain/MaMI.dm b/code/modules/mob/living/carbon/brain/MaMI.dm
index 0df9fc73483..9d17cd17b1e 100644
--- a/code/modules/mob/living/carbon/brain/MaMI.dm
+++ b/code/modules/mob/living/carbon/brain/MaMI.dm
@@ -13,6 +13,10 @@
to_chat(user, "You aren't sure where this brain came from, but you're pretty sure it's a useless brain.")
posibrain = null
return
+ if(!user.drop_item(posibrain, src))
+ user << "You can't let go of \the [src]!"
+ return
+
src.visible_message("[user] sticks \a [O] into \the [src].")
brainmob = posibrain.brainmob
@@ -24,8 +28,6 @@
to_chat(src.brainmob, "As a synthetic intelligence, you answer to all crewmembers, as well as the AI.")
to_chat(src.brainmob, "Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.")
- user.drop_item(posibrain, src)
-
name = "Machine-Man Interface: [brainmob.real_name]"
icon_state = "mami_full"
return 1
diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm
index 0acd67d0fc5..40c019b54ce 100644
--- a/code/modules/mob/living/carbon/give.dm
+++ b/code/modules/mob/living/carbon/give.dm
@@ -41,7 +41,11 @@
to_chat(src, "Your hands are full.")
to_chat(user, "Their hands are full.")
return
- user.drop_item(I)
+ if(!user.drop_item(I))
+ src << "[user] can't let go of \the [I]!"
+ user << "You can't seem to let go of \the [I]."
+ return
+
src.put_in_hands(I)
src.visible_message("[user] handed \the [I] to [src].")
if("No")
diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm
index 6323da37e7b..1629640b34e 100644
--- a/code/modules/mob/living/carbon/monkey/inventory.dm
+++ b/code/modules/mob/living/carbon/monkey/inventory.dm
@@ -89,7 +89,7 @@
W.add_fingerprint(source)
else
if (istype(item, /obj/item/clothing/mask))
- source.drop_item(item)
+ source.drop_item(item, force_drop = 1)
loc = target
item.layer = 20
target.wear_mask = item
@@ -107,7 +107,7 @@
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
- source.drop_item(item)
+ source.drop_item(item, force_drop = 1)
loc = target
item.layer = 20
target.l_hand = item
@@ -127,7 +127,7 @@
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
- source.drop_item(item)
+ source.drop_item(item, force_drop = 1)
loc = target
item.layer = 20
target.r_hand = item
@@ -147,7 +147,7 @@
W.add_fingerprint(source)
else
if ((istype(item, /obj/item) && item.slot_flags & SLOT_BACK ))
- source.drop_item(item)
+ source.drop_item(item, force_drop = 1)
loc = target
item.layer = 20
target.back = item
@@ -165,7 +165,7 @@
W.add_fingerprint(source)
else
if (istype(item, /obj/item/weapon/handcuffs))
- source.drop_item(item)
+ source.drop_item(item, force_drop = 1)
target.handcuffed = item
item.loc = target
if("internal")
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index a3976df17de..11e2d6b262f 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -220,7 +220,7 @@
oldhat = hat
hat = null
hat = H
- usr.drop_item(hat, src)
+ usr.drop_item(hat, src, 1)
regenerate_icons()
if (oldhat)
usr.put_in_hands(oldhat)
@@ -238,7 +238,7 @@
olduniform = uniform
uniform = null
uniform = C
- usr.drop_item(uniform, src)
+ usr.drop_item(uniform, src, 1)
regenerate_icons()
if (olduniform)
usr.put_in_hands(olduniform)
@@ -256,7 +256,7 @@
oldglasses = glasses
glasses = null
glasses = G
- usr.drop_item(glasses, src)
+ usr.drop_item(glasses, src, 1)
regenerate_icons()
if (oldglasses)
usr.put_in_hands(oldglasses)
diff --git a/code/modules/mob/living/holders.dm b/code/modules/mob/living/holders.dm
index 89e7a95dd09..ec548dbd608 100644
--- a/code/modules/mob/living/holders.dm
+++ b/code/modules/mob/living/holders.dm
@@ -22,7 +22,7 @@
//Hopefully this will stop the icon from remaining on human mobs.
if(istype(loc,/mob/living))
var/mob/living/A = src.loc
- A.drop_item(src)
+ A.drop_item(src, force_drop = 1)
A.update_icons()
for(var/mob/M in contents)
diff --git a/code/modules/mob/living/silicon/mommi/death.dm b/code/modules/mob/living/silicon/mommi/death.dm
index 7455dc4fff4..793eb4c3228 100644
--- a/code/modules/mob/living/silicon/mommi/death.dm
+++ b/code/modules/mob/living/silicon/mommi/death.dm
@@ -14,7 +14,7 @@
var/obj/item/found = locate(tool_state) in src.module.modules
if(!found && tool_state != src.module.emag)
var/obj/item/TS = tool_state
- drop_item(TS)
+ drop_item(TS, force_drop = 1)
qdel(src)
/mob/living/silicon/robot/mommi/dust()
diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm
index 05d024dea9f..2e0143dacd0 100644
--- a/code/modules/mob/living/simple_animal/friendly/corgi.dm
+++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm
@@ -190,6 +190,7 @@
if( ! ( item_to_add.type in allowed_types ) )
to_chat(usr, "You set [item_to_add] on [src]'s back, but \he shakes it off!")
usr.drop_item(item_to_add, get_turf(src))
+
if(prob(25))
step_rand(item_to_add)
if (ckey == null)
@@ -198,7 +199,7 @@
sleep(1)
return
- usr.drop_item(item_to_add, src)
+ usr.drop_item(item_to_add, src, force_drop = 1)
src.inventory_back = item_to_add
regenerate_icons()
@@ -368,7 +369,7 @@
usr.visible_message("[usr] puts [item_to_add] on [real_name]'s head. [src] looks at [usr] and barks once.",
"You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags \his tail once and barks.",
"You hear a friendly-sounding bark.")
- usr.drop_item(item_to_add, src)
+ usr.drop_item(item_to_add, src, force_drop = 1)
else
item_to_add.loc = src
src.inventory_head = item_to_add
@@ -377,6 +378,7 @@
else
to_chat(usr, "You set [item_to_add] on [src]'s head, but \he shakes it off!")
usr.drop_item(item_to_add, src.loc)
+
if(prob(25))
step_rand(item_to_add)
if (ckey == null)
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 cf2da9bb964..e1e842cedf8 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -230,8 +230,11 @@
/mob/living/simple_animal/chicken/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/wheat)) //feedin' dem chickens
if(!stat && eggsleft < 8)
+ if(!user.drop_item(O))
+ user << "You can't let go of \the [O]!"
+ return
+
user.visible_message("[user] feeds [O] to [name]! It clucks happily.","You feed [O] to [name]! It clucks happily.")
- user.drop_item(O)
qdel(O)
eggsleft += rand(1, 4)
// to_chat(world, eggsleft)
diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
index f7c8cef4352..03f8c0b57ff 100644
--- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
+++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
@@ -65,10 +65,11 @@
if(jobban_isbanned(B.brainmob, "Cyborg"))
to_chat(user, "[O] does not seem to fit.")
return
+ if(!user.drop_item(O, src))
+ user << "You can't let go of \the [O]."
to_chat(user, "You install [O] in [src]!")
- user.drop_item(O, src)
src.mmi = O
src.transfer_personality(O)
src.update_icon()
diff --git a/code/modules/mob/living/simple_animal/vox.dm b/code/modules/mob/living/simple_animal/vox.dm
index d6fbf0f72e2..ed3500b0cb1 100644
--- a/code/modules/mob/living/simple_animal/vox.dm
+++ b/code/modules/mob/living/simple_animal/vox.dm
@@ -114,7 +114,7 @@
/mob/living/simple_animal/vox/armalis/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O,/obj/item/vox/armalis_armour))
- user.drop_item(O, src)
+ user.drop_item(O, src, force_drop = 1)
armour = O
speed = 1
maxHealth += 200
@@ -123,7 +123,7 @@
regenerate_icons()
return
if(istype(O,/obj/item/vox/armalis_amp))
- user.drop_item(O, src)
+ user.drop_item(O, src, force_drop = 1)
amp = O
visible_message("[src] is quickly outfitted in [O] by [user].","You quickly outfit [src] in [O].")
regenerate_icons()
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index e917fbb197e..ba1fe58a96f 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -543,23 +543,24 @@ var/global/obj/screen/fuckstat/FUCK = new
if(EQUIP_FAILACTION_DROP)
W.loc=get_turf(src) // I think.
return
- drop_item(W)
- if(!(put_in_active_hand(wearing)))
- equip_to_slot(wearing, slot, redraw_mob)
- switch(act_on_fail)
- if(EQUIP_FAILACTION_DELETE)
- qdel(W)
- else
- if(!disable_warning && act_on_fail != EQUIP_FAILACTION_DROP)
- to_chat(src, " You are unable to equip that.")//Only print if act_on_fail is NOTHING
- return
- else
- equip_to_slot(W, slot, redraw_mob)
- u_equip(wearing,0)
- put_in_active_hand(wearing)
- if(H.s_store && !H.s_store.mob_can_equip(src, slot_s_store, 1))
- u_equip(H.s_store,1)
+ if(drop_item(W))
+ if(!(put_in_active_hand(wearing)))
+ equip_to_slot(wearing, slot, redraw_mob)
+ switch(act_on_fail)
+ if(EQUIP_FAILACTION_DELETE)
+ qdel(W)
+ else
+ if(!disable_warning && act_on_fail != EQUIP_FAILACTION_DROP)
+ to_chat(src, " You are unable to equip that.")//Only print if act_on_fail is NOTHING
+
+ return
+ else
+ equip_to_slot(W, slot, redraw_mob)
+ u_equip(wearing,0)
+ put_in_active_hand(wearing)
+ if(H.s_store && !H.s_store.mob_can_equip(src, slot_s_store, 1))
+ u_equip(H.s_store,1)
return 1
else
if(!W.mob_can_equip(src, slot, disable_warning))
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index d33aa2707ed..a0d593accc9 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -848,7 +848,7 @@ Note that amputating the affected organ does in fact remove the infection from t
W.add_blood(owner)
if(ismob(W.loc))
var/mob/living/H = W.loc
- H.drop_item(W)
+ H.drop_item(W, force_drop = 1)
W.loc = owner
/****************************************************
diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm
index 39ea0aea0ea..1668c58d41b 100644
--- a/code/modules/paperwork/clipboard.dm
+++ b/code/modules/paperwork/clipboard.dm
@@ -46,11 +46,11 @@
/obj/item/weapon/clipboard/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo))
- user.drop_item(W, src)
- if(istype(W, /obj/item/weapon/paper))
- toppaper = W
- to_chat(user, "You clip the [W] onto \the [src].")
- update_icon()
+ if(user.drop_item(W, src))
+ if(istype(W, /obj/item/weapon/paper))
+ toppaper = W
+ to_chat(user, "You clip the [W] onto \the [src].")
+ update_icon()
else if(toppaper)
toppaper.attackby(usr.get_active_hand(), usr)
update_icon()
@@ -97,9 +97,15 @@
if(!haspen)
if(istype(usr.get_active_hand(), /obj/item/weapon/pen))
var/obj/item/weapon/pen/W = usr.get_active_hand()
+<<<<<<< 636687c2a83b23b7efc3a052c68c16a6ced66ca8
usr.drop_item(W, src)
haspen = W
to_chat(usr, "You slot the pen into \the [src].")
+=======
+ if(usr.drop_item(W, src))
+ haspen = W
+ usr << "You slot the pen into \the [src]."
+>>>>>>> adds clown glue
if(href_list["write"])
var/obj/item/P = locate(href_list["write"])
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index 0f05974fb26..607aa3de731 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -35,12 +35,12 @@
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo))
- to_chat(user, "You put [P] in [src].")
- user.drop_item(P, src)
- icon_state = "[initial(icon_state)]-open"
- sleep(5)
- icon_state = initial(icon_state)
- updateUsrDialog()
+ if(user.drop_item(P, src))
+ to_chat(user, "You put [P] in [src].")
+ icon_state = "[initial(icon_state)]-open"
+ sleep(5)
+ icon_state = initial(icon_state)
+ updateUsrDialog()
else if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm
index 550c43a393e..ac6b832f40f 100644
--- a/code/modules/paperwork/folders.dm
+++ b/code/modules/paperwork/folders.dm
@@ -33,9 +33,9 @@
/obj/item/weapon/folder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo))
- user.drop_item(W, src)
- to_chat(user, "You put the [W] into \the [src].")
- update_icon()
+ if(user.drop_item(W, src))
+ to_chat(user, "You put the [W] into \the [src].")
+ update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = copytext(sanitize(input(user, "What would you like to label the folder?", "Folder Labelling", null) as text), 1, MAX_NAME_LEN)
if(in_range(src, user) && user.stat == CONSCIOUS)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index a41ef02355c..1b014e62136 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -311,12 +311,12 @@
to_chat(user, "You stamp [src] with your rubber stamp.")
else if(istype(P, /obj/item/weapon/photo))
- if(img)
- to_chat(user, "This paper already has a photo attached.")
- return
- img = P
- user.drop_item(P, src)
- to_chat(user, "You attach the photo to the piece of paper.")
+ if(user.drop_item(P, src))
+ if(img)
+ to_chat(user, "This paper already has a photo attached.")
+ return
+ img = P
+ to_chat(user, "You attach the photo to the piece of paper.")
else if(P.is_hot())
src.ashify_item(user)
return //no fingerprints, paper is gone
@@ -372,7 +372,7 @@ var/global/list/paper_folding_results = list ( \
if (. == null) return
if (!canfold(usr)) return //second check in case some chucklefuck moves the paper or falls down while the menu is open
- usr.drop_item(src) //Drop the original paper to free our hand and call proper inventory handling code
+ usr.drop_item(src, force_drop = 1) //Drop the original paper to free our hand and call proper inventory handling code
var/obj/item/weapon/p_folded/P = new .(get_turf(usr)) //Let's make a new item
P.unfolded = src //that unfolds into the original paper
src.loc = P //and also contains it, for good measure.
diff --git a/code/modules/paperwork/paper_folded.dm b/code/modules/paperwork/paper_folded.dm
index 6f8dce5df21..065c8ecac67 100644
--- a/code/modules/paperwork/paper_folded.dm
+++ b/code/modules/paperwork/paper_folded.dm
@@ -53,7 +53,8 @@
return
/obj/item/weapon/p_folded/proc/processunfolding(var/obj/item/weapon/p_folded/P, mob/user)
- user.drop_item(P, src) //drop the item first to free our hand, but don't delete it yet because it contains the unfolding result.
+ user.drop_item(P, src, force_drop = 1) //drop the item first to free our hand, but don't delete it yet because it contains the unfolding result.
+
if(P.unfolded)
user.put_in_hands(P.unfolded)
user.visible_message("[user] unfolds \the [src].", \
diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm
index d2de7b14198..b014e3744e0 100644
--- a/code/modules/paperwork/paperbin.dm
+++ b/code/modules/paperwork/paperbin.dm
@@ -79,12 +79,11 @@
if(!istype(i))
return
- user.drop_item(i, src)
- to_chat(user, "You put [i] in [src].")
- papers.Add(i)
- amount++
- update_icon()
-
+ if(user.drop_item(i, src))
+ to_chat(user, "You put [i] in [src].")
+ papers.Add(i)
+ amount++
+ update_icon()
/obj/item/weapon/paper_bin/examine(mob/user)
..()
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index a2572eda6ed..056b8963c7e 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -269,29 +269,29 @@
copying = 0
if(istype(O, /obj/item/weapon/paper))
if(copier_empty())
- user.drop_item(O, src)
- copy = O
- to_chat(user, "You insert [O] into [src].")
- flick("bigscanner1", src)
- updateUsrDialog()
+ if(user.drop_item(O, src))
+ copy = O
+ to_chat(user, "You insert [O] into [src].")
+ flick("bigscanner1", src)
+ updateUsrDialog()
else
to_chat(user, "There is already something in [src].")
else if(istype(O, /obj/item/weapon/photo))
if(copier_empty())
- user.drop_item(O, src)
- photocopy = O
- to_chat(user, "You insert [O] into [src].")
- flick("bigscanner1", src)
- updateUsrDialog()
+ if(user.drop_item(O, src))
+ photocopy = O
+ to_chat(user, "You insert [O] into [src].")
+ flick("bigscanner1", src)
+ updateUsrDialog()
else
to_chat(user, "There is already something in [src].")
else if(istype(O, /obj/item/device/toner))
if(toner <= 0)
- user.drop_item(O)
- qdel(O)
- toner = 40
- to_chat(user, "You insert [O] into [src].")
- updateUsrDialog()
+ if(user.drop_item(O))
+ qdel(O)
+ toner = 40
+ to_chat(user, "You insert [O] into [src].")
+ updateUsrDialog()
else
to_chat(user, "This cartridge is not yet ready for replacement! Use up the rest of the toner.")
else if(istype(O, /obj/item/weapon/wrench))
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index da4cb5e8153..e856ee50eae 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -162,13 +162,15 @@
if(pictures_left)
to_chat(user, "[src] still has some film in it!")
return
- to_chat(user, "You insert [I] into [src].")
- user.drop_item(I)
- qdel(I)
- pictures_left = pictures_max
- icon_state = icon_on
- on = 1
- return
+
+ if(user.drop_item(I))
+ to_chat(user, "You insert [I] into [src].")
+
+ qdel(I)
+ pictures_left = pictures_max
+ icon_state = icon_on
+ on = 1
+ return
..()
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 36bc231480e..5434e8ac4d2 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -159,24 +159,24 @@
/obj/machinery/power/apc/examine(mob/user)
..()
if(stat & BROKEN)
- to_chat(user, "Looks broken.")
+ to_chat(user, "Looks broken.")
return
if(opened)
if(has_electronics && terminal)
- to_chat(user, "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"].")
+ to_chat(user, "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"].")
else if (!has_electronics && terminal)
- to_chat(user, "There are some wires but no any electronics.")
+ to_chat(user, "There are some wires but no any electronics.")
else if (has_electronics && !terminal)
- to_chat(user, "Electronics installed but not wired.")
+ to_chat(user, "Electronics installed but not wired.")
else /* if (!has_electronics && !terminal) */
- to_chat(user, "There is no electronics nor connected wires.")
+ to_chat(user, "There is no electronics nor connected wires.")
else
if (stat & MAINT)
- to_chat(user, "The cover is closed. Something wrong with it: it doesn't work.")
+ to_chat(user, "The cover is closed. Something wrong with it: it doesn't work.")
else if (malfhack)
- to_chat(user, "The cover is broken. It may be hard to force it open.")
+ to_chat(user, "The cover is broken. It may be hard to force it open.")
else
- to_chat(user, "The cover is closed.")
+ to_chat(user, "The cover is closed.")
/obj/machinery/power/apc/update_icon()
if (!status_overlays)
@@ -365,11 +365,11 @@
if (istype(W, /obj/item/weapon/crowbar) && opened)
if (has_electronics==1)
if (terminal)
- to_chat(user, "Disconnect wires first.")
+ to_chat(user, "Disconnect wires first.")
return
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
to_chat(user, "You are trying to remove the power control board...")//lpeters - fixed grammar issues
-
+
if (do_after(user, src, 50) && opened && !terminal && has_electronics == 1)
has_electronics = 0
if ((stat & BROKEN) || malfhack)
@@ -388,100 +388,102 @@
update_icon()
else if (istype(W, /obj/item/weapon/crowbar) && !((stat & BROKEN) || malfhack) )
if(coverlocked && !(stat & MAINT))
- to_chat(user, "The cover is locked and cannot be opened.")
+ to_chat(user, "The cover is locked and cannot be opened.")
return
else
opened = 1
update_icon()
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
if(cell)
- to_chat(user, "You swap the power cell within with the new cell in your hand.")
- var/obj/item/weapon/oldpowercell = cell
- user.drop_item(W, src)
- cell = W
- chargecount = 0
- update_icon()
- user.put_in_hands(oldpowercell)
- return
+
+ if(user.drop_item(W, src))
+ to_chat(user, "You swap the power cell within with the new cell in your hand.")
+ var/obj/item/weapon/oldpowercell = cell
+ cell = W
+ chargecount = 0
+ update_icon()
+ user.put_in_hands(oldpowercell)
+ return
+
else
if (stat & MAINT)
- to_chat(user, "There is no connector for your power cell.")
+ to_chat(user, "There is no connector for your power cell.")
return
- user.drop_item(W, src)
- cell = W
- user.visible_message(\
- "[user.name] has inserted the power cell to [src.name]!",\
- "You insert the power cell.")
- chargecount = 0
- update_icon()
+ if(user.drop_item(W, src))
+ cell = W
+ user.visible_message(\
+ "[user.name] has inserted the power cell to [src.name]!",\
+ "You insert the power cell.")
+ chargecount = 0
+ update_icon()
else if (istype(W, /obj/item/weapon/screwdriver)) // haxing
if(opened)
if (cell)
to_chat(user, "Close the APC first.")//Less hints more mystery!
-
+
return
else
if (has_electronics==1 && terminal)
has_electronics = 2
stat &= ~MAINT
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- to_chat(user, "You screw the circuit electronics into place.")
+ to_chat(user, "You screw the circuit electronics into place.")
else if (has_electronics==2)
has_electronics = 1
stat |= MAINT
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- to_chat(user, "You unfasten the electronics.")
+ to_chat(user, "You unfasten the electronics.")
else /* has_electronics==0 */
- to_chat(user, "There is nothing to secure.")
+ to_chat(user, "There is nothing to secure.")
return
update_icon()
else if(emagged)
- to_chat(user, "The interface is broken.")
+ to_chat(user, "The interface is broken.")
else if(has_electronics == 2)
wiresexposed = !wiresexposed
- to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
+ to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
update_icon()
else
- to_chat(user, "You open the panel and find nothing inside.")
+ to_chat(user, "You open the panel and find nothing inside.")
return
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
if(emagged)
- to_chat(user, "The interface is broken.")
+ to_chat(user, "The interface is broken.")
else if(opened)
- to_chat(user, "You must close the cover to swipe an ID card.")
+ to_chat(user, "You must close the cover to swipe an ID card.")
else if(wiresexposed)
- to_chat(user, "You must close the panel")
+ to_chat(user, "You must close the panel")
else if(stat & (BROKEN|MAINT))
- to_chat(user, "Nothing happens.")
+ to_chat(user, "Nothing happens.")
else
if(src.allowed(usr) && !isWireCut(APC_WIRE_IDSCAN))
locked = !locked
- to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.")
+ to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.")
update_icon()
else
- to_chat(user, "Access denied.")
+ to_chat(user, "Access denied.")
else if (istype(W, /obj/item/weapon/card/emag) && !(emagged || malfhack)) // trying to unlock with an emag card
if(opened)
- to_chat(user, "You must close the cover to swipe an ID card.")
+ to_chat(user, "You must close the cover to swipe an ID card.")
else if(wiresexposed)
- to_chat(user, "You must close the panel first")
+ to_chat(user, "You must close the panel first")
else if(stat & (BROKEN|MAINT))
- to_chat(user, "Nothing happens.")
+ to_chat(user, "Nothing happens.")
else
flick("apc-spark", src)
if (do_after(user, src, 6) && !opened && !wiresexposed && !(stat & (BROKEN|MAINT)) && !emagged)
if(prob(50))
emagged = 1
locked = 0
- to_chat(user, "You emag the APC interface.")
+ to_chat(user, "You emag the APC interface.")
update_icon()
else
- to_chat(user, "You fail to [ locked ? "unlock" : "lock"] the APC interface.")
+ to_chat(user, "You fail to [ locked ? "unlock" : "lock"] the APC interface.")
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics != 2)
var/obj/item/stack/cable_coil/C = W
if(C.amount < 10)
- to_chat(user, "You need more wires.")
+ to_chat(user, "You need more wires.")
return
if(make_terminal(user))
@@ -491,9 +493,9 @@
else if (istype(W, /obj/item/weapon/wirecutters) && opened && terminal && has_electronics!=2)
var/turf/T = get_turf(src)
if (T.intact)
- to_chat(user, "You must remove the floor plating in front of the APC first.")
+ to_chat(user, "You must remove the floor plating in front of the APC first.")
return
- to_chat(user, "You begin to cut the cables...")
+ to_chat(user, "You begin to cut the cables...")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, src, 50) && opened && terminal && has_electronics != 2 && !T.intact)
if (prob(50) && electrocute_mob(usr, terminal.get_powernet(), terminal))
@@ -508,22 +510,22 @@
qdel(terminal)
terminal = null
else if (istype(W, /obj/item/weapon/circuitboard/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
- to_chat(user, "You begin to insert the power control board into the frame...")
+ to_chat(user, "You begin to insert the power control board into the frame...")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, src, 10) && opened && has_electronics == 0 && !((stat & BROKEN) || malfhack))
has_electronics = 1
- to_chat(user, "You place the power control board inside the frame.")
+ to_chat(user, "You place the power control board inside the frame.")
qdel(W)
W = null
else if (istype(W, /obj/item/weapon/circuitboard/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
- to_chat(user, "You cannot put the board inside, the frame is damaged.")
+ to_chat(user, "You cannot put the board inside, the frame is damaged.")
return
else if (istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics==0 && !terminal)
var/obj/item/weapon/weldingtool/WT = W
if (WT.get_fuel() < 3)
- to_chat(user, "You need more welding fuel to complete this task.")
+ to_chat(user, "You need more welding fuel to complete this task.")
return
- to_chat(user, "You start welding the APC frame...")
+ to_chat(user, "You start welding the APC frame...")
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
if (do_after(user, src, 50))
if(!src || !WT.remove_fuel(3, user)) return
@@ -553,9 +555,9 @@
update_icon()
else if (istype(W, /obj/item/mounted/frame/apc_frame) && opened && ((stat & BROKEN) || malfhack))
if (has_electronics)
- to_chat(user, "You cannot repair this APC until you remove the electronics still inside.")
+ to_chat(user, "You cannot repair this APC until you remove the electronics still inside.")
return
- to_chat(user, "You begin to replace the damaged APC frame...")
+ to_chat(user, "You begin to replace the damaged APC frame...")
if(do_after(user, src, 50))
user.visible_message(\
"[user.name] has replaced the damaged APC frame with new one.",\
@@ -616,7 +618,7 @@
src.cell = null
user.visible_message("[user.name] removes the power cell from [src.name]!", "You remove the power cell.")
-// to_chat(user, "You remove the power cell.")
+// to_chat(user, "You remove the power cell.")
charging = 0
src.update_icon()
return
@@ -747,13 +749,13 @@
areaMaster.power_environ = (environ > 1)
// if (area.name == "AI Chamber")
// spawn(10)
-// to_chat(world, " [area.name] [area.power_equip]")
+// to_chat(world, " [area.name] [area.power_equip]")
else
areaMaster.power_light = 0
areaMaster.power_equip = 0
areaMaster.power_environ = 0
// if (area.name == "AI Chamber")
-// to_chat(world, "[area.power_equip]")
+// to_chat(world, "[area.power_equip]")
areaMaster.power_change()
/obj/machinery/power/apc/proc/isWireCut(var/wireIndex)
@@ -762,20 +764,20 @@
/obj/machinery/power/apc/proc/can_use(mob/user as mob, var/loud = 0) //used by attack_hand() and Topic()
if (user.stat && !isobserver(user))
- to_chat(user, "You must be conscious to use this [src]!")
+ to_chat(user, "You must be conscious to use this [src]!")
return 0
if(!user.client)
return 0
if (!user.dexterity_check())
- to_chat(user, "You don't have the dexterity to use this [src]!")
+ to_chat(user, "You don't have the dexterity to use this [src]!")
nanomanager.close_user_uis(user, src)
return 0
if(user.restrained())
- to_chat(user, "You must have free hands to use this [src]")
+ to_chat(user, "You must have free hands to use this [src]")
return 0
if(user.lying)
- to_chat(user, "You must stand to use this [src]!")
+ to_chat(user, "You must stand to use this [src]!")
return 0
if (istype(user, /mob/living/silicon))
var/mob/living/silicon/ai/AI = user
@@ -789,14 +791,14 @@
) \
)
if(!loud)
- to_chat(user, "\The [src] have AI control disabled!")
+ to_chat(user, "\The [src] have AI control disabled!")
nanomanager.close_user_uis(user, src)
return 0
else if(isobserver(user))
if(malfhack && istype(malfai) && !isAdminGhost(user))
if(!loud)
- to_chat(user, "\The [src] have AI control disabled!")
+ to_chat(user, "\The [src] have AI control disabled!")
nanomanager.close_user_uis(user, src)
return 0
else
@@ -809,10 +811,10 @@
if (istype(H))
if(H.getBrainLoss() >= 60)
for(var/mob/M in viewers(src, null))
- to_chat(M, "[H] stares cluelessly at [src] and drools.")
+ to_chat(M, "[H] stares cluelessly at [src] and drools.")
return 0
else if(prob(H.getBrainLoss()))
- to_chat(user, "You momentarily forget how to use [src].")
+ to_chat(user, "You momentarily forget how to use [src].")
return 0
return 1
@@ -826,7 +828,7 @@
return 0
if(!istype(usr, /mob/living/silicon) && locked)
// Shouldn't happen, this is here to prevent href exploits
- to_chat(usr, "You must unlock the panel to use this!")
+ to_chat(usr, "You must unlock the panel to use this!")
return 1
if (href_list["lock"])
coverlocked = !coverlocked
@@ -866,9 +868,9 @@
var/mob/living/silicon/ai/malfai = usr
if(get_malf_status(malfai)==1)
if (malfai.malfhacking)
- to_chat(malfai, "You are already hacking an APC.")
+ to_chat(malfai, "You are already hacking an APC.")
return 1
- to_chat(malfai, "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process.")
+ to_chat(malfai, "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process.")
malfai.malfhack = src
malfai.malfhacking = 1
sleep(600)
@@ -884,7 +886,7 @@
src.malfai = usr:parent
else
src.malfai = usr
- to_chat(malfai, "Hack complete. The APC is now under your exclusive control.")
+ to_chat(malfai, "Hack complete. The APC is now under your exclusive control.")
update_icon()
else if (href_list["occupyapc"])
@@ -898,7 +900,7 @@
else if (href_list["toggleaccess"])
if(istype(usr, /mob/living/silicon))
if(emagged || (stat & (BROKEN|MAINT)))
- to_chat(usr, "The APC does not respond to the command.")
+ to_chat(usr, "The APC does not respond to the command.")
else
locked = !locked
update_icon()
@@ -920,10 +922,10 @@
if(!istype(malf))
return
if(istype(malf.loc, /obj/machinery/power/apc)) // Already in an APC
- to_chat(malf, "You must evacuate your current apc first.")
+ to_chat(malf, "You must evacuate your current apc first.")
return
if(!malf.can_shunt)
- to_chat(malf, "You cannot shunt.")
+ to_chat(malf, "You cannot shunt.")
return
if(STATION_Z != z)
return
@@ -965,7 +967,7 @@
point.the_disk = A //The pinpointer tracks the AI back into its core.
else
- to_chat(src.occupant, "Primary core damaged, unable to return core processes.")
+ to_chat(src.occupant, "Primary core damaged, unable to return core processes.")
if(forced)
src.occupant.loc = src.loc
src.occupant.death()
@@ -980,7 +982,7 @@
if(prob(3))
src.locked = 1
if (src.cell.charge > 0)
-// to_chat(world, "blew APC in [src.loc.loc]")
+// to_chat(world, "blew APC in [src.loc.loc]")
src.cell.charge = 0
cell.corrupt()
src.malfhack = 1
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index a9a1c8d445c..8de7937aec7 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -294,6 +294,10 @@ var/global/list/obj/machinery/light/alllights = list()
src.add_fingerprint(user)
var/obj/item/weapon/light/L = W
if(L.fitting == fitting)
+ if(!user.drop_item(L))
+ user << "You can't let go of \the [L]!"
+ return
+
status = L.status
to_chat(user, "You insert \the [L.name].")
switchcount = L.switchcount
@@ -307,7 +311,6 @@ var/global/list/obj/machinery/light/alllights = list()
on = has_power()
update()
- user.drop_item(L) //drop the item to update overlays and such
qdel(L)
if(on && rigged)
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index 97ec204634b..281fbe9dc4d 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -69,9 +69,9 @@ var/global/list/rad_collectors = list()
if(src.P)
to_chat(user, "A plasma tank is already loaded.")
return 1
- user.drop_item(W, src)
- src.P = W
- update_icons()
+ if(user.drop_item(W, src))
+ src.P = W
+ update_icons()
else if(istype(W, /obj/item/weapon/crowbar))
if(P && !src.locked)
eject()
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 3dbf62517bf..ef15e771930 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -81,12 +81,12 @@ var/list/solars_list = list()
if(!tracker)
if(istype(W, /obj/item/weapon/tracker_electronics))
- tracker = 1
- user.drop_item(W)
- qdel(W)
- user.visible_message("[user] inserts the electronics into [src].", \
- "You insert the electronics into [src].")
- return 1
+ if(user.drop_item(W))
+ tracker = 1
+ qdel(W)
+ user.visible_message("[user] inserts the electronics into [src].", \
+ "You insert the electronics into [src].")
+ return 1
else
if(iscrowbar(W))
new /obj/item/weapon/tracker_electronics(src.loc)
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index 461b5553f60..81c9a5eec46 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -71,9 +71,15 @@
if((exact && (AC.type == text2path(ammo_type))) || (!exact && istype(AC, text2path(ammo_type))))//if it's the exact type we want, or the general class
accepted = 1
if(AC.BB && accepted && stored_ammo.len < max_ammo)
+ if(user.drop_item(A, src))
+ to_chat(user, "You successfully load the [src] with \the [AC]. ")
+ else
+ to_chat(user, "You can't let go of \the [A]!")
+ return
+
+
stored_ammo += AC
- user.drop_item(A, src)
- to_chat(user, "You successfully load the [src] with \the [AC]. ")
+
update_icon()
else if(!AC.BB)
to_chat(user, "You can't load a spent bullet.")
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 7db1e15d052..f9e1b0ba77e 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -78,7 +78,7 @@
if ((M_CLUMSY in M.mutations) && prob(50))
to_chat(M, "[src] blows up in your face.")
M.take_organ_damage(0,20)
- M.drop_item(src)
+ M.drop_item(src, force_drop = 1)
qdel(src)
return
diff --git a/code/modules/projectiles/guns/lawgiver.dm b/code/modules/projectiles/guns/lawgiver.dm
index 30f42cbfa3d..898aee21ca2 100644
--- a/code/modules/projectiles/guns/lawgiver.dm
+++ b/code/modules/projectiles/guns/lawgiver.dm
@@ -121,8 +121,11 @@
/obj/item/weapon/gun/lawgiver/proc/LoadMag(var/obj/item/ammo_storage/magazine/AM, var/mob/user)
if(istype(AM, /obj/item/ammo_storage/magazine/lawgiver) && !magazine)
if(user)
- user.drop_item(AM, src)
- to_chat(user, "You load the magazine into \the [src].")
+ if(user.drop_item(AM, src))
+ to_chat(user, "You load the magazine into \the [src].")
+ else
+ return
+
magazine = AM
AM.update_icon()
update_icon()
@@ -239,7 +242,7 @@
if ((M_CLUMSY in M.mutations) && prob(50))
to_chat(M, "[src] blows up in your face.")
M.take_organ_damage(0,20)
- M.drop_item(src)
+ M.drop_item(src, force_drop = 1)
qdel(src)
return
diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm
index ca54106c1b3..6d30531922f 100644
--- a/code/modules/projectiles/guns/projectile.dm
+++ b/code/modules/projectiles/guns/projectile.dm
@@ -37,14 +37,19 @@
/obj/item/weapon/gun/projectile/proc/LoadMag(var/obj/item/ammo_storage/magazine/AM, var/mob/user)
if(istype(AM, text2path(mag_type)) && !stored_magazine)
if(user)
- user.drop_item(AM, src)
- to_chat(usr, "You load the magazine into \the [src].")
+ if(user.drop_item(AM, src))
+ to_chat(usr, "You load the magazine into \the [src].")
+ else
+ return
+
stored_magazine = AM
chamber_round()
AM.update_icon()
update_icon()
- user.update_inv_r_hand()
- user.update_inv_l_hand()
+
+ if(user)
+ user.update_inv_r_hand()
+ user.update_inv_l_hand()
return 1
return 0
@@ -117,12 +122,13 @@
if(user.l_hand != src && user.r_hand != src) //if we're not in his hands
to_chat(user, "You'll need [src] in your hands to do that.")
return
- user.drop_item(A, src) //put the silencer into the gun
- to_chat(user, "You screw [A] onto [src].")
- silenced = A //dodgy?
- w_class = 3
- update_icon()
- return 1
+
+ if(user.drop_item(A, src)) //put the silencer into the gun
+ to_chat(user, "You screw [A] onto [src].")
+ silenced = A //dodgy?
+ w_class = 3
+ update_icon()
+ return 1
var/num_loaded = 0
if(istype(A, /obj/item/ammo_storage/magazine))
@@ -144,15 +150,15 @@
//message_admins("Loading the [src], with [AC], [AC.caliber] and [caliber.len]") //Enable this for testing
if(AC.BB && caliber[AC.caliber]) // a used bullet can't be fired twice
if(load_method == MAGAZINE && !chambered)
- user.drop_item(AC, src)
- chambered = AC
- num_loaded++
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 25, 1)
+ if(user.drop_item(AC, src))
+ chambered = AC
+ num_loaded++
+ playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 25, 1)
else if(getAmmo() < max_shells)
- user.drop_item(AC, src)
- loaded += AC
- num_loaded++
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 25, 1)
+ if(user.drop_item(AC, src))
+ loaded += AC
+ num_loaded++
+ playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 25, 1)
if(num_loaded)
to_chat(user, "You load [num_loaded] shell\s into \the [src]!")
diff --git a/code/modules/projectiles/guns/projectile/bow.dm b/code/modules/projectiles/guns/projectile/bow.dm
index 3289bcb9de9..9a1b69b8ac2 100644
--- a/code/modules/projectiles/guns/projectile/bow.dm
+++ b/code/modules/projectiles/guns/projectile/bow.dm
@@ -59,7 +59,10 @@
/obj/item/weapon/crossbow/attackby(obj/item/W as obj, mob/user as mob)
if(!arrow)
if (istype(W,/obj/item/weapon/arrow))
- user.drop_item(W, src)
+ if(!user.drop_item(W, src))
+ user << "You can't let go of \the [W]!"
+ return
+
arrow = W
user.visible_message("[user] slides [arrow] into [src].","You slide [arrow] into [src].")
icon_state = "crossbow-nocked"
@@ -82,7 +85,10 @@
if(istype(W, /obj/item/weapon/cell))
if(!cell)
- user.drop_item(W, src)
+ if(!user.drop_item(W, src))
+ user << "You can't let go of \the [W]!"
+ return
+
cell = W
to_chat(user, "You jam [cell] into [src] and wire it to the firing coil.")
if(arrow)
diff --git a/code/modules/projectiles/guns/projectile/nagant.dm b/code/modules/projectiles/guns/projectile/nagant.dm
index b7da7283592..b2e312f1788 100644
--- a/code/modules/projectiles/guns/projectile/nagant.dm
+++ b/code/modules/projectiles/guns/projectile/nagant.dm
@@ -100,9 +100,12 @@
flame_turf(turflist)
if(prob(15))
- to_chat(user, "[src] flies out of your hands.")
- user.take_organ_damage(0,10)
- user.drop_item(src)
+ if(user.drop_item(src))
+ to_chat(user, "\The [src] flies out of your hands.")
+ user.take_organ_damage(0,10)
+ else
+ to_chat(user, "\The [src] almost flies out of your hands!")
+
Fire(A,user,params, "struggle" = struggle)
return 1
diff --git a/code/modules/projectiles/guns/projectile/pneumatic.dm b/code/modules/projectiles/guns/projectile/pneumatic.dm
index fb4d0cdbd35..e66f5eec408 100644
--- a/code/modules/projectiles/guns/projectile/pneumatic.dm
+++ b/code/modules/projectiles/guns/projectile/pneumatic.dm
@@ -53,7 +53,10 @@
/obj/item/weapon/storage/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
if(!tank && istype(W,/obj/item/weapon/tank))
- user.drop_item(W, src.tank_container)
+ if(!user.drop_item(W, src.tank_container))
+ user << "You can't let go of \the [W]!"
+ return
+
tank = W
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
icon_state = "pneumatic-tank"
diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm
index 92c420d0ed7..22dbf7284c1 100644
--- a/code/modules/projectiles/guns/projectile/revolver.dm
+++ b/code/modules/projectiles/guns/projectile/revolver.dm
@@ -16,7 +16,7 @@
if(istype(AC, /obj/item/ammo_casing/a357) && !perfect && prob(70 - (getAmmo() * 10))) //minimum probability of 10, maximum of 60
to_chat(M, "[src] blows up in your face.")
M.take_organ_damage(0,20)
- M.drop_item(src)
+ M.drop_item(src, force_drop = 1)
qdel(src)
return 0
return 1
diff --git a/code/modules/projectiles/guns/projectile/stickylauncher.dm b/code/modules/projectiles/guns/projectile/stickylauncher.dm
index 5175a44fb58..e409423171f 100644
--- a/code/modules/projectiles/guns/projectile/stickylauncher.dm
+++ b/code/modules/projectiles/guns/projectile/stickylauncher.dm
@@ -66,9 +66,15 @@
if(loaded.len >= 6)
to_chat(user, "You cannot fit any more stickybombs in there!")
else
+<<<<<<< 636687c2a83b23b7efc3a052c68c16a6ced66ca8
user.drop_item(A, src)
to_chat(user, "You load \the [A] into \the [src].")
loaded += A
+=======
+ if(user.drop_item(A, src))
+ user << "You load \the [A] into \the [src]."
+ loaded += A
+>>>>>>> adds clown glue
else
..()
diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index a728a3eccb5..af41b301600 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -266,12 +266,17 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
to_chat(user, "A beaker is already loaded into the machine.")
return
else if(!panel_open)
+ if(!user.drop_item(D, src))
+ to_chat(user, "You can't let go of \the [D]!")
+ return
+
src.beaker = D
if(user.type == /mob/living/silicon/robot)
var/mob/living/silicon/robot/R = user
R.uneq_active()
- user.drop_item(D, src)
+
to_chat(user, "You add the beaker to the machine!")
+
nanomanager.update_uis(src) // update all UIs attached to src
return 1
else
@@ -496,14 +501,18 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
if(src.beaker)
to_chat(user, "There already is a beaker loaded in the machine.")
return
+ if(!user.drop_item(B, src))
+ to_chat(user, "You can't let go of \the [B]!")
+ return
+
src.beaker = B
if(user.type == /mob/living/silicon/robot)
var/mob/living/silicon/robot/R = user
R.uneq_active()
targetMoveKey = R.on_moved.Add(src, "user_moved")
- user.drop_item(B, src)
to_chat(user, "You add the beaker into \the [src]!")
+
src.updateUsrDialog()
update_icon()
return 1
@@ -515,10 +524,14 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
if(src.loaded_pill_bottle)
to_chat(user, "There already is a pill bottle loaded in the machine.")
return
+ if(!user.drop_item(B, src))
+ to_chat(user, "You can't let go of \the [B]!")
+ return
src.loaded_pill_bottle = B
- user.drop_item(B, src)
+
to_chat(user, "You add the pill bottle into \the [src]'s dispenser slot!")
+
src.updateUsrDialog()
return 1
@@ -1185,6 +1198,9 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
if(src.beaker)
to_chat(user, "A beaker is already loaded into the machine.")
return
+ if(!user.drop_item(I, src))
+ to_chat(user, "You can't let go of \the [I]!")
+ return
src.beaker = I
if(user.type == /mob/living/silicon/robot)
@@ -1192,8 +1208,8 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
R.uneq_active()
targetMoveKey = R.on_moved.Add(src, "user_moved")
- user.drop_item(I, src)
to_chat(user, "You add the beaker to the machine!")
+
src.updateUsrDialog()
icon_state = "mixer1"
@@ -1349,13 +1365,16 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
to_chat(user, "You can't load a beaker while the maintenance panel is open.")
return 0
else
+ if(!user.drop_item(O, src))
+ to_chat(user, "You can't let go of \the [O]!")
+ return
+
src.beaker = O
if(user.type == /mob/living/silicon/robot)
var/mob/living/silicon/robot/R = user
R.uneq_active()
targetMoveKey = R.on_moved.Add(src, "user_moved")
- user.drop_item(O, src)
update_icon()
src.updateUsrDialog()
return 1
@@ -1785,9 +1804,12 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
..()
/obj/item/weapon/electrolyzer/proc/insert_beaker(obj/item/weapon/W as obj, mob/user as mob)
- W.loc = src
- beakers += W
- user.drop_item(W, src)
+ if(user.drop_item(W, src))
+ W.loc = src
+ beakers += W
+ else
+ to_chat(user, "You can't let go of \the [W]!")
+ return
/obj/structure/centrifuge
@@ -1818,10 +1840,9 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
qdel(src)
if(W.is_open_container())
if(!W.reagents.total_volume)
- W.loc = src
- cans += W
- user.drop_item(W, src)
- to_chat(user, "You add a passive container. It now contains [cans.len].")
+ if(user.drop_item(W, src))
+ cans += W
+ to_chat(user, "You add a passive container. It now contains [cans.len].")
else
if(!beaker)
to_chat(user, "You insert an active container.")
@@ -1830,8 +1851,6 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
var/mob/living/silicon/robot/R = user
R.uneq_active()
targetMoveKey = R.on_moved.Add(src, "user_moved")
-
- user.drop_item(W, src)
else
to_chat(user, "There is already an active container.")
return
@@ -1968,13 +1987,17 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY
if (!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items))
to_chat(user, "You can't grind that!")
return ..()
+
if(istype(O, /obj/item/stack/))
var/obj/item/stack/N = new O.type(src, amount=1)
var/obj/item/stack/S = O
S.use(1)
crushable = N
return 0
- user.drop_item(O, src)
+ else if(!user.drop_item(O, src))
+ to_chat(user, "You can't let go of \the [O]!")
+ return
+
crushable = O
return 0
diff --git a/code/modules/reagents/dartgun.dm b/code/modules/reagents/dartgun.dm
index 9bd6c3cc262..e102d88a4b0 100644
--- a/code/modules/reagents/dartgun.dm
+++ b/code/modules/reagents/dartgun.dm
@@ -84,11 +84,12 @@
to_chat(user, "There's already a cartridge in [src].")
return 0
- user.drop_item(D, src)
- cartridge = D
- to_chat(user, "You slot [D] into [src].")
- update_icon()
- return
+ if(user.drop_item(D, src))
+ cartridge = D
+ to_chat(user, "You slot [D] into [src].")
+ update_icon()
+ return
+
if(istype(I, /obj/item/weapon/reagent_containers/glass))
if(!istype(I, container_type))
to_chat(user, "[I] doesn't seem to fit into [src].")
@@ -97,10 +98,11 @@
to_chat(user, "[src] already has [max_beakers] beakers in it - another one isn't going to fit!")
return
var/obj/item/weapon/reagent_containers/glass/beaker/B = I
- user.drop_item(B, src)
- beakers += B
- to_chat(user, "You slot [B] into [src].")
- src.updateUsrDialog()
+
+ if(user.drop_item(B, src))
+ beakers += B
+ to_chat(user, "You slot [B] into [src].")
+ src.updateUsrDialog()
/obj/item/weapon/gun/dartgun/can_fire()
if(!cartridge)
diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm
index 9cb74ee0b59..83092fd51c0 100644
--- a/code/modules/reagents/grenade_launcher.dm
+++ b/code/modules/reagents/grenade_launcher.dm
@@ -17,22 +17,22 @@
/obj/item/weapon/gun/grenadelauncher/examine(mob/user)
..()
if(!(grenades.len))
- to_chat(user, "It is empty.")
+ to_chat(user, "It is empty.")
return
- to_chat(user, "It has [grenades.len] / [max_grenades] grenades loaded.")
+ to_chat(user, "It has [grenades.len] / [max_grenades] grenades loaded.")
for(var/obj/item/weapon/grenade/G in grenades)
- to_chat(user, "\icon [G] [G.name]")
+ to_chat(user, "\icon [G] [G.name]")
/obj/item/weapon/gun/grenadelauncher/attackby(obj/item/I as obj, mob/user as mob)
if((istype(I, /obj/item/weapon/grenade)))
if(grenades.len < max_grenades)
- user.drop_item(I, src)
- grenades += I
- to_chat(user, "You load the [I.name] into the [src.name].")
- to_chat(user, "[grenades.len] / [max_grenades] grenades loaded.")
+ if(user.drop_item(I, src))
+ grenades += I
+ to_chat(user, "You load the [I.name] into the [src.name].")
+ to_chat(user, "[grenades.len] / [max_grenades] grenades loaded.")
else
- to_chat(user, "The [src.name] cannot hold more grenades.")
+ to_chat(user, "The [src.name] cannot hold more grenades.")
/obj/item/weapon/gun/grenadelauncher/afterattack(obj/target, mob/user , flag)
@@ -48,12 +48,12 @@
if(grenades.len)
spawn(0) fire_grenade(target,user)
else
- to_chat(usr, "The [src.name] is empty.")
+ to_chat(usr, "The [src.name] is empty.")
/obj/item/weapon/gun/grenadelauncher/proc/fire_grenade(atom/target, mob/user)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("[] fired a grenade!", user), 1)
- to_chat(user, "You fire the grenade launcher!")
+ to_chat(user, "You fire the grenade launcher!")
var/obj/item/weapon/grenade/chem_grenade/F = grenades[1] //Now with less copypasta!
grenades -= F
F.loc = user.loc
diff --git a/code/modules/reagents/reagent_containers/chempack.dm b/code/modules/reagents/reagent_containers/chempack.dm
index dd68d3e0b84..e0c08753fd6 100644
--- a/code/modules/reagents/reagent_containers/chempack.dm
+++ b/code/modules/reagents/reagent_containers/chempack.dm
@@ -53,13 +53,13 @@
/obj/item/weapon/reagent_containers/chempack/proc/can_use_verbs(mob/user)
var/mob/living/carbon/human/M = user
if (M.stat == DEAD)
- to_chat(user, "You can't do that while you're dead!")
+ to_chat(user, "You can't do that while you're dead!")
return 0
else if (M.stat == UNCONSCIOUS)
- to_chat(user, "You must be conscious to do this!")
+ to_chat(user, "You must be conscious to do this!")
return 0
else if (M.handcuffed)
- to_chat(user, "You can't reach the controls while you're restrained!")
+ to_chat(user, "You can't reach the controls while you're restrained!")
return 0
else
return 1
@@ -67,14 +67,14 @@
/obj/item/weapon/reagent_containers/chempack/examine(mob/user)
..()
if(beaker)
- to_chat(user, "\icon[beaker] There is \a [beaker] in \the [src]'s auxiliary chamber.")
- to_chat(user, "It contains:")
+ to_chat(user, "\icon[beaker] There is \a [beaker] in \the [src]'s auxiliary chamber.")
+ to_chat(user, "It contains:")
var/obj/item/weapon/reagent_containers/glass/B = beaker
if(B.reagents.reagent_list.len)
for(var/datum/reagent/R in B.reagents.reagent_list)
- to_chat(user, "[R.volume] units of [R.name]")
+ to_chat(user, "[R.volume] units of [R.name]")
else
- to_chat(user, "Nothing.")
+ to_chat(user, "Nothing.")
/obj/item/weapon/reagent_containers/chempack/on_reagent_change()
update_icon()
@@ -139,7 +139,7 @@
return
src.reagents.clear_reagents()
- to_chat(usr, "You flush the contents of \the [src].")
+ to_chat(usr, "You flush the contents of \the [src].")
src.update_icon()
obj/item/weapon/reagent_containers/chempack/verb/set_fill()
@@ -158,56 +158,56 @@ obj/item/weapon/reagent_containers/chempack/verb/set_fill()
if (istype(A, /obj/structure/reagent_dispensers) && adjacency_flag)
var/tx_amount = transfer_sub(A, src, fill_amount, user)
if (tx_amount > 0)
- to_chat(user, "You fill \the [src][src.is_full() ? " to the brim" : ""] with [tx_amount] units of the contents of \the [A].")
+ to_chat(user, "You fill \the [src][src.is_full() ? " to the brim" : ""] with [tx_amount] units of the contents of \the [A].")
return
/obj/item/weapon/reagent_containers/chempack/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/reagent_containers/glass))
if(src.safety && auxiliary)
if (stage)
- to_chat(user, "You need to secure the maintenance panel before you can insert a beaker!")
+ to_chat(user, "You need to secure the maintenance panel before you can insert a beaker!")
return
if(user.type == /mob/living/silicon/robot) //Can't have silicons putting their beakers inside this.
return
if(src.beaker)
- to_chat(user, "There is already a beaker loaded into \the [src].")
+ to_chat(user, "There is already a beaker loaded into \the [src].")
return
else
- src.beaker = W
- user.drop_item(W, src)
- to_chat(user, "You add the beaker to \the [src]'s auxiliary chamber!")
- if(user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/chemmask))
- var/obj/item/clothing/mask/chemmask/C = user.wear_mask
- C.update_verbs()
- return 1
+ if(user.drop_item(W, src))
+ src.beaker = W
+ to_chat(user, "You add the beaker to \the [src]'s auxiliary chamber!")
+ if(user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/chemmask))
+ var/obj/item/clothing/mask/chemmask/C = user.wear_mask
+ C.update_verbs()
+ return 1
else
return
if(iswrench(W))
if (stage)
- to_chat(user, "You need to secure the maintenance panel before you can access the auxiliary chamber bolts!")
+ to_chat(user, "You need to secure the maintenance panel before you can access the auxiliary chamber bolts!")
return
if (!auxiliary && !src.beaker)
auxiliary = 1
- to_chat(user, "You loosen the bolts of \the [src]'s auxiliary chamber.")
+ to_chat(user, "You loosen the bolts of \the [src]'s auxiliary chamber.")
return
else if (!auxiliary)
auxiliary = 1
- to_chat(user, "You loosen the bolts of \the [src]'s auxiliary chamber. The beaker can now be removed.")
+ to_chat(user, "You loosen the bolts of \the [src]'s auxiliary chamber. The beaker can now be removed.")
return
else if (auxiliary && src.beaker)
auxiliary = 0
- to_chat(user, "You tighten the bolts of \the [src]'s auxiliary chamber, securing the beaker in place.")
+ to_chat(user, "You tighten the bolts of \the [src]'s auxiliary chamber, securing the beaker in place.")
return
else
auxiliary = 0
- to_chat(user, "You tighten the bolts of \the [src]'s auxiliary chamber.")
+ to_chat(user, "You tighten the bolts of \the [src]'s auxiliary chamber.")
return
switch(stage) //Handles the different stages of overriding the chemical pack's safeties. This can be done completely with a standard set of tools.
if(0)
if(isscrewdriver(W) && user.back == src)
- to_chat(user, "You can't perform maintenance on \the [src] while you're wearing it!")
+ to_chat(user, "You can't perform maintenance on \the [src] while you're wearing it!")
return
else
if (iscrowbar(W) && src.beaker && auxiliary)
@@ -217,21 +217,21 @@ obj/item/weapon/reagent_containers/chempack/verb/set_fill()
else
B.loc = loc
beaker = null
- to_chat(user, "You pry the beaker out of \the [src].")
+ to_chat(user, "You pry the beaker out of \the [src].")
if(user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/chemmask))
var/obj/item/clothing/mask/chemmask/C = user.wear_mask
C.update_verbs()
return
else if (iscrowbar(W) && src.beaker && !auxiliary)
- to_chat(user, "The beaker is held tight by the bolts of the auxiliary chamber!")
+ to_chat(user, "The beaker is held tight by the bolts of the auxiliary chamber!")
return
if (isscrewdriver(W) && src.beaker)
- to_chat(user, "You can't reach the maintenance panel with the beaker in the way!")
+ to_chat(user, "You can't reach the maintenance panel with the beaker in the way!")
return
else if (isscrewdriver(W))
stage = 1
slot_flags = null
- to_chat(user, "You unscrew the maintenance panel of \the [src].")
+ to_chat(user, "You unscrew the maintenance panel of \the [src].")
icon_state = "[initial(icon_state)]3"
user.update_inv_r_hand() //These procs are to force the item's in_hand mob overlay to update to reflect the different stages of building. It was the only way I could find to accomplish this.
user.update_inv_l_hand()
@@ -242,7 +242,7 @@ obj/item/weapon/reagent_containers/chempack/verb/set_fill()
stage = 2
else
stage = 3
- to_chat(user, "You pry open the maintenance panel of \the [src].")
+ to_chat(user, "You pry open the maintenance panel of \the [src].")
icon_state = "[initial(icon_state)]2"
user.update_inv_r_hand()
user.update_inv_l_hand()
@@ -250,7 +250,7 @@ obj/item/weapon/reagent_containers/chempack/verb/set_fill()
else if (isscrewdriver(W))
stage = 0
slot_flags = SLOT_BACK
- to_chat(user, "You secure the maintenance panel of \the [src].")
+ to_chat(user, "You secure the maintenance panel of \the [src].")
if (safety == 0)
icon_state = "[initial(icon_state)]"
user.update_inv_r_hand()
@@ -264,11 +264,11 @@ obj/item/weapon/reagent_containers/chempack/verb/set_fill()
if (iswirecutter(W))
stage = 3
primed = 1
- to_chat(user, "You reroute the connections within \the [src].")
+ to_chat(user, "You reroute the connections within \the [src].")
return
else if (iscrowbar(W))
stage = 1
- to_chat(user, "You close the maintenance panel of \the [src].")
+ to_chat(user, "You close the maintenance panel of \the [src].")
icon_state = "[initial(icon_state)]3"
user.update_inv_r_hand()
user.update_inv_l_hand()
@@ -276,17 +276,17 @@ obj/item/weapon/reagent_containers/chempack/verb/set_fill()
if(3)
if (ismultitool(W))
if (safety == 0)
- to_chat(user, "You activate the manual safety override of \the [src]!")
- to_chat(user, "The bolts for the auxiliary chamber of \the [src] have been exposed!")
+ to_chat(user, "You activate the manual safety override of \the [src]!")
+ to_chat(user, "The bolts for the auxiliary chamber of \the [src] have been exposed!")
safety = 1
else if (safety == 1)
- to_chat(user, "You reactivate the safety restrictions of \the [src].")
- to_chat(user, "The bolts for the auxiliary chamber of \the [src] are now hidden.")
+ to_chat(user, "You reactivate the safety restrictions of \the [src].")
+ to_chat(user, "The bolts for the auxiliary chamber of \the [src] are now hidden.")
safety = 0
return
else if (iscrowbar(W))
stage = 1
- to_chat(user, "You close the maintenance panel of \the [src].")
+ to_chat(user, "You close the maintenance panel of \the [src].")
icon_state = "[initial(icon_state)]3"
user.update_inv_r_hand()
user.update_inv_l_hand()
diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm
index 779b5ca2c0e..ff1c0b31394 100644
--- a/code/modules/reagents/reagent_containers/food/drinks.dm
+++ b/code/modules/reagents/reagent_containers/food/drinks.dm
@@ -1049,7 +1049,7 @@
new /obj/item/weapon/reagent_containers/glass/rag(get_turf(src))
//Creates a shattering noise and replaces the bottle with a broken_bottle
- user.drop_item()
+ user.drop_item(force_drop = 1)
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(user.loc)
B.icon_state = src.icon_state
B.force = src.force
diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm
index 34a910f05f7..8f9a3a50c1f 100644
--- a/code/modules/reagents/reagent_containers/food/snacks.dm
+++ b/code/modules/reagents/reagent_containers/food/snacks.dm
@@ -200,8 +200,10 @@
if(W.w_class <= 2 && W.is_sharp() < 0.8 && !istype(W,/obj/item/device/analyzer/plant_analyzer)) //Make sure the item is valid to attempt slipping shit into it
if(!iscarbon(user))
return 0
- to_chat(user, "You slip \the [W] inside [src].")
- user.drop_item(W, src)
+
+ if(user.drop_item(W, src))
+ to_chat(user, "You slip \the [W] inside [src].")
+
add_fingerprint(user)
contents += W
return 1 //No afterattack here
@@ -2815,15 +2817,16 @@
boxestoadd += i
if( (boxes.len+1) + boxestoadd.len <= 5 )
- user.drop_item(I, src)
+ if(user.drop_item(I, src))
- box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit
- src.boxes.Add( boxestoadd )
+ box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit
+ src.boxes.Add( boxestoadd )
- box.update_icon()
- update_icon()
+ box.update_icon()
+ update_icon()
+
+ to_chat(user, "You put the [box] ontop of the [src]!")
- to_chat(user, "You put the [box] ontop of the [src]!")
else
to_chat(user, "The stack is too high!")
else
@@ -2834,11 +2837,12 @@
if(istype(I,/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/)) // Long ass fucking object name
if(src.pizza) to_chat(user, "[src] already has a pizza in it.")
else if(src.open)
- user.drop_item(I, src)
- src.pizza = I
- src.update_icon()
- to_chat(user, "You put [I] in [src].")
+ if(user.drop_item(I, src))
+ src.pizza = I
+ src.update_icon()
+ to_chat(user, "You put [I] in [src].")
else to_chat(user, "Open [src] first.")
+
return
if( istype(I, /obj/item/weapon/pen/) )
@@ -3848,10 +3852,10 @@
spawn(0)
if(((M_CLUMSY in H.mutations)) || prob(25))
- user.visible_message("[src] escapes from [H]'s hands!","[src] escapes from your grasp!")
- H.drop_item()
+ if(H.drop_item())
+ user.visible_message("[src] escapes from [H]'s hands!","[src] escapes from your grasp!")
- jump()
+ jump()
return 1
/obj/item/weapon/reagent_containers/food/snacks/potentham
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index 3eb77178b51..c2be70130a9 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -127,6 +127,10 @@
return ..()
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
if(do_after(user, src, 20))
+ if(!user.drop_item(W, src))
+ user << "Oops! You can't let go of \the [W]!"
+ return
+
user.visible_message("[user] rigs [W] to \the [src].", " You rig [W] to \the [src]")
var/obj/item/device/assembly_holder/H = W
@@ -135,7 +139,6 @@
log_game("[key_name(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.")
rig = W
- user.drop_item(W, src)
var/icon/test = getFlatIcon(W)
test.Shift(NORTH,1)
diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm
index 0b541940901..22e74ae1024 100644
--- a/code/modules/reagents/syringe_gun.dm
+++ b/code/modules/reagents/syringe_gun.dm
@@ -19,21 +19,21 @@
/obj/item/weapon/gun/syringe/examine(mob/user)
..()
- to_chat(user, "[syringes.len] / [max_syringes] syringes.")
+ to_chat(user, "[syringes.len] / [max_syringes] syringes.")
/obj/item/weapon/gun/syringe/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = I
if(S.mode != 2)//SYRINGE_BROKEN in syringes.dm
if(syringes.len < max_syringes)
- user.drop_item(I, src)
- syringes += I
- to_chat(user, "You put the syringe in [src].")
- to_chat(user, "[syringes.len] / [max_syringes] syringes.")
+ if(user.drop_item(I, src))
+ syringes += I
+ to_chat(user, "You put the syringe in [src].")
+ to_chat(user, "[syringes.len] / [max_syringes] syringes.")
else
- to_chat(user, "[src] cannot hold more syringes.")
+ to_chat(user, "[src] cannot hold more syringes.")
else
- to_chat(user, "This syringe is broken!")
+ to_chat(user, "This syringe is broken!")
return 1 // Avoid calling the syringe's afterattack()
@@ -51,10 +51,10 @@
if(syringes.len)
if(M_CLUMSY in user.mutations)
if(prob(50))
- to_chat(user, "You accidentally shoot yourself!")
+ to_chat(user, "You accidentally shoot yourself!")
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
if((!S) || (!S.reagents))
- to_chat(user, "Thankfully, nothing happens.")
+ to_chat(user, "Thankfully, nothing happens.")
return
syringes -= S
S.reagents.trans_to(user, S.reagents.total_volume)
@@ -63,7 +63,7 @@
spawn(0) fire_syringe(target,user)
else
- to_chat(user, "[src] is empty.")
+ to_chat(user, "[src] is empty.")
/obj/item/weapon/gun/syringe/proc/fire_syringe(atom/target, mob/user)
if (locate (/obj/structure/table, src.loc))
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index bb52dabc107..e34621f8e00 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -85,30 +85,30 @@
if(mode<=0) // It's off
if(istype(I, /obj/item/weapon/screwdriver))
if(contents.len > 0)
- to_chat(user, "Eject the items first!")
+ to_chat(user, "Eject the items first!")
return
if(mode==0) // It's off but still not unscrewed
mode=-1 // Set it to doubleoff l0l
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- to_chat(user, "You remove the screws around the power connection.")
+ to_chat(user, "You remove the screws around the power connection.")
return
else if(mode==-1)
mode=0
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- to_chat(user, "You attach the screws around the power connection.")
+ to_chat(user, "You attach the screws around the power connection.")
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode==-1)
if(contents.len > 0)
- to_chat(user, "Eject the items first!")
+ to_chat(user, "Eject the items first!")
return
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(get_turf(src), 'sound/items/Welder2.ogg', 100, 1)
- to_chat(user, "You start slicing the floorweld off the disposal unit.")
+ to_chat(user, "You start slicing the floorweld off the disposal unit.")
if(do_after(user, src,20))
if(!src || !W.isOn()) return
- to_chat(user, "You sliced the floorweld off the disposal unit.")
+ to_chat(user, "You sliced the floorweld off the disposal unit.")
var/obj/structure/disposalconstruct/C = new (src.loc)
src.transfer_fingerprints_to(C)
C.ptype = 6 // 6 = disposal unit
@@ -118,16 +118,16 @@
qdel(src)
return
else
- to_chat(user, "You need more welding fuel to complete this task.")
+ to_chat(user, "You need more welding fuel to complete this task.")
return
if(istype(I, /obj/item/weapon/storage/bag/))
var/obj/item/weapon/storage/bag/B = I
if(B.contents.len == 0)
- to_chat(user, "You throw away the empty [B].")
- user.drop_item(I, src)
- return
- to_chat(user, "You empty the [B].")
+ if(user.drop_item(I, src))
+ to_chat(user, "You throw away the empty [B].")
+ return
+ to_chat(user, "You empty the [B].")
B.mass_remove(src)
B.update_icon()
update_icon()
@@ -153,7 +153,6 @@
if(!I) return
if(user.drop_item(I, src))
-
user.visible_message("[user.name] places \the [I] into the [src].", "You place \the [I] into the [src].")
update_icon()
@@ -198,11 +197,11 @@
// human interact with machine
/obj/machinery/disposal/attack_hand(mob/user as mob)
if(user && user.loc == src)
- to_chat(usr, "You cannot reach the controls from inside.")
+ to_chat(usr, "You cannot reach the controls from inside.")
return
/*
if(mode==-1)
- to_chat(usr, "The disposal units power is disabled.")
+ to_chat(usr, "The disposal units power is disabled.")
return
*/
src.add_fingerprint(user)
@@ -233,11 +232,11 @@
// handle machine interaction
/obj/machinery/disposal/Topic(href, href_list)
if(usr.loc == src)
- to_chat(usr, "You cannot reach the controls from inside.")
+ to_chat(usr, "You cannot reach the controls from inside.")
return
if(mode==-1 && !href_list["eject"]) // only allow ejecting if mode is -1
- to_chat(usr, "The disposal units power is disabled.")
+ to_chat(usr, "The disposal units power is disabled.")
return
if(..())
usr << browse(null, "window=disposal")
@@ -638,7 +637,7 @@
return
if (src.loc)
for (var/mob/M in hearers(src.loc.loc))
- to_chat(M, "CLONG, clong!")
+ to_chat(M, "CLONG, clong!")
playsound(get_turf(src), 'sound/effects/clang.ogg', 50, 0, 0)
@@ -876,15 +875,15 @@
// check if anything changed over 2 seconds
var/turf/uloc = user.loc
var/atom/wloc = W.loc
- to_chat(user, "Slicing the disposal pipe.")
+ to_chat(user, "Slicing the disposal pipe.")
sleep(30)
if(!W.isOn()) return
if(user.loc == uloc && wloc == W.loc)
welded()
else
- to_chat(user, "You must stay still while welding the pipe.")
+ to_chat(user, "You must stay still while welding the pipe.")
else
- to_chat(user, "You need more welding fuel to cut the pipe.")
+ to_chat(user, "You need more welding fuel to cut the pipe.")
return
// called when pipe is cut with welder
@@ -1021,7 +1020,7 @@
if(O.currTag)// Tag set
sort_tag = uppertext(O.destinations[O.currTag])
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 100, 1)
- to_chat(user, "Changed filter to [sort_tag]")
+ to_chat(user, "Changed filter to [sort_tag]")
updatedesc()
return 1
@@ -1291,15 +1290,15 @@
// check if anything changed over 2 seconds
var/turf/uloc = user.loc
var/atom/wloc = W.loc
- to_chat(user, "Slicing the disposal pipe.")
+ to_chat(user, "Slicing the disposal pipe.")
sleep(30)
if(!W.isOn()) return
if(user.loc == uloc && wloc == W.loc)
welded()
else
- to_chat(user, "You must stay still while welding the pipe.")
+ to_chat(user, "You must stay still while welding the pipe.")
else
- to_chat(user, "You need more welding fuel to cut the pipe.")
+ to_chat(user, "You need more welding fuel to cut the pipe.")
return
// would transfer to next pipe segment, but we are in a trunk
@@ -1423,21 +1422,21 @@
if(mode==0)
mode=1
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- to_chat(user, "You remove the screws around the power connection.")
+ to_chat(user, "You remove the screws around the power connection.")
return
else if(mode==1)
mode=0
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- to_chat(user, "You attach the screws around the power connection.")
+ to_chat(user, "You attach the screws around the power connection.")
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode==1)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(get_turf(src), 'sound/items/Welder2.ogg', 100, 1)
- to_chat(user, "You start slicing the floorweld off the disposal outlet.")
+ to_chat(user, "You start slicing the floorweld off the disposal outlet.")
if(do_after(user, src,20))
if(!src || !W.isOn()) return
- to_chat(user, "You sliced the floorweld off the disposal outlet.")
+ to_chat(user, "You sliced the floorweld off the disposal outlet.")
var/obj/structure/disposalconstruct/C = new (src.loc)
src.transfer_fingerprints_to(C)
C.ptype = 7 // 7 = outlet
@@ -1447,7 +1446,7 @@
qdel(src)
return
else
- to_chat(user, "You need more welding fuel to complete this task.")
+ to_chat(user, "You need more welding fuel to complete this task.")
return
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index 55ad7f84b56..47f23af30b6 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -48,7 +48,7 @@ Note: Must be placed within 3 tiles of the R&D Console
/obj/machinery/r_n_d/destructive_analyzer/togglePanelOpen(var/obj/toggleitem, mob/user)
if(loaded_item)
- to_chat(user, "You can't open the maintenance panel while an item is loaded!")
+ to_chat(user, "You can't open the maintenance panel while an item is loaded!")
return -1
return ..()
@@ -67,35 +67,35 @@ Note: Must be placed within 3 tiles of the R&D Console
if(isMoMMI(user))
var/mob/living/silicon/robot/mommi/mommi = user
if(mommi.is_in_modules(O,permit_sheets=1))
- to_chat(user, "You cannot insert something that is part of you.")
+ to_chat(user, "You cannot insert something that is part of you.")
return
else
return
if(!O.origin_tech)
- to_chat(user, "This doesn't seem to have a tech origin!")
+ to_chat(user, "This doesn't seem to have a tech origin!")
return
var/list/temp_tech = ConvertReqString2List(O.origin_tech)
if (temp_tech.len == 0)
- to_chat(user, "You cannot deconstruct this item!")
+ to_chat(user, "You cannot deconstruct this item!")
return
/*if(O.reliability < 90 && O.crit_fail == 0)
- to_chat(usr, "Item is neither reliable enough or broken enough to learn from.")
+ to_chat(usr, "Item is neither reliable enough or broken enough to learn from.")
return*/
- busy = 1
- loaded_item = O
- user.drop_item(O, src)
- to_chat(user, "You add the [O.name] to the machine!")
- flick("d_analyzer_la", src)
- spawn(10)
- icon_state = "d_analyzer_l"
- busy = 0
+ if(user.drop_item(O, src))
+ busy = 1
+ loaded_item = O
+ to_chat(user, "You add the [O.name] to the machine!")
+ flick("d_analyzer_la", src)
+ spawn(10)
+ icon_state = "d_analyzer_l"
+ busy = 0
return
/obj/machinery/r_n_d/destructive_analyzer/attack_hand(mob/user as mob)
if (..(user))
return
if (loaded_item && !panel_open && !busy)
- to_chat(user, "You remove the [loaded_item.name] from the [src].")
+ to_chat(user, "You remove the [loaded_item.name] from the [src].")
loaded_item.loc = src.loc
loaded_item = null
icon_state = "d_analyzer"
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 19e54465d58..c260bc1a526 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -201,13 +201,18 @@ won't update every console in existence) but it's more of a hassle to do. Also,
to_chat(user, "A disk is already loaded into the machine.")
return
- if(istype(D, /obj/item/weapon/disk/tech_disk)) t_disk = D
- else if (istype(D, /obj/item/weapon/disk/design_disk)) d_disk = D
+ if(istype(D, /obj/item/weapon/disk/tech_disk))
+ if(user.drop_item(D,src))
+ t_disk = D
+ else if (istype(D, /obj/item/weapon/disk/design_disk))
+ if(user.drop_item(D,src))
+ d_disk = D
else
to_chat(user, "Machine cannot accept disks in that format.")
return
- user.drop_item(D, src)
+
to_chat(user, "You add the disk to the machine!")
+
src.updateUsrDialog()
return
diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_communication.dm b/code/modules/research/xenoarchaeology/artifact/artifact_communication.dm
index b1cbb04660f..b3f0514bacb 100644
--- a/code/modules/research/xenoarchaeology/artifact/artifact_communication.dm
+++ b/code/modules/research/xenoarchaeology/artifact/artifact_communication.dm
@@ -15,8 +15,8 @@
/obj/machinery/communication/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/commstone))
if((W in allstones) && remaining < 6)
- user.drop_item(W, src)
- to_chat(user, "You place one of the strange stones back onto the ancient device, it snaps into place.")
+ if(user.drop_item(W, src))
+ to_chat(user, "You place one of the strange stones back onto the ancient device, it snaps into place.")
..()
/obj/machinery/communication/attack_ghost(mob/user as mob)
diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_base.dm b/code/modules/research/xenoarchaeology/machinery/analysis_base.dm
index f843a386d32..b7e02d4f517 100644
--- a/code/modules/research/xenoarchaeology/machinery/analysis_base.dm
+++ b/code/modules/research/xenoarchaeology/machinery/analysis_base.dm
@@ -148,11 +148,11 @@ obj/machinery/anomaly/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if(held_container)
to_chat(user, "You must remove the [held_container] first.")
else
- to_chat(user, "You put the [W] into the [src].")
- user.drop_item(W, src)
+ if(user.drop_item(W, src))
+ to_chat(user, "You put the [W] into the [src].")
- held_container = W
- updateDialog()
+ held_container = W
+ updateDialog()
return 1 // avoid afterattack() being called
/*else if(istype(W, /obj/item/weapon/tank))
diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm b/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm
index cf9a668fb80..f02958a3086 100644
--- a/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm
+++ b/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm
@@ -24,10 +24,10 @@
/obj/machinery/artifact_harvester/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/anobattery))
if(!inserted_battery)
- to_chat(user, "You insert [I] into [src].")
- user.drop_item(I, src)
- src.inserted_battery = I
- updateDialog()
+ if(user.drop_item(I, src))
+ to_chat(user, "You insert [I] into [src].")
+ src.inserted_battery = I
+ updateDialog()
else
to_chat(user, "There is already a battery in [src].")
else
diff --git a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm
index 6a59e7a2ab6..cd2cffad387 100644
--- a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm
+++ b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm
@@ -39,10 +39,10 @@
/obj/item/weapon/anodevice/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I, /obj/item/weapon/anobattery))
if(!inserted_battery)
- to_chat(user, "You insert the battery.")
- user.drop_item(I, src)
- inserted_battery = I
- UpdateSprite()
+ if(user.drop_item(I, src))
+ to_chat(user, "You insert the battery.")
+ inserted_battery = I
+ UpdateSprite()
else
return ..()
diff --git a/code/modules/research/xenoarchaeology/tools/bunsen_burner.dm b/code/modules/research/xenoarchaeology/tools/bunsen_burner.dm
index 2f09c9bc5d7..ba7027eba47 100644
--- a/code/modules/research/xenoarchaeology/tools/bunsen_burner.dm
+++ b/code/modules/research/xenoarchaeology/tools/bunsen_burner.dm
@@ -15,16 +15,16 @@
if(held_container)
to_chat(user, "You must remove the [held_container] first.")
else
- user.drop_item(W, src)
- held_container = W
- to_chat(user, "You put the [held_container] onto the [src].")
- var/image/I = image("icon"=W, "layer"=FLOAT_LAYER)
- underlays += I
- if(heating)
- spawn(heat_time)
- try_heating()
+ if(user.drop_item(W, src))
+ held_container = W
+ to_chat(user, "You put the [held_container] onto the [src].")
+ var/image/I = image("icon"=W, "layer"=FLOAT_LAYER)
+ underlays += I
+ if(heating)
+ spawn(heat_time)
+ try_heating()
- return 1 // avoid afterattack() being called
+ return 1 // avoid afterattack() being called
else
to_chat(user, "You can't put the [W] onto the [src].")
diff --git a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm
index f0c30c1116e..0d4ff660e57 100644
--- a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm
+++ b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm
@@ -131,12 +131,12 @@
else if(href_list["insertcard"])
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card))
- usr.drop_item(I, src)
- auth_card = I
- if(attempt_unlock(I))
- to_chat(usr, "You insert [I], the console flashes \'Access granted.\'")
- else
- to_chat(usr, "You insert [I], the console flashes \'Access denied.\'")
+ if(usr.drop_item(I, src))
+ auth_card = I
+ if(attempt_unlock(I))
+ to_chat(usr, "You insert [I], the console flashes \'Access granted.\'")
+ else
+ to_chat(usr, "You insert [I], the console flashes \'Access denied.\'")
else if(href_list["ejectcard"])
if(auth_card)
if(ishuman(usr))
@@ -215,13 +215,13 @@
if(cell)
to_chat(user, "There is a power cell already installed.")
else
- user.drop_item(W, src)
- cell = W
- to_chat(user, "You insert the power cell.")
- if(anchored)
- icon_state = "suspension1"
- else
- icon_state = "suspension1-b"
+ if(user.drop_item(W, src))
+ cell = W
+ to_chat(user, "You insert the power cell.")
+ if(anchored)
+ icon_state = "suspension1"
+ else
+ icon_state = "suspension1-b"
else if(istype(W, /obj/item/weapon/card))
var/obj/item/weapon/card/I = W
if(!auth_card)
diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm
index 3531d544bd6..1f604682596 100644
--- a/code/modules/telesci/bscrystal.dm
+++ b/code/modules/telesci/bscrystal.dm
@@ -22,7 +22,7 @@
else
user.visible_message("[user] crushes the [src], but nothing happens!")
- user.drop_item(src)
+ user.drop_item(src, force_drop = 1)
qdel(src)
/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L)
diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm
index 0a818598059..9b7f5f5f6fb 100644
--- a/code/modules/telesci/telesci_computer.dm
+++ b/code/modules/telesci/telesci_computer.dm
@@ -66,9 +66,11 @@
to_chat(user, "\The [name] blinks red as you try to insert the cell!")
return
- user.drop_item(W, src)
- cell = W
- user.visible_message("[user] inserts a cell into the [src].", "You insert a cell into the [src].")
+ if(user.drop_item(W, src))
+ cell = W
+ user.visible_message("[user] inserts a cell into the [src].", "You insert a cell into the [src].")
+ else
+ user << "You can't let go of \the [W]!"
update_icon()
/obj/machinery/computer/telescience/update_icon()
diff --git a/code/modules/virus2/analyser.dm b/code/modules/virus2/analyser.dm
index 5b50a27f592..849f550b4fb 100644
--- a/code/modules/virus2/analyser.dm
+++ b/code/modules/virus2/analyser.dm
@@ -40,13 +40,16 @@
..()
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
+
+ if(!c.drop_item(D, src)) return 1
+
var/obj/item/weapon/virusdish/D = I
if(!D.analysed)
if(!dish)
dish = D
else
toscan += D
- if(!c.drop_item(D, src)) return 1
+
visible_message("[user.name] inserts the [D.name] in the [src.name].", 3)
src.updateUsrDialog()
@@ -141,4 +144,4 @@
var/datum/browser/popup = new(user, "disease_analyzer", "Viral Storage & Analysis Unit", 600, 350, src)
popup.set_content(dat)
popup.open()
- onclose(user, "disease_analyzer")
\ No newline at end of file
+ onclose(user, "disease_analyzer")
diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm
index f6068a529a0..62654fdbd1f 100644
--- a/code/modules/virus2/centrifuge.dm
+++ b/code/modules/virus2/centrifuge.dm
@@ -42,9 +42,10 @@
var/mob/living/carbon/C = user
if(!sample)
- sample = I
if(!C.drop_item(I, src)) return 1
+ sample = I
+
attack_hand(user)
//Also handles luminosity
diff --git a/code/modules/virus2/curer.dm b/code/modules/virus2/curer.dm
index eeaba6ebede..d3a36b512ef 100644
--- a/code/modules/virus2/curer.dm
+++ b/code/modules/virus2/curer.dm
@@ -13,8 +13,8 @@
if(istype(I,/obj/item/weapon/reagent_containers))
var/mob/living/carbon/C = user
if(!container)
- container = I
- C.drop_item(I, src)
+ if(C.drop_item(I, src))
+ container = I
if(istype(I,/obj/item/weapon/virusdish))
if(virusing)
to_chat(user, "The pathogen materializer is still recharging..")
diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm
index 3ae072afa76..5216a26ad6a 100644
--- a/code/modules/virus2/diseasesplicer.dm
+++ b/code/modules/virus2/diseasesplicer.dm
@@ -22,9 +22,9 @@
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
if(!dish)
-
- dish = I
if(!c.drop_item(I, src)) return 1
+ dish = I
+
if(istype(I,/obj/item/weapon/diseasedisk))
to_chat(user, "You upload the contents of the disk into the buffer")
memorybank = I:effect
diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm
index 4aefc724afa..0fbb879df9b 100644
--- a/code/modules/virus2/dishincubator.dm
+++ b/code/modules/virus2/dishincubator.dm
@@ -59,25 +59,27 @@
to_chat(user, "A beaker is already loaded into the machine.")
return
- src.beaker = B
- user.drop_item(B, src)
- if(istype(B,/obj/item/weapon/reagent_containers/syringe))
- to_chat(user, "You add the syringe to the machine!")
- src.updateUsrDialog()
- else
- to_chat(user, "You add the beaker to the machine!")
- src.updateUsrDialog()
+ if(user.drop_item(B, src))
+ src.beaker = B
+
+ if(istype(B,/obj/item/weapon/reagent_containers/syringe))
+ to_chat(user, "You add the syringe to the machine!")
+ src.updateUsrDialog()
+ else
+ to_chat(user, "You add the beaker to the machine!")
+ src.updateUsrDialog()
else
if(istype(B,/obj/item/weapon/virusdish))
if(src.dish)
to_chat(user, "A dish is already loaded into the machine.")
return
- src.dish = B
- user.drop_item(B, src)
- if(istype(B,/obj/item/weapon/virusdish))
- to_chat(user, "You add the dish to the machine!")
- src.updateUsrDialog()
+ if(user.drop_item(B, src))
+ src.dish = B
+
+ if(istype(B,/obj/item/weapon/virusdish))
+ to_chat(user, "You add the dish to the machine!")
+ src.updateUsrDialog()
/obj/machinery/disease2/incubator/Topic(href, href_list)
if(..()) return 1
diff --git a/code/modules/virus2/isolator.dm b/code/modules/virus2/isolator.dm
index 6f9c2657c43..14e6d0ee891 100644
--- a/code/modules/virus2/isolator.dm
+++ b/code/modules/virus2/isolator.dm
@@ -18,12 +18,12 @@
to_chat(user, "A syringe is already loaded into the machine.")
return
- src.beaker = B
- user.drop_item(B, src)
- if(istype(B,/obj/item/weapon/reagent_containers/syringe))
- to_chat(user, "You add the syringe to the machine!")
- src.updateUsrDialog()
- icon_state = "isolator_in"
+ if(user.drop_item(B, src))
+ src.beaker = B
+ if(istype(B,/obj/item/weapon/reagent_containers/syringe))
+ to_chat(user, "You add the syringe to the machine!")
+ src.updateUsrDialog()
+ icon_state = "isolator_in"
/obj/machinery/disease2/isolator/Topic(href, href_list)
if(..()) return
diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi
index 40b753a2b48..4054ca20f40 100644
Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ