Refactor on_reagent_change to pass through the change type (#32805)

this is purely so the smoke circuit can reset the notification only when
reagents are actually added to it
This commit is contained in:
oranges
2017-11-25 00:45:44 +13:00
committed by AnturK
parent 93ceba4b63
commit 73b25d7ef2
18 changed files with 39 additions and 38 deletions
@@ -108,7 +108,7 @@
push_data()
..()
/obj/item/integrated_circuit/passive/power/chemical_cell/on_reagent_change()
/obj/item/integrated_circuit/passive/power/chemical_cell/on_reagent_change(changetype)
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
@@ -26,9 +26,10 @@
var/smoke_radius = 5
var/notified = FALSE
/obj/item/integrated_circuit/reagent/smoke/on_reagent_change()
//reset warning
notified = FALSE
/obj/item/integrated_circuit/reagent/smoke/on_reagent_change(changetype)
//reset warning only if we have reagents now
if(changetype == ADD_REAGENT)
notified = FALSE
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
@@ -46,7 +47,6 @@
if(S)
S.set_up(reagents, smoke_radius, location, notified)
if(!notified)
//we have now notified
notified = TRUE
S.start()
@@ -81,7 +81,7 @@
..()
/obj/item/integrated_circuit/reagent/injector/on_reagent_change()
/obj/item/integrated_circuit/reagent/injector/on_reagent_change(changetype)
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
@@ -259,7 +259,7 @@
push_data()
..()
/obj/item/integrated_circuit/reagent/storage/on_reagent_change()
/obj/item/integrated_circuit/reagent/storage/on_reagent_change(changetype)
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()