diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 7deda5da27..34c1a6b280 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -232,12 +232,17 @@ /obj/item/storage/pill_bottle/AltClick(mob/living/carbon/user) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) return - var/obj/item/reagent_containers/pill/W = locate(/obj/item/reagent_containers/pill) in contents - if(W && contents.len > 0) - SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, user) - user.put_in_hands(W) - contents -= W - to_chat(user, "You pop \a [W] out of the bottle.") + if(!length(user.get_empty_held_indexes())) + to_chat(user, "Your hands are full!") + return + var/obj/item/reagent_containers/pill/P = locate() in contents + if(P) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, P, user) + if(!user.put_in_hands(P)) + P.forceMove(user.drop_location()) // make sure it's not stuck in the user if the put in hands somehow fails + to_chat(user, "You take \a [P] out of [src].") + else + to_chat(user, "[P] drops to the floor!") else to_chat(user, "There are no pills left in the bottle.") return TRUE