Skip to content

Commit

Permalink
TGS Test Merge (#6032)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blue authored and Blue committed Oct 1, 2023
2 parents 4db5b60 + 28ea167 commit d671a25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/game/atoms/atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,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)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/food/food/drinks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
. += "<span class='notice'>\The [src] is almost full!</span>"
else
. += "<span class='notice'>\The [src] is full!</span>"
if(reagents)
var/datum/reagent/ethanol/R = locate() in reagents
if(istype(R))
. += "<span class='notice'>It contains alcohol.</span>"


////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit d671a25

Please sign in to comment.