mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 16:09:15 +00:00
Fixes self-sustaining rainbow slime extracts, blue slime extracts' foam activation and refactors foam code into a helper proc (#46259)
* Fixing self sustaining rainbow extracts and fixing foam creation of blue slime extracts * Refactoring foams to be in a helper function. Resin foam remains untouched * Improving refactor of create_foam * Putting helper proc in vent clog event * create_foam takes a foam type again * minor type passing change
This commit is contained in:
@@ -72,3 +72,15 @@
|
||||
if(!GLOB.chemical_reactions_list[primary_reagent])
|
||||
GLOB.chemical_reactions_list[primary_reagent] = list()
|
||||
GLOB.chemical_reactions_list[primary_reagent] += R
|
||||
|
||||
//Creates foam from the reagent. Metaltype is for metal foam, notification is what to show people in textbox
|
||||
/datum/reagents/proc/create_foam(foamtype,foam_volume,metaltype = 0,notification = null)
|
||||
var/location = get_turf(my_atom)
|
||||
var/datum/effect_system/foam_spread/foam = new foamtype()
|
||||
foam.set_up(foam_volume, location, src, metaltype)
|
||||
foam.start()
|
||||
clear_reagents()
|
||||
if(!notification)
|
||||
return
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, notification)
|
||||
Reference in New Issue
Block a user