diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index cb86086199c..b8f7d798d3c 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -163,13 +163,14 @@
// dense and opaque, but easy to break
/obj/structure/foamedmetal
- icon = 'icons/effects/effects.dmi'
- icon_state = "metalfoam"
- density = 1
- opacity = 1 // changed in New()
- anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
+ icon = 'icons/effects/effects.dmi'
+ icon_state = "metalfoam"
+ density = TRUE
+ opacity = TRUE // changed in New()
+ anchored = TRUE
+ max_integrity = 20
var/metal = MFOAM_ALUMINUM
/obj/structure/foamedmetal/Initialize()
@@ -177,7 +178,6 @@
air_update_turf(1)
/obj/structure/foamedmetal/Destroy()
- density = 0
air_update_turf(1)
return ..()
@@ -186,65 +186,31 @@
..()
move_update_air(T)
+/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
+ playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
+
/obj/structure/foamedmetal/proc/updateicon()
if(metal == MFOAM_ALUMINUM)
icon_state = "metalfoam"
+ max_integrity = 20
+ obj_integrity = max_integrity
else
icon_state = "ironfoam"
-
-/obj/structure/foamedmetal/ex_act(severity)
- qdel(src)
-
-/obj/structure/foamedmetal/blob_act()
- qdel(src)
-
-/obj/structure/foamedmetal/bullet_act()
- if(metal==MFOAM_ALUMINUM || prob(50))
- qdel(src)
+ max_integrity = 50
+ obj_integrity = max_integrity
/obj/structure/foamedmetal/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
if(prob(75 - metal * 25))
- user.visible_message("[user] smashes through \the [src].", "You smash through \the [src].")
+ user.visible_message("[user] smashes through [src].", "You smash through [src].")
qdel(src)
else
to_chat(user, "You hit the metal foam but bounce off it.")
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
-/obj/structure/foamedmetal/attackby(obj/item/I, mob/user, params)
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src)
- if(istype(I, /obj/item/grab))
- var/obj/item/grab/G = I
- G.affecting.loc = src.loc
- 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.visible_message("[user] smashes through the foamed metal with \the [I].", "You smash through the foamed metal with \the [I].")
- qdel(src)
- else
- to_chat(user, "You hit the metal foam to no effect.")
-
-/obj/structure/foamedmetal/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)
-
-/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M)
- M.visible_message("[M] tears apart \the [src]!");
- qdel(src)
-
-/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
+/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target)
return !density
/obj/structure/foamedmetal/CanAtmosPass()
- return !density
+ return !density
\ No newline at end of file