diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm
index 5a461e15254..993cbc6edc1 100644
--- a/code/game/objects/effects/chem/foam.dm
+++ b/code/game/objects/effects/chem/foam.dm
@@ -14,23 +14,25 @@
var/amount = 3
var/expand = 1
var/metal = 0
+ var/dries = 1 //VOREStation Add
+ var/slips = 0 //VOREStation Add
/obj/effect/effect/foam/Initialize(var/mapload, var/ismetal = 0)
. = ..()
- icon_state = "[ismetal? "m" : ""]foam"
+ //icon_state = "[ismetal? "m" : ""]foam" //VOREStation Removal
metal = ismetal
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
-
- addtimer(CALLBACK(src, .proc/post_spread), 3 + metal * 3)
- addtimer(CALLBACK(src, .proc/pre_harden), 12 SECONDS)
- addtimer(CALLBACK(src, .proc/harden), 15 SECONDS)
+ if(dries) //VOREStation Add
+ addtimer(CALLBACK(src, .proc/post_spread), 3 + metal * 3)
+ addtimer(CALLBACK(src, .proc/pre_harden), 12 SECONDS)
+ addtimer(CALLBACK(src, .proc/harden), 15 SECONDS)
/obj/effect/effect/foam/proc/post_spread()
process()
checkReagents()
/obj/effect/effect/foam/proc/pre_harden()
- STOP_PROCESSING(SSobj, src)
+ return //VOREStation Edit
/obj/effect/effect/foam/proc/harden()
if(metal)
@@ -83,7 +85,7 @@
return
if(metal)
return
- if(istype(AM, /mob/living))
+ if(slips && istype(AM, /mob/living)) //VOREStation Add
var/mob/living/M = AM
M.slip("the foam", 6)
diff --git a/code/game/objects/effects/chem/foam_vr.dm b/code/game/objects/effects/chem/foam_vr.dm
new file mode 100644
index 00000000000..b7a22e629ee
--- /dev/null
+++ b/code/game/objects/effects/chem/foam_vr.dm
@@ -0,0 +1,20 @@
+/obj/effect/effect/foam/firefighting
+ name = "firefighting foam"
+ icon_state = "mfoam" //Whiter
+ color = "#A6FAFF"
+ var/lifetime = 3
+ dries = FALSE // We do this ourselves
+ slips = FALSE
+
+/obj/effect/effect/foam/firefighting/Initialize()
+ . = ..()
+ START_PROCESSING(SSobj, src)
+
+/obj/effect/effect/foam/firefighting/Destroy()
+ STOP_PROCESSING(SSobj, src)
+ return ..()
+
+/obj/effect/effect/foam/firefighting/process()
+ if(lifetime-- <= 0)
+ flick("[icon_state]-disolve", src)
+ QDEL_IN(src, 5)
\ No newline at end of file
diff --git a/code/game/objects/effects/chem/water.dm b/code/game/objects/effects/chem/water.dm
index 7de9b9f8ff1..72934e2da18 100644
--- a/code/game/objects/effects/chem/water.dm
+++ b/code/game/objects/effects/chem/water.dm
@@ -21,7 +21,7 @@
step_towards(src, target)
var/turf/T = get_turf(src)
if(T && reagents)
- reagents.touch_turf(T)
+ reagents.touch_turf(T, reagents.total_volume) //VOREStation Add
var/mob/M
for(var/atom/A in T)
if(!ismob(A) && A.simulated) // Mobs are handled differently
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index f44abcb96ba..6711269591e 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -1,7 +1,7 @@
/obj/item/weapon/extinguisher
name = "fire extinguisher"
desc = "A traditional red fire extinguisher."
- icon = 'icons/obj/items.dmi'
+ icon = 'icons/obj/items_vr.dmi' //VOREStation Edit
icon_state = "fire_extinguisher0"
item_state = "fire_extinguisher"
hitsound = 'sound/weapons/smash.ogg'
@@ -36,12 +36,12 @@
/obj/item/weapon/extinguisher/Initialize()
create_reagents(max_water)
- reagents.add_reagent("water", max_water)
+ reagents.add_reagent("firefoam", max_water) //VOREStation Edit
. = ..()
/obj/item/weapon/extinguisher/examine(mob/user)
if(..(user, 0))
- to_chat(user, "[bicon(src)] [src.name] contains [src.reagents.total_volume] units of water left!")
+ to_chat(user, "[bicon(src)] [src.name] contains [src.reagents.total_volume] units of foam left!") //VOREStation Edit
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
safety = !safety
@@ -70,7 +70,7 @@
/obj/item/weapon/extinguisher/afterattack(var/atom/target, var/mob/user, var/flag)
//TODO; Add support for reagents in water.
- if( istype(target, /obj/structure/reagent_dispensers/watertank) && flag)
+ if( istype(target, /obj/structure/reagent_dispensers) && flag) //VOREStation Edit
var/obj/o = target
var/amount = o.reagents.trans_to_obj(src, 50)
to_chat(user, "You fill [src] with [amount] units of the contents of [target].")
diff --git a/code/modules/reagents/Chemistry-Reagents_vr.dm b/code/modules/reagents/Chemistry-Reagents_vr.dm
index 611f286ab10..c6ea7cc1dcd 100644
--- a/code/modules/reagents/Chemistry-Reagents_vr.dm
+++ b/code/modules/reagents/Chemistry-Reagents_vr.dm
@@ -53,3 +53,43 @@
if(nif.stat == NIF_TEMPFAIL)
nif.stat = NIF_INSTALLING
nif.durability = min(nif.durability + removed, initial(nif.durability))
+
+/datum/reagent/firefighting_foam
+ name = "Firefighting Foam"
+ id = "firefoam"
+ description = "A historical fire suppressant. Originally believed to simply displace oxygen to starve fires, it actually interferes with the combustion reaction itself. Vastly superior to the cheap water-based extinguishers found on most NT vessels."
+ reagent_state = LIQUID
+ color = "#A6FAFF"
+ taste_description = "the inside of a fire extinguisher"
+
+/datum/reagent/firefighting_foam/touch_turf(var/turf/T, reac_volume)
+ if(reac_volume >= 1)
+ var/obj/effect/effect/foam/firefighting/F = (locate(/obj/effect/effect/foam/firefighting) in T)
+ if(!F)
+ F = new(T)
+ else if(istype(F))
+ F.lifetime = initial(F.lifetime) //reduce object churn a little bit when using smoke by keeping existing foam alive a bit longer
+
+ var/datum/gas_mixture/environment = T.return_air()
+ var/min_temperature = T0C + 100 // 100C, the boiling point of water
+
+ var/hotspot = (locate(/obj/fire) in T)
+ if(hotspot && !isspace(T))
+ 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)
+ qdel(hotspot)
+
+ if (environment && environment.temperature > min_temperature) // Abstracted as steam or something
+ var/removed_heat = between(0, volume * 19000, -environment.get_thermal_energy_change(min_temperature))
+ environment.add_thermal_energy(-removed_heat)
+ if(prob(5))
+ T.visible_message("The foam sizzles as it lands on \the [T]!")
+
+/datum/reagent/firefighting_foam/touch_obj(var/obj/O, reac_volume)
+ O.water_act(reac_volume / 5)
+
+/datum/reagent/firefighting_foam/touch_mob(var/mob/living/M, reac_volume)
+ M.adjust_fire_stacks(-reac_volume)
+ M.ExtinguishMob()
\ No newline at end of file
diff --git a/maps/tether/tether-01-surface1.dmm b/maps/tether/tether-01-surface1.dmm
index 5b7ddf5f42f..75fb388a4ba 100644
--- a/maps/tether/tether-01-surface1.dmm
+++ b/maps/tether/tether-01-surface1.dmm
@@ -3878,14 +3878,10 @@
/turf/simulated/floor/plating,
/area/maintenance/lower/trash_pit)
"agI" = (
-/obj/structure/table/standard,
-/obj/random/tech_supply,
-/obj/random/tech_supply,
-/obj/random/tech_supply,
-/obj/random/tech_supply,
/obj/machinery/newscaster{
pixel_x = -30
},
+/obj/structure/reagent_dispensers/foam,
/turf/simulated/floor/tiled,
/area/storage/primary)
"agJ" = (
diff --git a/maps/tether/tether-05-station1.dmm b/maps/tether/tether-05-station1.dmm
index 468a9571e59..ee2bca3c086 100644
--- a/maps/tether/tether-05-station1.dmm
+++ b/maps/tether/tether-05-station1.dmm
@@ -13706,7 +13706,7 @@
/turf/simulated/floor/tiled,
/area/hallway/station/atrium)
"axz" = (
-/obj/structure/reagent_dispensers/watertank,
+/obj/structure/reagent_dispensers/foam,
/turf/simulated/floor/tiled,
/area/storage/tools)
"axA" = (
diff --git a/vorestation.dme b/vorestation.dme
index 0aafca86177..3bf8a3af58d 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -1008,6 +1008,7 @@
#include "code\game\objects\effects\chem\chemsmoke.dm"
#include "code\game\objects\effects\chem\coating.dm"
#include "code\game\objects\effects\chem\foam.dm"
+#include "code\game\objects\effects\chem\foam_vr.dm"
#include "code\game\objects\effects\chem\water.dm"
#include "code\game\objects\effects\decals\cleanable.dm"
#include "code\game\objects\effects\decals\contraband.dm"