From eaa1d752a8eeb7f13b6bc88b9426c27b02813109 Mon Sep 17 00:00:00 2001 From: Jordie Date: Thu, 16 Nov 2017 19:10:53 +1100 Subject: [PATCH] Merge pull request #32753 from optimumtact/wegetityouvape Smoke circuit only notifies admins on first use and reagent change --- .../integrated_electronics/subtypes/reagents.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index e6eeb3521c..8a889db2e5 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -26,8 +26,11 @@ volume = 100 power_draw_per_use = 20 var/smoke_radius = 5 + var/notified = FALSE /obj/item/integrated_circuit/reagent/smoke/on_reagent_change() + //reset warning + notified = FALSE set_pin_data(IC_OUTPUT, 1, reagents.total_volume) push_data() @@ -43,12 +46,17 @@ S.attach(location) playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) if(S) - S.set_up(reagents, smoke_radius, location, 0) + S.set_up(reagents, smoke_radius, location, notified) + if(!notified) + //we have now notified + notified = TRUE S.start() + if(reagents) reagents.clear_reagents() activate_pin(2) + /obj/item/integrated_circuit/reagent/injector name = "integrated hypo-injector" desc = "This scary looking thing is able to pump liquids into whatever it's pointed at."