diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 1961b1feb3..dbc6f17a5d 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -54,62 +54,72 @@ if(!..(user, 2)) return if(reagents && reagents.reagent_list.len) - user << "It contains [reagents.total_volume] units of liquid." + to_chat(user, "It contains [reagents.total_volume] units of liquid.") else - user << "It is empty." + to_chat(user, "It is empty.") if(!is_open_container()) - user << "Airtight lid seals it completely." + to_chat(user, "Airtight lid seals it completely.") /obj/item/weapon/reagent_containers/glass/attack_self() ..() if(is_open_container()) - usr << "You put the lid on \the [src]." + to_chat(usr, "You put the lid on \the [src].") flags ^= OPENCONTAINER else - usr << "You take the lid off \the [src]." + to_chat(usr, "You take the lid off \the [src].") flags |= OPENCONTAINER update_icon() -/obj/item/weapon/reagent_containers/glass/do_surgery(mob/living/carbon/M, mob/living/user) - if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool - return ..() - afterattack(M, user, 1) - return 1 +/obj/item/weapon/reagent_containers/glass/attack(mob/M as mob, mob/user as mob, def_zone) + if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT) + return ..() + + if(standard_feed_mob(user, M)) + return + + return 0 + +/obj/item/weapon/reagent_containers/glass/standard_feed_mob(var/mob/user, var/mob/target) + if(!is_open_container()) + to_chat(user, "You need to open \the [src] first.") + return 1 + if(user.a_intent == I_HURT) + return 1 + return ..() + +/obj/item/weapon/reagent_containers/glass/self_feed_message(var/mob/user) + to_chat(user, "You swallow a gulp from \the [src].") /obj/item/weapon/reagent_containers/glass/afterattack(var/obj/target, var/mob/user, var/proximity) - if(!is_open_container() || !proximity) //Is the container open & are they next to whatever they're clicking? - return //If not, do nothing. - + return 1 //If not, do nothing. for(var/type in can_be_placed_into) //Is it something it can be placed into? if(istype(target, type)) - return - + return 1 if(standard_dispenser_refill(user, target)) //Are they clicking a water tank/some dispenser? - return - + return 1 if(standard_pour_into(user, target)) //Pouring into another beaker? return - - if(user.a_intent == I_HURT) //Harm intent? - if(standard_splash_mob(user, target)) //If harm intent and can splash a mob, go ahead. - return - if(reagents && reagents.total_volume) //Otherwise? Splash the floor. - user << "You splash the solution onto [target]." + if(user.a_intent == I_HURT) + if(standard_splash_mob(user,target)) + return 1 + if(reagents && reagents.total_volume) + to_chat(user, "You splash the solution onto [target].") //They are on harm intent, aka wanting to spill it. reagents.splash(target, reagents.total_volume) - return + return 1 + ..() /obj/item/weapon/reagent_containers/glass/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen)) var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN) if(length(tmp_label) > 50) - user << "The label can be at most 50 characters long." + to_chat(user, "The label can be at most 50 characters long.") else if(length(tmp_label) > 10) - user << "You set the label." + to_chat(user, "You set the label.") label_text = tmp_label update_name_label() else - user << "You set the label to \"[tmp_label]\"." + to_chat(user, "You set the label to \"[tmp_label]\".") label_text = tmp_label update_name_label() if(istype(W,/obj/item/weapon/storage/bag)) @@ -255,10 +265,10 @@ return else if(istype(D, /obj/item/weapon/mop)) if(reagents.total_volume < 1) - user << "\The [src] is empty!" + to_chat(user, "\The [src] is empty!") else reagents.trans_to_obj(D, 5) - user << "You wet \the [D] in \the [src]." + to_chat(user, "You wet \the [D] in \the [src].") playsound(loc, 'sound/effects/slosh.ogg', 25, 1) return else @@ -296,10 +306,10 @@ obj/item/weapon/reagent_containers/glass/bucket/wood return else if(istype(D, /obj/item/weapon/mop)) if(reagents.total_volume < 1) - user << "\The [src] is empty!" + to_chat(user, "\The [src] is empty!") else reagents.trans_to_obj(D, 5) - user << "You wet \the [D] in \the [src]." + to_chat(user, "You wet \the [D] in \the [src].") playsound(loc, 'sound/effects/slosh.ogg', 25, 1) return else