From 385659bd0a33fa5ad1dc1cd799a035e019722522 Mon Sep 17 00:00:00 2001 From: oranges Date: Wed, 15 Nov 2017 03:42:32 +0000 Subject: [PATCH] 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 e6eeb3521c9..8a889db2e5c 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."