mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
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:
co-authored by
AffectedArc07
moxian
parent
b35dcc6383
commit
970675a2c0
@@ -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, "<span class='warning'>You suddenly feel [pick("sick and tired", "tired and confused", "nauseated", "dizzy")].</span>")
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.<br>\
|
||||
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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user