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

@@ -1067,9 +1067,9 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access_txt = "11" //Engineering Equipment access
products = list(/obj/item/clothing/glasses/meson/engine = 2, /obj/item/device/multitool = 4, /obj/item/electronics/airlock = 10, /obj/item/electronics/apc = 10, /obj/item/electronics/airalarm = 10, /obj/item/stock_parts/cell/high = 10, /obj/item/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
products = list(/obj/item/clothing/glasses/meson/engine = 2, /obj/item/device/multitool = 4, /obj/item/electronics/airlock = 10, /obj/item/electronics/apc = 10, /obj/item/electronics/airalarm = 10, /obj/item/stock_parts/cell/high = 10, /obj/item/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5, /obj/item/grenade/chem_grenade/smart_metal_foam = 10)
contraband = list(/obj/item/stock_parts/cell/potato = 3)
premium = list(/obj/item/storage/belt/utility = 3)
premium = list(/obj/item/storage/belt/utility = 3, /obj/item/storage/box/smart_metal_foam = 1)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
resistance_flags = FIRE_PROOF

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

View File

@@ -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."

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."

View File

@@ -24,7 +24,7 @@
..()
//This is so damaged or burnt tiles or platings don't get remembered as the default tile
var/static/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4",
"damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2",
"damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2", "foam_plating",
"platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2",
"light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken",
"light_on_broken","light_off","wall_thermite","grass", "sand",

View File

@@ -4,6 +4,7 @@
* Airless
* Airless plating
* Engine floor
* Foam plating
*/
// note that plating and engine floor do not call their parent attackby, unlike other flooring
// this is done in order to avoid inheriting the crowbar attackby
@@ -69,3 +70,35 @@
icon_state = icon_plating
burnt = 0
broken = 0
/turf/open/floor/plating/foam
name = "metal foam plating"
desc = "Thin, fragile flooring created with metal foam."
icon_state = "foam_plating"
broken_states = list("foam_plating")
burnt_states = list("foam_plating")
/turf/open/floor/plating/foam/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stack/tile/plasteel))
var/obj/item/stack/tile/plasteel/P = I
if(P.use(1))
var/obj/L = locate(/obj/structure/lattice) in src
if(L)
qdel(L)
to_chat(user, "<span class='notice'>You reinforce the foamed plating with tiling.</span>")
playsound(src, 'sound/weapons/Genhit.ogg', 50, TRUE)
ChangeTurf(/turf/open/floor/plating)
else
playsound(src, 'sound/weapons/tap.ogg', 100, TRUE) //The attack sound is muffled by the foam itself
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(prob(I.force * 20 - 25))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>", \
"<span class='danger'>You smash through [src] with [I]!</span>")
ChangeTurf(baseturf)
else
to_chat(user, "<span class='danger'>You hit [src], to no effect!</span>")
/turf/open/floor/plating/foam/ex_act()
..()
ChangeTurf(baseturf)

View File

@@ -1079,6 +1079,14 @@
color = "#664B63" // rgb: 102, 75, 99
taste_description = "metal"
/datum/reagent/smart_foaming_agent //Smart foaming agent. Functions similarly to metal foam, but conforms to walls.
name = "Smart foaming agent"
id = "smart_foaming_agent"
description = "A agent that yields metallic foam which conforms to area boundaries when mixed with light metal and a strong acid."
reagent_state = SOLID
color = "#664B63" // rgb: 102, 75, 99
taste_description = "metal"
/datum/reagent/ammonia
name = "Ammonia"
id = "ammonia"

View File

@@ -466,6 +466,20 @@
s.start()
holder.clear_reagents()
/datum/chemical_reaction/smart_foam
name = "Smart Metal Foam"
id = "smart_metal_foam"
required_reagents = list("aluminium" = 3, "smart_foaming_agent" = 1, "facid" = 1)
mob_react = TRUE
/datum/chemical_reaction/smart_foam/on_reaction(datum/reagents/holder, created_volume)
var/turf/location = get_turf(holder.my_atom)
location.visible_message("<span class='danger'>The solution spews out metallic foam!</span>")
var/datum/effect_system/foam_spread/metal/smart/s = new()
s.set_up(created_volume * 5, location, holder, TRUE)
s.start()
holder.clear_reagents()
/datum/chemical_reaction/ironfoam
name = "Iron Foam"
id = "ironlfoam"
@@ -487,6 +501,13 @@
results = list("foaming_agent" = 1)
required_reagents = list("lithium" = 1, "hydrogen" = 1)
/datum/chemical_reaction/smart_foaming_agent
name = "Smart foaming Agent"
id = "smart_foaming_agent"
results = list("smart_foaming_agent" = 3)
required_reagents = list("foaming_agent" = 3, "acetone" = 1, "iron" = 1)
mix_message = "The solution mixes into a frothy metal foam and conforms to the walls of its container."
/////////////////////////////// Cleaning and hydroponics /////////////////////////////////////////////////

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 KiB

After

Width:  |  Height:  |  Size: 442 KiB