diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index cbd7772f535..33a952ace87 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -120,10 +120,10 @@ !istype(O,/obj/item/weapon/stock_parts) && \ !istype(O,/obj/item/stack/cable_coil) && \ O != beaker) - O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components and beaker) + O.forceMove(get_turf(src))//Ejects items that manage to get in there (exluding the components and beaker) if(!occupant) for(var/mob/M in src)//Failsafe so you can get mobs out - M.loc = get_turf(src) + M.forceMove(get_turf(src)) /obj/machinery/dna_scannernew/verb/move_inside() set src in oview(1) @@ -146,7 +146,7 @@ usr.stop_pulling() usr.client.perspective = EYE_PERSPECTIVE usr.client.eye = src - usr.loc = src + usr.forceMove(src) src.occupant = usr src.icon_state = "scanner_occupied" src.add_fingerprint(usr) @@ -208,7 +208,7 @@ if(istype(item, /obj/item/weapon/crowbar)) if(panel_open) for(var/obj/I in contents) // in case there is something in the scanner - I.loc = src.loc + I.forceMove(src.loc) default_deconstruction_crowbar(item) return else if(istype(item, /obj/item/weapon/reagent_containers/glass)) @@ -216,14 +216,14 @@ user << "\red A beaker is already loaded into the machine." return + if(!user.drop_item()) + user << "\The [item] is stuck to you!" + return + beaker = item - 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 + item.forceMove(src) + 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)) return var/obj/item/weapon/grab/G = item @@ -247,7 +247,7 @@ if(M.client) M.client.perspective = EYE_PERSPECTIVE M.client.eye = src - M.loc = src + M.forceMove(src) src.occupant = M src.icon_state = "scanner_occupied" @@ -275,7 +275,7 @@ if (src.occupant.client) src.occupant.client.eye = src.occupant.client.mob src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc + src.occupant.forceMove(src.loc) src.occupant = null src.icon_state = "scanner_open" return @@ -284,7 +284,7 @@ switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) ex_act(severity) //Foreach goto(35) //SN src = null @@ -293,7 +293,7 @@ if(2.0) if (prob(50)) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) ex_act(severity) //Foreach goto(108) //SN src = null @@ -302,7 +302,7 @@ if(3.0) if (prob(25)) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) ex_act(severity) //Foreach goto(181) //SN src = null @@ -314,7 +314,7 @@ /obj/machinery/dna_scannernew/blob_act() if(prob(75)) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) qdel(src) // Checks if occupants can be irradiated/mutated - prevents exploits where wearing full rad protection would still let you gain mutations @@ -365,7 +365,7 @@ if (istype(I, /obj/item/weapon/disk/data)) //INSERT SOME diskS if (!src.disk) user.drop_item() - I.loc = src + I.forceMove(src) src.disk = I user << "You insert [I]." nanomanager.update_uis(src) // update all UIs attached to src() @@ -796,7 +796,7 @@ if(href_list["ejectBeaker"]) if(connected.beaker) var/obj/item/weapon/reagent_containers/glass/B = connected.beaker - B.loc = connected.loc + B.forceMove(connected.loc) connected.beaker = null return 1 @@ -821,7 +821,7 @@ if (bufferOption == "ejectDisk") if (!src.disk) return - src.disk.loc = get_turf(src) + src.disk.forceMove(get_turf(src)) src.disk = null return 1 @@ -930,7 +930,7 @@ I.buf = buf waiting_for_user_input=0 if(success) - I.loc = src.loc + I.forceMove(src.loc) I.name += " ([buf.name])" src.injector_ready = 0 spawn(300) @@ -959,4 +959,4 @@ return 1 -/////////////////////////// DNA MACHINES +/////////////////////////// DNA MACHINES \ No newline at end of file diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 582a8466e22..6cb48aef355 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -290,7 +290,7 @@ /obj/machinery/sleeper/blob_act() if(prob(75)) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) A.blob_act() qdel(src) return @@ -299,14 +299,16 @@ /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) - 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() + if (!user.drop_item()) + user << "\The [G] is stuck to you!" return - else - user << "\The [G] is stuck to you!" + + 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 << "\red The sleeper has a beaker already." return @@ -363,7 +365,7 @@ if(M.client) M.client.perspective = EYE_PERSPECTIVE M.client.eye = src - M.loc = src + M.forceMove(src) src.occupant = M src.icon_state = "sleeper" M << "\blue You feel cool air surround you. You go numb as your senses turn inward." @@ -380,21 +382,21 @@ switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) ex_act(severity) qdel(src) return if(2.0) if(prob(50)) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) ex_act(severity) qdel(src) return if(3.0) if(prob(25)) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc + A.forceMove(src.loc) ex_act(severity) qdel(src) return @@ -439,7 +441,7 @@ if(src.occupant.client) src.occupant.client.eye = src.occupant.client.mob src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc + src.occupant.forceMove(src.loc) src.occupant = null icon_state = "sleeper-open" return @@ -510,7 +512,7 @@ return if(beaker) filtering = 0 - beaker.loc = usr.loc + beaker.forceMove(usr.loc) beaker = null add_fingerprint(usr) return @@ -566,7 +568,7 @@ if(L.client) L.client.perspective = EYE_PERSPECTIVE L.client.eye = src - L.loc = src + L.forceMove(src) src.occupant = L src.icon_state = "sleeper" L << "\blue You feel cool air surround you. You go numb as your senses turn inward." @@ -605,7 +607,7 @@ usr.stop_pulling() usr.client.perspective = EYE_PERSPECTIVE usr.client.eye = src - usr.loc = src + usr.forceMove(src) src.occupant = usr src.icon_state = "sleeper" @@ -613,4 +615,4 @@ qdel(O) src.add_fingerprint(usr) return - return + return \ No newline at end of file diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index 40859fed3b6..34fa34e1188 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -70,8 +70,10 @@ user << "A container is already loaded into the machine." return else - user.unEquip(O) - O.loc = src + if(!user.drop_item()) + user << "\The [O] is stuck to you!" + return + O.forceMove(src) beaker = O user << "You add the container to the machine." updateUsrDialog() @@ -82,7 +84,7 @@ if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O)) if(beaker) var/obj/item/weapon/reagent_containers/glass/B = beaker - B.loc = loc + B.forceMove(loc) beaker = null return @@ -104,7 +106,7 @@ for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) if(i >= max_items) break - G.loc = src + G.forceMove(src) i++ if(i < max_items) user << "You empty the plant bag into the biogenerator." @@ -123,7 +125,7 @@ user << "The biogenerator is full! Activate it." else user.unEquip(O) - O.loc = src + O.forceMove(src) user << "You put [O.name] in [src.name]" @@ -339,7 +341,7 @@ /obj/machinery/biogenerator/proc/detach() if(beaker) - beaker.loc = src.loc + beaker.forceMove(src.loc) beaker = null update_icon() diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index b6a45149fab..fa15de1bf75 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -198,7 +198,7 @@ use_beaker = !use_beaker else if (href_list["eject"] && (!isnull(reagent_glass))) - reagent_glass.loc = get_turf(src) + reagent_glass.forceMove(get_turf(src)) reagent_glass = null else if (href_list["togglevoice"]) @@ -240,8 +240,10 @@ user << "There is already a beaker loaded." return - user.drop_item() - W.loc = src + if(!user.drop_item()) + user << "\The [W] is stuck to your hand!" + return + W.forceMove(src) reagent_glass = W user << "You insert [W]." updateUsrDialog() @@ -512,7 +514,7 @@ new /obj/item/device/healthanalyzer(Tsec) if(reagent_glass) - reagent_glass.loc = Tsec + reagent_glass.forceMove(Tsec) reagent_glass = null if (prob(50)) @@ -577,8 +579,7 @@ else switch(build_step) if(0) - if(istype(W, /obj/item/device/healthanalyzer)) - user.drop_item() + if(istype(W, /obj/item/device/healthanalyzer) && user.drop_item()) qdel(W) build_step++ user << "You add the health sensor to [src]." diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 53f903121ad..1a3361425d9 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -73,7 +73,7 @@ T.contents += contents var/obj/item/weapon/reagent_containers/glass/B = beaker if(beaker) - B.loc = get_step(T, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube + B.forceMove(get_step(T, SOUTH)) //Beaker is carefully ejected from the wreckage of the cryotube beaker = null return ..() @@ -261,7 +261,7 @@ if(href_list["ejectBeaker"]) if(beaker) - beaker.loc = get_step(loc, SOUTH) + beaker.forceMove(get_step(loc, SOUTH)) beaker = null if(href_list["ejectOccupant"]) @@ -279,11 +279,11 @@ return beaker = G - 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 + if(!user.drop_item()) user << "The [G] is stuck to you!" + return + G.forceMove(src) + user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") if (istype(G, /obj/item/weapon/screwdriver)) if(occupant || on) @@ -412,15 +412,12 @@ /obj/machinery/atmospherics/unary/cryo_cell/proc/go_out() if(!( occupant )) return - //for(var/obj/O in src) - // O.loc = loc if (occupant.client) occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE - occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem. + occupant.forceMove(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem. if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected occupant.bodytemperature = 261 -// occupant.metabslow = 0 occupant = null update_icon() return @@ -441,7 +438,7 @@ M.client.perspective = EYE_PERSPECTIVE M.client.eye = src M.stop_pulling() - M.loc = src + M.forceMove(src) if(M.health > -100 && (M.health < 0 || M.sleeping)) M << "\blue You feel a cold liquid surround you. Your skin starts to freeze up." occupant = M @@ -494,4 +491,4 @@ return /datum/data/function/proc/display() - return + return \ No newline at end of file diff --git a/code/game/machinery/kitchen/icecream_vat.dm b/code/game/machinery/kitchen/icecream_vat.dm index 711e2020361..76cbac6f581 100644 --- a/code/game/machinery/kitchen/icecream_vat.dm +++ b/code/game/machinery/kitchen/icecream_vat.dm @@ -116,9 +116,11 @@ var/list/ingredients_source = list( if(held_container) user << "You must remove [held_container] from [src] first." else + if(!user.drop_item()) + user << "\The [O] is stuck to your hand!" + return + O.forceMove(src) user << "You insert [O] into [src]." - user.drop_item() - O.loc = src held_container = O else var/obj/item/weapon/reagent_containers/R = O @@ -198,7 +200,7 @@ var/list/ingredients_source = list( if(href_list["eject"]) if(held_container) - held_container.loc = src.loc + held_container.forceMove(src.loc) held_container = null updateDialog() @@ -241,4 +243,4 @@ var/list/ingredients_source = list( #undef INGR_FLOUR #undef INGR_SUGAR #undef INGR_ICE -#undef MUCK +#undef MUCK \ No newline at end of file diff --git a/code/game/machinery/kitchen/juicer.dm b/code/game/machinery/kitchen/juicer.dm index 14fb3b12f62..e1f7bd7c091 100644 --- a/code/game/machinery/kitchen/juicer.dm +++ b/code/game/machinery/kitchen/juicer.dm @@ -44,7 +44,7 @@ if(!user.unEquip(O)) user << "\the [O] is stuck to your hand, you cannot put it in \the [src]" return 0 - O.loc = src + O.forceMove(src) beaker = O src.verbs += /obj/machinery/juicer/verb/detach update_icon() @@ -56,7 +56,7 @@ if(!user.unEquip(O)) user << "\the [O] is stuck to your hand, you cannot put it in \the [src]" return 0 - O.loc = src + O.forceMove(src) src.updateUsrDialog() return 0 @@ -129,7 +129,7 @@ if (!beaker) return src.verbs -= /obj/machinery/juicer/verb/detach - beaker.loc = src.loc + beaker.forceMove(src.loc) beaker = null update_icon() @@ -180,5 +180,4 @@ new/obj/item/weapon/reagent_containers/food/snacks/grown/tomato(src) new/obj/item/weapon/reagent_containers/food/snacks/grown/carrot(src) new/obj/item/weapon/reagent_containers/food/snacks/grown/berries(src) - new/obj/item/weapon/reagent_containers/food/snacks/grown/banana(src) - + new/obj/item/weapon/reagent_containers/food/snacks/grown/banana(src) \ No newline at end of file diff --git a/code/game/machinery/kitchen/kitchen_machine.dm b/code/game/machinery/kitchen/kitchen_machine.dm index 2bef05d57a9..6c0338c5569 100644 --- a/code/game/machinery/kitchen/kitchen_machine.dm +++ b/code/game/machinery/kitchen/kitchen_machine.dm @@ -135,11 +135,11 @@ "[user] has added one of [O] to \the [src].", \ "You add one of [O] to \the [src].") else - // user.unEquip(O) //This just causes problems so far as I can tell. -Pete if(!user.drop_item()) user << "\The [O] is stuck to your hand, you cannot put it in \the [src]" return 0 - O.loc = src + + O.forceMove(src) user.visible_message( \ "[user] has added \the [O] to \the [src].", \ "You add \the [O] to \the [src].") @@ -296,7 +296,7 @@ byproduct = recipe.get_byproduct() stop() if(cooked) - cooked.loc = src.loc + cooked.forceMove(src.loc) for(var/i=1,i\The [src] is full." return 1 else - user.remove_from_mob(O) - O.loc = src + if(!user.drop_item()) + user << "\The [O] is stuck to you!" + return + + O.forceMove(src) if(item_quants[O.name]) item_quants[O.name]++ else @@ -338,7 +341,7 @@ var/i = amount for(var/obj/O in contents) if(O.name == K) - O.loc = loc + O.forceMove(loc) i-- if(i <= 0) return 1 @@ -359,7 +362,7 @@ item_quants[O]-- for(var/obj/T in contents) if(T.name == O) - T.loc = src.loc + T.forceMove(src.loc) throw_item = T break break diff --git a/code/modules/food/icecream_vat.dm b/code/modules/food/icecream_vat.dm index e71afb26482..eae35e2df0e 100644 --- a/code/modules/food/icecream_vat.dm +++ b/code/modules/food/icecream_vat.dm @@ -34,9 +34,11 @@ if(beaker) user << "A container is already inside [src]." return + if(!user.drop_item()) + user << "\The [I] is stuck to you!" + return beaker = I - user.drop_item() - I.loc = src + I.forceMove(src) user << "You add [I] to [src]" updateUsrDialog() return @@ -105,7 +107,7 @@ else if(href_list["eject"]) if(beaker) - A.loc = loc + A.forceMove(loc) beaker = null reagents.trans_to(A,reagents.total_volume) @@ -248,4 +250,4 @@ dat += show_toppings() var/datum/browser/popup = new(user, "cream_master","Cream-Master Deluxe", 700, 400, src) popup.set_content(dat) - popup.open() \ No newline at end of file + popup.open() diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index e0127fe9862..7707a257634 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -191,7 +191,7 @@ if(href_list["ejectBeaker"]) if(beaker) var/obj/item/weapon/reagent_containers/glass/B = beaker - B.loc = loc + B.forceMove(loc) beaker = null overlays.Cut() add_fingerprint(usr) @@ -202,33 +202,35 @@ return if(broken_requirements.len && B.type == broken_requirements[1]) - broken_requirements -= broken_requirements[1] - user << "You fix [src]." if(istype(B,/obj/item/stack)) var/obj/item/stack/S = B S.use(1) else - user.drop_item() + if(!user.drop_item()) + user << "\The [B] is stuck to you!" + return qdel(B) + broken_requirements -= broken_requirements[1] + user << "You fix [src]." return if(src.beaker) - user << "Something is already loaded into the machine." + user << "Something is already loaded into the machine." return if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks)) src.beaker = B - 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 + if(!user.drop_item()) + user << "\The [B] is stuck to you!" return - else - user << "\The [B] is stuck to you!" + 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 /obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob, params) ..() @@ -358,16 +360,16 @@ playsound(src, 'sound/items/Ratchet.ogg', 50, 1) if(anchored) anchored = 0 - user << "The [src] can now be moved." + user << "\The [src] can now be moved." else if(!anchored) anchored = 1 - user << "The [src] is now secured." + user << "\The [src] is now secured." if(panel_open) if(istype(I, /obj/item/weapon/crowbar)) if(beaker) var/obj/item/weapon/reagent_containers/glass/B = beaker - B.loc = loc + B.forceMove(loc) beaker = null default_deconstruction_crowbar(I) return 1 @@ -427,25 +429,29 @@ if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) if(src.beaker) - user << "A beaker is already loaded into the machine." + user << "A beaker is already loaded into the machine." + return + if(!user.drop_item()) + user << "\The [B] is stuck to you!" return src.beaker = B - user.drop_item() - B.loc = src - user << "You add the beaker to the machine!" + B.forceMove(src) + user << "You add the beaker to the machine!" src.updateUsrDialog() icon_state = "mixer1" else if(istype(B, /obj/item/weapon/storage/pill_bottle)) if(src.loaded_pill_bottle) - user << "A pill bottle is already loaded into the machine." + user << "A pill bottle is already loaded into the machine." return + if(!user.drop_item()) + user << "\The [B] is stuck to you!" + return src.loaded_pill_bottle = B - user.drop_item() - B.loc = src - user << "You add the pill bottle into the dispenser slot!" + B.forceMove(src) + user << "You add the pill bottle into the dispenser slot!" src.updateUsrDialog() return @@ -459,7 +465,7 @@ if (href_list["ejectp"]) if(loaded_pill_bottle) - loaded_pill_bottle.loc = src.loc + loaded_pill_bottle.forceMove(src.loc) loaded_pill_bottle = null else if(href_list["close"]) usr << browse(null, "window=chem_master") @@ -579,7 +585,7 @@ reagents.trans_to(P,amount_per_pill) if(src.loaded_pill_bottle) if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) - P.loc = loaded_pill_bottle + P.forceMove(loaded_pill_bottle) src.updateUsrDialog() else var/name = reject_bad_text(input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name())) @@ -816,15 +822,17 @@ if (beaker) return 1 else + if(!user.drop_item()) + user << "\The [O] is stuck to you!" + return src.beaker = O - user.drop_item() - O.loc = src + O.forceMove(src) update_icon() src.updateUsrDialog() return 0 if(holdingitems && holdingitems.len >= limit) - usr << "The machine cannot hold anymore items." + usr << "The machine cannot hold anymore items." return 1 //Fill machine with the plantbag! @@ -832,25 +840,25 @@ for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) O.contents -= G - G.loc = src + G.forceMove(src) holdingitems += G if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill - user << "You fill the All-In-One grinder to the brim." + user << "You empty the plant bag into the All-In-One grinder." src.updateUsrDialog() return 0 if (!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items)) - user << "Cannot refine into a reagent." + user << "Cannot refine into a reagent." return 1 user.unEquip(O) - O.loc = src + O.forceMove(src) holdingitems += O src.updateUsrDialog() return 0 @@ -929,7 +937,7 @@ return if (!beaker) return - beaker.loc = src.loc + beaker.forceMove(src.loc) beaker = null update_icon() @@ -941,7 +949,7 @@ return for(var/obj/item/O in holdingitems) - O.loc = src.loc + O.forceMove(src.loc) holdingitems -= O holdingitems = list() @@ -1146,4 +1154,4 @@ var/amount = O.reagents.total_volume O.reagents.trans_to(beaker, amount) if(!O.reagents.total_volume) - remove_object(O) + remove_object(O) \ No newline at end of file diff --git a/code/modules/reagents/dartgun.dm b/code/modules/reagents/dartgun.dm index 6affdf1f8b7..52b297d88eb 100644 --- a/code/modules/reagents/dartgun.dm +++ b/code/modules/reagents/dartgun.dm @@ -60,11 +60,11 @@ /obj/item/weapon/gun/dartgun/examine(mob/user) if(..(user, 2)) if(beakers.len) - user << "\blue [src] contains:" + user << "[R.volume] units of [R.name]" /obj/item/weapon/gun/dartgun/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/weapon/dart_cartridge)) @@ -72,34 +72,36 @@ var/obj/item/weapon/dart_cartridge/D = I if(!D.darts) - user << "\blue [D] is empty." + user << "[D] is empty." return 0 if(cartridge) if(cartridge.darts <= 0) src.remove_cartridge() else - user << "\blue There's already a cartridge in [src]." + user << "There's already a cartridge in [src]." return 0 user.drop_item() cartridge = D - D.loc = src - user << "\blue You slot [D] into [src]." + D.forceMove(src) + user << "You slot [D] into [src]." update_icon() return if(istype(I, /obj/item/weapon/reagent_containers/glass)) if(!istype(I, container_type)) - user << "\blue [I] doesn't seem to fit into [src]." + user << "[I] doesn't seem to fit into [src]." return if(beakers.len >= max_beakers) - user << "\blue [src] already has [max_beakers] beakers in it - another one isn't going to fit!" + 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.loc = src + if(!user.drop_item()) + user << "\The [B] is stuck to you!" + return + B.forceMove(src) beakers += B - user << "\blue You slot [B] into [src]." + user << "You pop the cartridge out of [src]." var/obj/item/weapon/dart_cartridge/C = cartridge - C.loc = get_turf(src) + C.forceMove(get_turf(src)) C.update_icon() cartridge = null src.update_icon() @@ -143,10 +145,10 @@ var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src)) var/obj/item/weapon/reagent_containers/syringe/S = get_mixed_syringe() if(!S) - user << "\red There are no darts in [src]!" + user << "There are no darts in [src]!" return if(!S.reagents) - user << "\red There are no reagents available!" + user << "There are no reagents available!" return cartridge.darts-- src.update_icon() @@ -269,10 +271,10 @@ if(index <= beakers.len) if(beakers[index]) var/obj/item/weapon/reagent_containers/glass/beaker/B = beakers[index] - usr << "You remove [B] from [src]." + usr << "You remove [B] from [src]." mixing -= B beakers -= B - B.loc = get_turf(src) + B.forceMove(get_turf(src)) else if (href_list["eject_cart"]) remove_cartridge() src.updateUsrDialog() @@ -282,7 +284,7 @@ if(cartridge) spawn(0) fire_dart(target,user) else - usr << "\red [src] is empty." + usr << "[src] is empty." /obj/item/weapon/gun/dartgun/vox diff --git a/code/modules/reagents/newchem/chem_heater.dm b/code/modules/reagents/newchem/chem_heater.dm index be04e4d8d0a..e6e4ca61958 100644 --- a/code/modules/reagents/newchem/chem_heater.dm +++ b/code/modules/reagents/newchem/chem_heater.dm @@ -53,7 +53,7 @@ /obj/machinery/chem_heater/proc/eject_beaker() if(beaker) - beaker.loc = get_turf(src) + beaker.forceMove(get_turf(src)) beaker.reagents.handle_reactions() beaker = null icon_state = "mixer0b" @@ -79,7 +79,7 @@ if(user.drop_item()) beaker = I - I.loc = src + I.forceMove(src) user << "You add the beaker to the machine!" icon_state = "mixer1b" nanomanager.update_uis(src) diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm index 9573e08ea50..79c7096ec64 100644 --- a/code/modules/virus2/centrifuge.dm +++ b/code/modules/virus2/centrifuge.dm @@ -18,9 +18,12 @@ user << "\The [src] is already loaded." return + if(!user.drop_item()) + user << "\The [O] is stuck to you!" + return + sample = O - user.drop_item() - O.loc = src + O.forceMove(src) user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!") nanomanager.update_uis(src) @@ -140,7 +143,7 @@ if("sample") if(sample) - sample.loc = src.loc + sample.forceMove(src.loc) sample = null return 1 @@ -210,4 +213,4 @@ Additional Notes: "} - state("The nearby computer prints out a pathology report.") + state("The nearby computer prints out a pathology report.") \ No newline at end of file diff --git a/code/modules/virus2/curer.dm b/code/modules/virus2/curer.dm index 054f56c8cd4..1db66e49fa4 100644 --- a/code/modules/virus2/curer.dm +++ b/code/modules/virus2/curer.dm @@ -11,14 +11,13 @@ /obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob, params) if(istype(I,/obj/item/weapon/reagent_containers)) var/mob/living/carbon/C = user - if(!container) + if(!container && C.drop_item()) container = I - C.drop_item() - I.loc = src + I.forceMove(src) return if(istype(I,/obj/item/weapon/virusdish)) if(virusing) - user << "The pathogen materializer is still recharging.." + user << "The pathogen materializer is still recharging.." return var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc) @@ -88,7 +87,7 @@ if (href_list["antibody"]) curing = 10 else if(href_list["eject"]) - container.loc = src.loc + container.forceMove(src.loc) container = null src.add_fingerprint(usr) @@ -105,4 +104,4 @@ data["antibodies"] = B.data["antibodies"] product.reagents.add_reagent("antibodies",30,data) - state("\The [src.name] buzzes", "blue") + state("\The [src.name] buzzes", "blue") \ No newline at end of file diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm index cc79387c7e6..844528e7ed6 100644 --- a/code/modules/virus2/dishincubator.dm +++ b/code/modules/virus2/dishincubator.dm @@ -18,12 +18,15 @@ if(istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/syringe)) if(beaker) - user << "\The [src] is already loaded." + user << "\The [src] is already loaded." + return + + if(!user.drop_item()) + user << "\The [O] is stuck to you!" return beaker = O - user.drop_item() - O.loc = src + O.forceMove(src) user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!") nanomanager.update_uis(src) @@ -37,9 +40,11 @@ user << "The dish tray is aleady full!" return + if(!user.drop_item()) + user << "\The [O] is stuck to you!" + return dish = O - user.drop_item() - O.loc = src + O.forceMove(src) user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!") nanomanager.update_uis(src) @@ -152,7 +157,7 @@ if (href_list["ejectchem"]) if(beaker) - beaker.loc = src.loc + beaker.forceMove(src.loc) beaker = null return 1 @@ -164,7 +169,7 @@ if (href_list["ejectdish"]) if(dish) - dish.loc = src.loc + dish.forceMove(src.loc) dish = null return 1 @@ -200,4 +205,4 @@ ping("\The [src] pings, \"Injection complete.\"") return 1 - return 0 + return 0 \ No newline at end of file