mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user