From ff5ec1df540553bceaf3316fbcd8eb3a1b502291 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Fri, 3 Apr 2015 05:32:53 -0400 Subject: [PATCH] meh --- .../objects/effects/decals/Cleanable/misc.dm | 22 ++++-- code/game/objects/effects/effect_system.dm | 4 +- code/modules/reagents/newchem/pyro.dm | 71 ++++++++++++++++++- 3 files changed, 86 insertions(+), 11 deletions(-) diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index b05ad70d3b5..49deee27731 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -16,13 +16,6 @@ icon_state = "ash" anchored = 1 -/obj/effect/decal/cleanable/greenglow - - New() - ..() - spawn(1200)// 2 minutes - qdel(src) - /obj/effect/decal/cleanable/dirt name = "dirt" desc = "Someone should clean that up." @@ -45,6 +38,16 @@ icon = 'icons/effects/effects.dmi' icon_state = "flour" +/obj/effect/decal/cleanable/flour/foam + name = "Fire fighting foam" + desc = "It's foam." + color = "#EBEBEB" + + New() + ..() + spawn(150)// 15 seconds + qdel(src) + /obj/effect/decal/cleanable/greenglow name = "glowing goo" desc = "Jeez. I hope that's not for lunch." @@ -56,6 +59,11 @@ icon = 'icons/effects/effects.dmi' icon_state = "greenglow" + New() + ..() + spawn(1200)// 2 minutes + qdel(src) + /obj/effect/decal/cleanable/cobweb name = "cobweb" desc = "Somebody should remove that." diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 73ccbd3aab3..42d917cb405 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -11,7 +11,7 @@ would spawn and follow the beaker, even if it is carried or thrown. icon = 'icons/effects/effects.dmi' mouse_opacity = 0 unacidable = 1//So effect are not targeted by alien acid. - + /datum/effect/effect/proc/fadeOut(var/atom/A, var/frames = 16) if(A.alpha == 0) //Handle already transparent case return @@ -426,7 +426,7 @@ steam.start() -- spawns the effect /obj/effect/effect/chem_smoke/Move() ..() for(var/atom/A in view(2, src)) - if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve + if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite")||reagents.has_reagent("synthflesh")||reagents.has_reagent("firefighting_foam")||reagents.has_reagent("honey"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve if(prob(5)) reagents.reaction(A) else diff --git a/code/modules/reagents/newchem/pyro.dm b/code/modules/reagents/newchem/pyro.dm index 14a10f6ef59..7739795bae6 100644 --- a/code/modules/reagents/newchem/pyro.dm +++ b/code/modules/reagents/newchem/pyro.dm @@ -22,7 +22,7 @@ /datum/reagent/clf3 name = "Chlorine Trifluoride" id = "clf3" - description = "Makes a temporary 3x3 fireball when it comes into existence, so be careful when mixing. ClF3 applied to a surface burns things that wouldn't otherwise burn, sometimes through the very floors of the station and exposing it to the vacuum of space." + description = "An extremely volatile substance, handle with the utmost care." reagent_state = LIQUID color = "#FF0000" metabolization_rate = 4 @@ -511,4 +511,71 @@ datum/reagent/pyrosium/on_tick() /datum/chemical_reaction/azide/on_reaction(var/datum/reagents/holder, var/created_volume) var/location = get_turf(holder.my_atom) explosion(location,0,1,3) - return \ No newline at end of file + return + +datum/reagent/firefighting_foam + name = "Firefighting foam" + id = "firefighting_foam" + description = "Carbon Tetrachloride is a foam used for fire suppression." + reagent_state = LIQUID + color = "#A0A090" + var/cooling_temperature = 3 // more effective than water + +/datum/chemical_reaction/firefighting_foam + name = "firefighting_foam" + id = "firefighting_foam" + result = "firefighting_foam" + required_reagents = list("carbon" = 1, "chlorine" = 1, "sulfur" = 1) + result_amount = 3 + mix_message = "The mixture bubbles gently." + +datum/reagent/firefighting_foam/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + if(!istype(M, /mob/living)) + return + +// Put out fire + if(method == TOUCH) + M.adjust_fire_stacks(-(volume / 5)) // more effective than water + if(M.fire_stacks <= 0) + M.ExtinguishMob() + return + +datum/reagent/firefighting_foam/reaction_turf(var/turf/simulated/T, var/volume) + if (!istype(T)) return + var/CT = cooling_temperature + src = null + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly. + var/hotspot = (locate(/obj/fire) in T) + if(hotspot && !istype(T, /turf/space)) + var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() ) + lowertemp.temperature = max( min(lowertemp.temperature-(CT*1000),lowertemp.temperature / CT) ,0) + lowertemp.react() + T.assume_air(lowertemp) + qdel(hotspot) + return + +datum/reagent/firefighting_foam/reaction_obj(var/obj/O, var/volume) + src = null + var/turf/T = get_turf(O) + var/hotspot = (locate(/obj/fire) in T) + if(hotspot && !istype(T, /turf/space)) + var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() ) + lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0) + lowertemp.react() + T.assume_air(lowertemp) + del(hotspot) + return + +/datum/chemical_reaction/clf3_firefighting + name = "clf3_firefighting" + id = "clf3_firefighting" + result = null + required_reagents = list("firefighting_foam" = 1, "clf3" = 1) + result_amount = 1 + mix_message = "The substance violently detonates!" + +/datum/chemical_reaction/clf3_firefighting/on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + explosion(location,0,0,3) + return