Refactors rusted walls and their spawners (#17969)

* refactors rusted walls and their spawners

* tidies this up a bit

* moxian review

* Apply suggestions from code review

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: moxian <moxian@users.noreply.github.com>

* Update code/game/turfs/simulated/walls.dm

Co-authored-by: moxian <moxian@users.noreply.github.com>

* more things

* Update code/game/turfs/simulated/walls.dm

Co-authored-by: moxian <moxian@users.noreply.github.com>

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: moxian <moxian@users.noreply.github.com>
This commit is contained in:
S34N
2022-06-16 14:47:29 +01:00
committed by GitHub
co-authored by AffectedArc07 moxian
parent b35dcc6383
commit 970675a2c0
9 changed files with 61 additions and 22 deletions
@@ -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"