diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index d74b2672360..cbd7772f535 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -217,10 +217,13 @@ return beaker = item - user.drop_item() - item.loc = src - user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!") - return + if(user.drop_item()) + item.forceMove(src) + user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!") + return + else + user << "\The [item] is stuck to you!" + return else if (!istype(item, /obj/item/weapon/grab)) return var/obj/item/weapon/grab/G = item diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index eafbb40fa19..582a8466e22 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -299,12 +299,14 @@ /obj/machinery/sleeper/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params) if(istype(G, /obj/item/weapon/reagent_containers/glass)) if(!beaker) - beaker = G - user.drop_item() - G.loc = src - user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") - src.updateUsrDialog() - return + if (user.drop_item()) + beaker = G + G.forceMove(src) + user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") + src.updateUsrDialog() + return + else + user << "\The [G] is stuck to you!" else user << "\red The sleeper has a beaker already." return @@ -611,4 +613,4 @@ qdel(O) src.add_fingerprint(usr) return - return \ No newline at end of file + return diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index bb7a54daf4b..38cbb0fb4c6 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -153,7 +153,7 @@ if(istype(P, /obj/item)) var/success for(var/I in req_components) - if(istype(P, I) && (req_components[I] > 0)) + if(istype(P, I) && (req_components[I] > 0) && !(P.flags & NODROP)) success=1 playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(istype(P, /obj/item/stack/cable_coil)) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index c35eaacf9f8..53f903121ad 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -279,9 +279,11 @@ return beaker = G - user.drop_item() - G.loc = src - user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") + if(user.drop_item()) + G.forceMove(src) + user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") + else + user << "The [G] is stuck to you!" if (istype(G, /obj/item/weapon/screwdriver)) if(occupant || on) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 870018c54b3..e3bb3d32eaa 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -63,12 +63,14 @@ user << "There is already a reagent container loaded!" return - user.drop_item() - W.loc = src - src.beaker = W - user << "You attach \the [W] to \the [src]." - src.update_icon() - return + if(user.drop_item()) + W.forceMove(src) + src.beaker = W + user << "You attach \the [W] to \the [src]." + src.update_icon() + return + else + user << "\The [W] is stuck to you!" else return ..() @@ -167,4 +169,4 @@ else user << "\blue No chemicals are attached." - user << "\blue [attached ? attached : "No one"] is attached." \ No newline at end of file + user << "\blue [attached ? attached : "No one"] is attached." diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 78e5ee25fe3..e0127fe9862 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -218,15 +218,17 @@ if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks)) src.beaker = B - user.drop_item() - B.loc = src - user << "You set [B] on the machine." - nanomanager.update_uis(src) // update all UIs attached to src - if(!icon_beaker) - icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. - icon_beaker.pixel_x = rand(-10,5) - overlays += icon_beaker - return + if(user.drop_item()) + B.forceMove(src) + user << "You set [B] on the machine." + nanomanager.update_uis(src) // update all UIs attached to src + if(!icon_beaker) + icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. + icon_beaker.pixel_x = rand(-10,5) + overlays += icon_beaker + return + else + user << "\The [B] is stuck to you!" /obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob, params) ..()