From ea752e71910a3d68f2e4abd967806fd06d7dfa17 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Tue, 19 Mar 2019 03:10:47 -0400 Subject: [PATCH] safety --- .../objects/effects/effect_system/effects_chem_smoke.dm | 7 +++---- code/modules/reagents/chemistry/recipes/pyrotechnics.dm | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/code/game/objects/effects/effect_system/effects_chem_smoke.dm b/code/game/objects/effects/effect_system/effects_chem_smoke.dm index 26e6026a677..d68692a03e6 100644 --- a/code/game/objects/effects/effect_system/effects_chem_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_chem_smoke.dm @@ -49,10 +49,9 @@ /datum/effect_system/smoke_spread/chem/New() ..() - chemholder = new/obj() - var/datum/reagents/R = new/datum/reagents(500) - chemholder.reagents = R - R.my_atom = chemholder + chemholder = new + chemholder.create_reagents(1000) + chemholder.reagents.set_reacting(FALSE) // Just in case /datum/effect_system/smoke_spread/chem/Destroy() QDEL_NULL(chemholder) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index f873f7600f8..a83bf0f7989 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -233,8 +233,7 @@ datum/chemical_reaction/flash_powder /datum/chemical_reaction/smoke/on_reaction(datum/reagents/holder, created_volume) for(var/f_reagent in forbidden_reagents) - if(holder.has_reagent(f_reagent)) - holder.remove_reagent(f_reagent, holder.get_reagent_amount(f_reagent)) + holder.del_reagent(f_reagent) var/location = get_turf(holder.my_atom) var/datum/effect_system/smoke_spread/chem/S = new playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)