[MIRROR] Add blended dust warning to grinder beakers (#3243)

* Add blended dust warning to grinder beakers (#56759)

* Add blended dust warning to grinder beakers

🆑 coiax
tweak: All beakers, bottles and containers that have been used in the
All-in-One Grinder will have a warning not to inhale the dust on
examine.
/🆑

The initial spawned beakers in the grinder already had this description,
and now it is applied to any beakers that have been used for grinding
purposes (and only grinding purposes).

Co-authored-by: cacogen <25089914+cacogen@ users.noreply.github.com>

* Add blended dust warning to grinder beakers

Co-authored-by: coiax <yellowbounder@gmail.com>
Co-authored-by: cacogen <25089914+cacogen@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-02-10 01:40:54 +01:00
committed by GitHub
parent a098c69eaa
commit 533313ba7e
2 changed files with 13 additions and 1 deletions
@@ -28,7 +28,15 @@
. = ..()
holdingitems = list()
beaker = new /obj/item/reagent_containers/glass/beaker/large(src)
beaker.desc += " May contain blended dust. Don't breathe this in!"
warn_of_dust()
/// Add a description to the current beaker warning of blended dust, if it doesn't already have that warning.
/obj/machinery/reagentgrinder/proc/warn_of_dust()
if(HAS_TRAIT(beaker, TRAIT_MAY_CONTAIN_BLENDED_DUST))
return
beaker.desc += " May contain blended dust. Don't breathe this!"
ADD_TRAIT(beaker, TRAIT_MAY_CONTAIN_BLENDED_DUST, TRAIT_GENERIC)
/obj/machinery/reagentgrinder/constructed/Initialize()
. = ..()
@@ -284,6 +292,7 @@
if(!beaker || machine_stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
return
operate_for(60)
warn_of_dust() // don't breathe this.
for(var/i in holdingitems)
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break