diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index d42cd73988e..15fc1901eac 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -927,10 +927,11 @@ steam.start() -- spawns the effect
if(metal)
var/turf/T = get_turf(src)
if(istype(T, /turf/space))
- var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
- if(L)
- qdel(L)
- T.ChangeTurf(/turf/simulated/floor/plating/airless)
+ T.ChangeTurf(/turf/simulated/floor/plating/metalfoam)
+ var/turf/simulated/floor/plating/metalfoam/MF = get_turf(src)
+ if(istype(MF))
+ MF.metal = metal
+ MF.update_icon()
var/obj/structure/foamedmetal/M = new(src.loc)
M.metal = metal
@@ -1046,6 +1047,9 @@ steam.start() -- spawns the effect
// wall formed by metal foams
// dense and opaque, but easy to break
+var/const/MFOAM_ALUMINUM = 1
+var/const/MFOAM_IRON = 2
+
/obj/structure/foamedmetal
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
@@ -1054,7 +1058,7 @@ steam.start() -- spawns the effect
anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
- var/metal = 1 // 1=aluminum, 2=iron
+ var/metal = MFOAM_ALUMINUM
New()
..()
@@ -1071,7 +1075,7 @@ steam.start() -- spawns the effect
move_update_air(T)
proc/updateicon()
- if(metal == 1)
+ if(metal == MFOAM_ALUMINUM)
icon_state = "metalfoam"
else
icon_state = "ironfoam"
@@ -1088,12 +1092,10 @@ steam.start() -- spawns the effect
qdel(src)
attack_hand(var/mob/user)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
if ((HULK in user.mutations) || (prob(75 - metal*25)))
- user << "\blue You smash through the metal foam wall."
- for(var/mob/O in oviewers(user))
- if ((O.client && !( O.blinded )))
- O << "\red [user] smashes through the foamed metal."
-
+ user.visible_message("[user] smashes through \the [src].", "You smash through \the [src].")
qdel(src)
else
user << "\blue You hit the metal foam but bounce off it."
@@ -1101,26 +1103,36 @@ steam.start() -- spawns the effect
attackby(var/obj/item/I, var/mob/user, params)
-
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
if (istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
G.affecting.loc = src.loc
- for(var/mob/O in viewers(src))
- if (O.client)
- O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
+ user.visible_message("[G.assailant] smashes [G.affecting] through the foamed metal wall.")
qdel(I)
qdel(src)
return
if(prob(I.force*20 - metal*25))
- user << "\blue You smash through the foamed metal with \the [I]."
- for(var/mob/O in oviewers(user))
- if ((O.client && !( O.blinded )))
- O << "\red [user] smashes through the foamed metal."
+ user.visible_message("[user] smashes through the foamed metal with \the [I].", "You smash through the foamed metal with \the [I].")
qdel(src)
else
user << "\blue You hit the metal foam to no effect."
+ attack_animal(mob/living/simple_animal/M)
+ M.do_attack_animation(src)
+ if(M.melee_damage_upper == 0)
+ M.visible_message("[M] nudges \the [src].")
+ else
+ if(M.attack_sound)
+ playsound(loc, M.attack_sound, 50, 1, 1)
+ M.visible_message("\The [M] [M.attacktext] [src]!")
+ qdel(src)
+
+ attack_alien(mob/living/carbon/alien/humanoid/M)
+ M.visible_message("[M] tears apart \the [src]!");
+ qdel(src)
+
CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(air_group) return 0
return !density
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index 2f18239e3df..7e4eef04c26 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -2,7 +2,7 @@
var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4",
"damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2",
"platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2",
- "warnplate", "warnplatecorner",
+ "warnplate", "warnplatecorner","metalfoam", "ironfoam",
"light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken",
"light_on_broken","light_off","wall_thermite","grass1","grass2","grass3","grass4",
"asteroid","asteroid_dug",
diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm
index 0e900329922..21a396e8ec2 100644
--- a/code/game/turfs/simulated/floor/plating.dm
+++ b/code/game/turfs/simulated/floor/plating.dm
@@ -28,11 +28,11 @@
if(istype(C, /obj/item/stack/rods))
if(broken || burnt)
user << "Repair the plating first!"
- return
+ return 1
var/obj/item/stack/rods/R = C
if (R.get_amount() < 2)
user << "You need two rods to make a reinforced floor!"
- return
+ return 1
else
user << "You begin reinforcing the floor..."
if(do_after(user, 30, target = src))
@@ -41,7 +41,7 @@
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
user << "You reinforce the floor."
- return
+ return 1
else if(istype(C, /obj/item/stack/tile))
if(!broken && !burnt)
@@ -52,6 +52,7 @@
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
else
user << "This section is too damaged to support a tile! Use a welder to fix the damage."
+ return 1
else if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = C
@@ -62,6 +63,7 @@
icon_state = icon_plating
burnt = 0
broken = 0
+ return 1
/turf/simulated/floor/plating/airless
icon_state = "plating"
@@ -232,6 +234,56 @@
CW.update_icon(0)
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
+/turf/simulated/floor/plating/metalfoam
+ name = "foamed metal plating"
+ icon_state = "metalfoam"
+ var/metal = MFOAM_ALUMINUM
+
+/turf/simulated/floor/plating/metalfoam/iron
+ icon_state = "ironfoam"
+ metal = MFOAM_IRON
+
+/turf/simulated/floor/plating/metalfoam/update_icon()
+ switch(metal)
+ if(MFOAM_ALUMINUM)
+ icon_state = "metalfoam"
+ if(MFOAM_IRON)
+ icon_state = "ironfoam"
+
+/turf/simulated/floor/plating/metalfoam/attackby(var/obj/item/C, mob/user, params)
+ if(..())
+ return 1
+ else if(istype(C) && C.force)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.do_attack_animation(src)
+ var/smash_prob = max(0, C.force*17 - metal*25) // A crowbar will have a 60% chance of a breakthrough on alum, 35% on iron
+ if(prob(smash_prob))
+ // YAR BE CAUSIN A HULL BREACH
+ visible_message("[user] smashes through \the [src] with \the [C]!")
+ smash()
+ else
+ visible_message("[user]'s [C.name] bounces against \the [src]!")
+
+/turf/simulated/floor/plating/metalfoam/attack_animal(mob/living/simple_animal/M)
+ M.do_attack_animation(src)
+ if(M.melee_damage_upper == 0)
+ M.visible_message("[M] nudges \the [src].")
+ else
+ if(M.attack_sound)
+ playsound(loc, M.attack_sound, 50, 1, 1)
+ M.visible_message("\The [M] [M.attacktext] [src]!")
+ smash(src)
+
+/turf/simulated/floor/plating/metalfoam/attack_alien(mob/living/carbon/alien/humanoid/M)
+ M.visible_message("[M] tears apart \the [src]!")
+ smash(src)
+
+/turf/simulated/floor/plating/metalfoam/burn_tile()
+ smash()
+
+/turf/simulated/floor/plating/metalfoam/proc/smash()
+ ChangeTurf(/turf/space)
+
/turf/simulated/floor/plasteel/airless
name = "airless floor"
oxygen = 0.01
diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi
index bcc533187b2..98e1f035e0a 100644
Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ