From 082aa40246653d70a615ad766b2e18f7892bef4d Mon Sep 17 00:00:00 2001 From: KalevTait Date: Sun, 26 Jun 2022 18:42:27 +0100 Subject: [PATCH] added check --- code/modules/reagents/reagent_containers/glass_containers.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index f9817b26b82..1ac5a2fa7e8 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -68,12 +68,15 @@ playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) /obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity) - if((!proximity) || !check_allowed_items(target,target_self = TRUE)) + if((!proximity) || !check_allowed_items(target,target_self = TRUE)) return if(!is_open_container()) return + if(!reagents) + return + if(target.is_refillable()) //Something like a glass. Player probably wants to transfer TO it. if(!reagents.total_volume) to_chat(user, "[src] is empty!")