diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
index 011a6b4fdae..02d290adb24 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
@@ -334,18 +334,18 @@
/turf/simulated/wall/defile()
..()
- if(prob(15))
+ if(prob(15) && !rusted)
new/obj/effect/temp_visual/revenant(loc)
- ChangeTurf(/turf/simulated/wall/rust)
+ rust()
/turf/simulated/wall/indestructible/defile()
return
/turf/simulated/wall/r_wall/defile()
..()
- if(prob(15))
+ if(prob(15) && !rusted)
new/obj/effect/temp_visual/revenant(loc)
- ChangeTurf(/turf/simulated/wall/r_wall/rust)
+ rust()
/mob/living/carbon/human/defile()
to_chat(src, "You suddenly feel [pick("sick and tired", "tired and confused", "nauseated", "dizzy")].")
diff --git a/code/game/objects/effects/spawners/random_spawners.dm b/code/game/objects/effects/spawners/random_spawners.dm
index 2dd9ff015c2..3966def5f56 100644
--- a/code/game/objects/effects/spawners/random_spawners.dm
+++ b/code/game/objects/effects/spawners/random_spawners.dm
@@ -61,19 +61,36 @@
/datum/nothing = 5,
/obj/effect/decal/cleanable/blood/oil = 1)
+/obj/effect/spawner/random_spawners/proc/rustify(turf/T)
+ var/turf/simulated/wall/W = T
+ if(istype(W) && !W.rusted)
+ W.rust()
+
/obj/effect/spawner/random_spawners/wall_rusted_probably
name = "rusted wall probably"
icon_state = "rust"
- result = list(
- /turf/simulated/wall = 2,
- /turf/simulated/wall/rust = 7)
+
+/obj/effect/spawner/random_spawners/wall_rusted_probably/randspawn(turf/T)
+ if(prob(75))
+ rustify(T)
+ qdel(src)
/obj/effect/spawner/random_spawners/wall_rusted_maybe
name = "rusted wall maybe"
icon_state = "rust"
- result = list(
- /turf/simulated/wall = 7,
- /turf/simulated/wall/rust = 1)
+
+/obj/effect/spawner/random_spawners/wall_rusted_maybe/randspawn(turf/T)
+ if(prob(25))
+ rustify(T)
+ qdel(src)
+
+/obj/effect/spawner/random_spawners/wall_rusted_always
+ name = "rusted wall always"
+ icon_state = "rust"
+
+/obj/effect/spawner/random_spawners/wall_rusted_always/randspawn(turf/T)
+ rustify(T)
+ qdel(src)
/obj/effect/spawner/random_spawners/cobweb_left_frequent
name = "cobweb left frequent"
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 7c585b31dde..86e583c64a5 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -40,6 +40,10 @@
var/sheet_type = /obj/item/stack/sheet/metal
var/sheet_amount = 2
var/girder_type = /obj/structure/girder
+ /// Are we a rusty wall or not?
+ var/rusted = FALSE
+ /// Have we got a rusty overlay?
+ var/rusted_overlay
/turf/simulated/wall/Initialize(mapload)
. = ..()
@@ -82,11 +86,23 @@
return "You can deconstruct this by welding it, and then wrenching the girder.
\
You can build a wall by using metal sheets and making a girder, then adding more metal or plasteel."
+/// Apply rust effects to the wall
+/turf/simulated/wall/proc/rust()
+ if(rusted)
+ return
+ name = "rusted [name]"
+ rusted = TRUE
+ update_icon()
+
/turf/simulated/wall/proc/update_icon()
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
QUEUE_SMOOTH(src)
+ if(rusted && !rusted_overlay)
+ rusted_overlay = icon('icons/turf/overlays.dmi', pick("rust", "rust2"), pick(NORTH, SOUTH, EAST, WEST))
+ add_overlay(rusted_overlay)
+
if(!damage)
if(damage_overlay)
overlays -= damage_overlays[damage_overlay]
diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm
index dcd00f1221c..c0c39e424b7 100644
--- a/code/game/turfs/simulated/walls_misc.dm
+++ b/code/game/turfs/simulated/walls_misc.dm
@@ -34,20 +34,26 @@
new sheet_type(get_turf(src), sheet_amount)
/turf/simulated/wall/rust
- name = "rusted wall"
- desc = "A rusted metal wall."
- icon = 'icons/turf/walls/rusty_wall.dmi'
- icon_state = "rusty_wall-0"
- base_icon_state = "rusty_wall"
- smoothing_flags = SMOOTH_BITMASK
+ name = "!deprecated, use rust spawner! rusted wall"
+ icon_state = "outdated"
+ icon = 'icons/turf/walls.dmi'
+ smoothing_flags = null
+
+/turf/simulated/wall/rust/Initialize(mapload)
+ . = ..()
+ var/turf/simulated/wall/target = ChangeTurf(/turf/simulated/wall)
+ target.rust()
/turf/simulated/wall/r_wall/rust
- name = "rusted reinforced wall"
- desc = "A huge chunk of rusted reinforced metal."
- icon = 'icons/turf/walls/rusty_reinforced_wall.dmi'
- icon_state = "rusty_reinforced_wall-0"
- base_icon_state = "rusty_reinforced_wall"
- smoothing_flags = SMOOTH_BITMASK
+ name = "!deprecated, use rust spawner! rusted reinforced wall"
+ icon = 'icons/turf/walls.dmi'
+ icon_state = "outdated"
+ smoothing_flags = null
+
+/turf/simulated/wall/r_wall/rust/Initialize(mapload)
+ . = ..()
+ var/turf/simulated/wall/r_wall/target = ChangeTurf(/turf/simulated/wall/r_wall)
+ target.rust()
//Clockwork walls
/turf/simulated/wall/clockwork
diff --git a/icons/turf/overlays.dmi b/icons/turf/overlays.dmi
index add518c139b..5048ce5b92d 100644
Binary files a/icons/turf/overlays.dmi and b/icons/turf/overlays.dmi differ
diff --git a/icons/turf/walls.dmi b/icons/turf/walls.dmi
index fc17e289aad..c67dcd2703a 100644
Binary files a/icons/turf/walls.dmi and b/icons/turf/walls.dmi differ
diff --git a/icons/turf/walls/reinforced_wall.dmi b/icons/turf/walls/reinforced_wall.dmi
index 35d64734e14..c7b05315d50 100644
Binary files a/icons/turf/walls/reinforced_wall.dmi and b/icons/turf/walls/reinforced_wall.dmi differ
diff --git a/icons/turf/walls/rusty_reinforced_wall.dmi b/icons/turf/walls/rusty_reinforced_wall.dmi
deleted file mode 100644
index e2636950d27..00000000000
Binary files a/icons/turf/walls/rusty_reinforced_wall.dmi and /dev/null differ
diff --git a/icons/turf/walls/rusty_wall.dmi b/icons/turf/walls/rusty_wall.dmi
deleted file mode 100644
index ca27a10fe07..00000000000
Binary files a/icons/turf/walls/rusty_wall.dmi and /dev/null differ