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

View File

@@ -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()