From 46591688afa72c08fe3b9e6c17a92e688cf7c5f9 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Thu, 28 Sep 2023 18:40:34 -0700 Subject: [PATCH 1/3] Makes alcohol "visible" in reagent containers --- code/game/atoms/atom.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/game/atoms/atom.dm b/code/game/atoms/atom.dm index 9c9e630ee57d..5e25557cc477 100644 --- a/code/game/atoms/atom.dm +++ b/code/game/atoms/atom.dm @@ -438,14 +438,21 @@ if(reagents.reagents_holder_flags & TRANSPARENT) . += "It contains:" if(length(reagents.reagent_list)) + var/has_alcohol = FALSE if(user.can_see_reagents()) //Show each individual reagent for(var/datum/reagent/current_reagent as anything in reagents.reagent_list) + if(!has_alcohol && istype(current_reagent,/datum/reagent/ethanol)) + has_alcohol = TRUE . += "• [round(current_reagent.volume, 0.01)] units of [current_reagent.name]" else //Otherwise, just show the total volume var/total_volume = 0 for(var/datum/reagent/current_reagent as anything in reagents.reagent_list) + if(!has_alcohol && istype(current_reagent,/datum/reagent/ethanol)) + has_alcohol = TRUE total_volume += current_reagent.volume . += "[total_volume] units of various reagents" + if(has_alcohol) + . += "It smells of alcohol." else . += "Nothing." else if(reagents.reagents_holder_flags & AMOUNT_VISIBLE) From 28ea1678e60dd153153f8c950cf2fcfa0bf9d90b Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Sat, 30 Sep 2023 22:09:42 -0700 Subject: [PATCH 2/3] Adds explicit find-alcohol code to glasses --- code/modules/food/food/drinks.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm index 2dc89701ebac..3c267e7eb4fe 100644 --- a/code/modules/food/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -93,6 +93,10 @@ . += "\The [src] is almost full!" else . += "\The [src] is full!" + if(reagents) + var/datum/reagent/ethanol/R = locate() in reagents + if(istype(R)) + . += "It contains alcohol." //////////////////////////////////////////////////////////////////////////////// From 4cefa6bb7c479427e5fdafdec33a798563202535 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Sun, 1 Oct 2023 20:42:45 -0700 Subject: [PATCH 3/3] doy --- code/modules/food/food/drinks.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm index 3c267e7eb4fe..6861c338cd52 100644 --- a/code/modules/food/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -94,7 +94,7 @@ else . += "\The [src] is full!" if(reagents) - var/datum/reagent/ethanol/R = locate() in reagents + var/datum/reagent/ethanol/R = locate() in reagents.reagent_list if(istype(R)) . += "It contains alcohol."