mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +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:
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/reagents
|
||||
@@ -429,7 +428,7 @@
|
||||
reagent_list -= R
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change()
|
||||
my_atom.on_reagent_change(DEL_REAGENT)
|
||||
check_ignoreslow(my_atom)
|
||||
check_gofast(my_atom)
|
||||
check_goreallyfast(my_atom)
|
||||
@@ -527,7 +526,7 @@
|
||||
R.volume += amount
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change()
|
||||
my_atom.on_reagent_change(ADD_REAGENT)
|
||||
R.on_merge(data, amount)
|
||||
if(!no_react)
|
||||
handle_reactions()
|
||||
@@ -546,7 +545,7 @@
|
||||
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change()
|
||||
my_atom.on_reagent_change(ADD_REAGENT)
|
||||
if(!no_react)
|
||||
handle_reactions()
|
||||
if(isliving(my_atom))
|
||||
@@ -588,7 +587,7 @@
|
||||
if(!safety)//So it does not handle reactions when it need not to
|
||||
handle_reactions()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change()
|
||||
my_atom.on_reagent_change(REM_REAGENT)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/blood/on_reagent_change()
|
||||
/obj/item/reagent_containers/blood/on_reagent_change(changetype)
|
||||
if(reagents)
|
||||
var/datum/reagent/blood/B = reagents.has_reagent("blood")
|
||||
if(B && B.data && B.data["blood_type"])
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
icon_state = "bottle"
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/on_reagent_change()
|
||||
/obj/item/reagent_containers/glass/bottle/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/update_icon()
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/on_reagent_change()
|
||||
/obj/item/reagent_containers/glass/beaker/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/update_icon()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/on_reagent_change()
|
||||
/obj/item/reagent_containers/syringe/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/pickup(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user