Ports smart metal foam from FTL (#29963)

* Ports smart foam from FTL

* Adds foam grenades to the EngiVend

* Why are you doing htis?

* Stuff

* badoop
This commit is contained in:
Ashe Higgs
2017-08-18 23:05:37 -04:00
committed by Joan Lung
parent bf94cc5431
commit dfd642f861
9 changed files with 113 additions and 3 deletions
@@ -32,6 +32,9 @@
/obj/effect/particle_effect/foam/metal/MakeSlippery()
return
/obj/effect/particle_effect/foam/metal/smart
name = "smart foam"
/obj/effect/particle_effect/foam/metal/iron
name = "iron foam"
metal = IRON_FOAM
@@ -68,6 +71,20 @@
flick("[icon_state]-disolve", src)
QDEL_IN(src, 5)
/obj/effect/particle_effect/foam/smart/kill_foam() //Smart foam adheres to area borders for walls
STOP_PROCESSING(SSfastprocess, src)
if(metal)
var/turf/T = get_turf(src)
if(isspaceturf(T)) //Block up any exposed space
T.ChangeTurf(/turf/open/floor/plating/foam)
for(var/direction in GLOB.cardinals)
var/turf/cardinal_turf = get_step(T, direction)
if(get_area(cardinal_turf) != get_area(T)) //We're at an area boundary, so let's block off this turf!
new/obj/structure/foamedmetal(T)
break
flick("[icon_state]-disolve", src)
QDEL_IN(src, 5)
/obj/effect/particle_effect/foam/process()
lifetime--
if(lifetime < 1)
@@ -149,6 +166,10 @@
effect_type = /obj/effect/particle_effect/foam/metal
/datum/effect_system/foam_spread/metal/smart
effect_type = /obj/effect/particle_effect/foam/smart
/datum/effect_system/foam_spread/New()
..()
chemholder = new /obj()
@@ -326,6 +326,24 @@
beakers += B2
/obj/item/grenade/chem_grenade/smart_metal_foam
name = "smart metal foam grenade"
desc = "Used for sealing and reconstruction of air breaches."
stage = READY
/obj/item/grenade/chem_grenade/smart_metal_foam/Initialize()
. = ..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminium", 75)
B2.reagents.add_reagent("smart_foaming_agent", 25)
B2.reagents.add_reagent("facid", 25)
beakers += B1
beakers += B2
/obj/item/grenade/chem_grenade/incendiary
name = "incendiary grenade"
desc = "Used for clearing rooms of living things."
+9
View File
@@ -583,6 +583,15 @@
for(var/i in 1 to 7)
new /obj/item/grenade/chem_grenade/metalfoam(src)
/obj/item/storage/box/smart_metal_foam
name = "box of smart metal foam grenades"
desc = "Used to rapidly seal hull breaches. This variety conforms to the walls of its area."
illustration = "flashbang"
/obj/item/storage/box/smart_metal_foam/PopulateContents()
for(var/i in 1 to 7)
new/obj/item/grenade/chem_grenade/smart_metal_foam(src)
/obj/item/storage/box/hug
name = "box of hugs"
desc = "A special box for sensitive people."