Merge pull request #28588 from Ergovisavi/atmos_backpack_again

Changes to the Atmos Watertank Backpack
This commit is contained in:
Jordan Brown
2017-06-20 21:49:02 -04:00
committed by GitHub
6 changed files with 119 additions and 44 deletions

View File

@@ -1,5 +1,9 @@
// Foam
// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin.
#define ALUMINUM_FOAM 1
#define IRON_FOAM 2
#define RESIN_FOAM 3
/obj/effect/particle_effect/foam
name = "foam"
@@ -22,13 +26,16 @@
/obj/effect/particle_effect/foam/metal
name = "aluminium foam"
metal = 1
metal = ALUMINUM_FOAM
icon_state = "mfoam"
/obj/effect/particle_effect/foam/metal/iron
name = "iron foam"
metal = 2
metal = IRON_FOAM
/obj/effect/particle_effect/foam/metal/resin
name = "resin foam"
metal = RESIN_FOAM
/obj/effect/particle_effect/foam/New(loc)
@@ -45,10 +52,12 @@
/obj/effect/particle_effect/foam/proc/kill_foam()
STOP_PROCESSING(SSfastprocess, src)
switch(metal)
if(1)
new /obj/structure/foamedmetal(src.loc)
if(2)
new /obj/structure/foamedmetal/iron(src.loc)
if(ALUMINUM_FOAM)
new /obj/structure/foamedmetal(get_turf(src))
if(IRON_FOAM)
new /obj/structure/foamedmetal/iron(get_turf(src))
if(RESIN_FOAM)
new /obj/structure/foamedmetal/resin(get_turf(src))
flick("[icon_state]-disolve", src)
QDEL_IN(src, 5)
@@ -230,3 +239,44 @@
obj_integrity = 50
max_integrity = 50
icon_state = "ironfoam"
//Atmos Backpack Resin, transparent, prevents atmos and filters the air
/obj/structure/foamedmetal/resin
name = "ATMOS Resin"
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature"
opacity = FALSE
icon_state = "atmos_resin"
alpha = 120
obj_integrity = 10
max_integrity = 10
layer = EDGED_TURF_LAYER
/obj/structure/foamedmetal/resin/Initialize()
. = ..()
if(isopenturf(loc))
var/turf/open/O = loc
if(O.air)
var/datum/gas_mixture/G = O.air
G.temperature = 293.15
for(var/obj/effect/hotspot/H in O)
qdel(H)
var/list/G_gases = G.gases
for(var/I in G_gases)
if(I != "o2" && I != "n2")
G.gases[I][MOLES] = 0
G.garbage_collect()
O.air_update_turf()
for(var/obj/machinery/atmospherics/components/unary/U in O)
if(!U.welded)
U.welded = TRUE
U.update_icon()
U.visible_message("<span class='danger'>[U] sealed shut!</span>")
for(var/mob/living/L in O)
L.ExtinguishMob()
for(var/obj/item/Item in O)
Item.extinguish()
#undef ALUMINUM_FOAM
#undef IRON_FOAM
#undef RESIN_FOAM