Refactors Foam (#25436)

* foam starts

* foam fixes

* foam foam foam

* remove widefoam, get cleaning grenades working as they should

* sirryan reeview

* Apply suggestions from code review

Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Luc <89928798+lewcc@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Luc <89928798+lewcc@users.noreply.github.com>

* locs good to me

* dgamer review

---------

Signed-off-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
Luc
2024-06-28 20:39:26 +00:00
committed by GitHub
co-authored by Matt DGamerL
parent efd6f2dfa6
commit bfb9e8c132
7 changed files with 210 additions and 125 deletions
@@ -118,10 +118,11 @@
create_reagents()
// the cooking oil should spread through the foam.
// when it gets added, it's at 1000 degrees so it quickly fireflashes and reacts to form inert cooking oil.
reagents.add_reagent("cooking_oil", ice_amount * 2, reagtemp = 1000)
reagents.add_reagent("cooking_oil", ice_amount * 2, reagtemp = 1000, no_react = TRUE)
reagents.chem_temp = 1000
var/datum/effect_system/foam_spread/S = new()
var/datum/effect_system/foam_spread/oil/S = new()
S.set_up(ice_amount * 2, loc, reagents, FALSE)
S.temperature = 1000
S.start()
@@ -249,7 +249,7 @@
to_chat(user, "<span class='warning'>You need at least 10 units of water to use the metal foam synthesizer!</span>")
return
var/obj/effect/particle_effect/foam/F = new/obj/effect/particle_effect/foam(get_turf(target), 1)
F.amount = 0
F.spread_amount = 0
reagents.remove_any(10)
metal_synthesis_charge--
addtimer(CALLBACK(src, PROC_REF(decrease_metal_charge)), 5 SECONDS)
@@ -24,7 +24,6 @@
s.start()
holder.clear_reagents()
/datum/chemical_reaction/metalfoam
name = "Metal Foam"
id = "metalfoam"
@@ -37,11 +36,10 @@
holder.my_atom.visible_message("<span class='warning'>The solution spews out a metalic foam!</span>")
var/datum/effect_system/foam_spread/s = new()
s.set_up(created_volume, location, holder, MFOAM_ALUMINUM)
var/datum/effect_system/foam_spread/metal/s = new()
s.set_up(created_volume, location, holder, METAL_FOAM_ALUMINUM)
s.start()
/datum/chemical_reaction/ironfoam
name = "Iron Foam"
id = "ironlfoam"
@@ -54,11 +52,10 @@
holder.my_atom.visible_message("<span class='warning'>The solution spews out a metalic foam!</span>")
var/datum/effect_system/foam_spread/s = new()
s.set_up(created_volume, location, holder, MFOAM_IRON)
var/datum/effect_system/foam_spread/metal/s = new()
s.set_up(created_volume, location, holder, METAL_FOAM_IRON)
s.start()
// Synthesizing these three chemicals is pretty complex in real life, but fuck it, it's just a game!
/datum/chemical_reaction/ammonia
name = "Ammonia"