Reinforced plating for all your Multi-Z mapping needs (#71576)

## About The Pull Request

This PR adds reinforced plating and a corresponding baseturf_helper,
plating that cannot be deconstructed with the RCD and requires a few
steps to degrade to regular plating.

The plating is designed to serve the same purpose as R-Walls but for
verticality. It shares its heat resistance with reinforced floor and
hull, and in texting it can endure a single C4 blast but not X4 assuming
the floor placed on it is already removed.

It is currently is unused on the existing maps due to it being poor
practice to place secure locations that would justify reinforced floors
on the lower Z levels, however I have spoken to people working on maps
actively at the moment and they have express interest in being able to
use these floors.

The plating can be constructed by using 2 sheets of plasteel on standard
plating and is disassembled using wrench > welding tool > crowbar. The
first stage of deconstruction causes the bolts holding the
reinforcements in place to fall to the Z level below playing a sound and
leaving a cleanable decal, adding a audio-visual alert that someone is
about to come through your ceiling.

UPDATE: I've added a ceiling variant of the baseturf editor, this can be
placed on a lower Z level where it will modify the baseturfs of the Z
level above within the original area. This will make it significantly
easier to ensure that you only cover tiles you want reinforced when
protecting lower Z levels.

If anyone has any recommendations for sounds please tell me and I might
swap them out but I think the two I've chosen work well. Additionally if
anyone is able to make a better sprite for the screws or plates then
that'd be a great help but I think the current ones work well enough.
## Why It's Good For The Game

Currently Multi-Z maps have a very tight restriction on where secure
areas can be put, only allowing for them to be placed on the top Z
level, under more secure Z levels or in exterior satellites and coated
with hulls. This is due to standard plating and/or reinforced floors are
very easy to get through without warning if you bring the right tools.
This PR effectively adds R-Walls but for floors allowing mappers to
properly protect lower Z levels from vertical infiltration methods. This
also adds a visual and audible indictor to the deconstruction of
reinforced floor tiles to bring them more in line with the visuals of
deconstructing a wall.
## Changelog
🆑
add: You can now reinforce plating to protect your department from the
troublemakers upstairs. Station builders might find these useful to put
the stations most secure locations on the lower floors.
imageadd: added sprites for reinforced plating
code: RCD proofing has been variablized and can now be applied to any
floor type instead of just reinforced floors.
/🆑
This commit is contained in:
NamelessFairy
2022-11-29 21:26:26 +00:00
committed by GitHub
parent e07a698ac7
commit 342f0fe34a
7 changed files with 196 additions and 14 deletions
@@ -54,6 +54,11 @@
/obj/effect/decal/cleanable/glass/plastitanium
icon_state = "plastitaniumtiny"
//Screws that are dropped on the Z level below when deconstructing a reinforced floor plate.
/obj/effect/decal/cleanable/glass/plastitanium/screws //I don't know how to sprite scattered screws, this can work until a spriter gets their hands on it.
name = "pile of screws"
desc = "Looks like they fell from the ceiling"
/obj/effect/decal/cleanable/dirt
name = "dirt"
desc = "Someone should clean that up."
+11 -4
View File
@@ -18,6 +18,7 @@
heat_capacity = 10000
tiled_dirt = TRUE
overfloor_placed = TRUE
/// Determines the type of damage overlay that will be used for the tile
@@ -28,6 +29,8 @@
var/floor_tile = null
var/list/broken_states
var/list/burnt_states
/// Determines if you can deconstruct this with a RCD
var/rcd_proof = FALSE
/turf/open/floor/Initialize(mapload)
. = ..()
@@ -330,11 +333,15 @@
new_airlock.update_appearance()
return TRUE
if(RCD_DECONSTRUCT)
var/old_turf_name = name
if(!ScrapeAway(flags = CHANGETURF_INHERIT_AIR))
if(rcd_proof)
balloon_alert(user, "it's too thick!")
return FALSE
to_chat(user, span_notice("You deconstruct the [old_turf_name]."))
return TRUE
else
var/old_turf_name = name
if(!ScrapeAway(flags = CHANGETURF_INHERIT_AIR))
return FALSE
to_chat(user, span_notice("You deconstruct the [old_turf_name]."))
return TRUE
if(RCD_WINDOWGRILLE)
if(locate(/obj/structure/grille) in src)
return FALSE
+161 -3
View File
@@ -15,7 +15,11 @@
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
var/attachment_holes = TRUE
//Can this plating have reinforced floors placed ontop of it
var/attachment_holes = TRUE
//Used for upgrading this into R-Plating
var/upgradable = TRUE
/// If true, will allow tiles to replace us if the tile [wants to] [/obj/item/stack/tile/var/replace_plating].
/// And if our baseturfs are compatible.
@@ -37,7 +41,10 @@
. += span_notice("There are a few attachment holes for a new <i>tile</i> or reinforcement <i>rods</i>.")
else
. += span_notice("You might be able to build ontop of it with some <i>tiles</i>...")
if(upgradable)
. += span_notice("You could probably make this plating more resilient with some plasteel.")
#define PLATE_REINFORCE_COST 2
/turf/open/floor/plating/attackby(obj/item/C, mob/user, params)
if(..())
@@ -72,9 +79,9 @@
tile.place_tile(src, user)
else
if(!iscyborg(user))
to_chat(user, span_warning("This section is too damaged to support a tile! Use a welding tool to fix the damage."))
balloon_alert(user, "too damaged, use a welding tool!")
else
to_chat(user, span_warning("This section is too damaged to support a tile! Use a welding tool or a plating repair tool to fix the damage."))
balloon_alert(user, "too damaged, use a welding or plating repair tool!")
else if(istype(C, /obj/item/cautery/prt)) //plating repair tool
if((broken || burnt) && C.use_tool(src, user, 0, volume=80))
to_chat(user, span_danger("You fix some dents on the broken plating."))
@@ -82,6 +89,23 @@
burnt = FALSE
broken = FALSE
update_appearance()
else if(istype(C, /obj/item/stack/sheet/plasteel) && upgradable) //Reinforcement!
if(!broken && !burnt)
var/obj/item/stack/sheet/sheets = C
if(sheets.get_amount() < PLATE_REINFORCE_COST)
return
balloon_alert(user, "reinforcing plating...")
if(do_after(user, 12 SECONDS, target = src))
if(sheets.get_amount() < PLATE_REINFORCE_COST)
return
sheets.use(PLATE_REINFORCE_COST)
playsound(src, 'sound/machines/creak.ogg', 100, vary = TRUE)
PlaceOnTop(/turf/open/floor/plating/reinforced)
else
if(!iscyborg(user))
balloon_alert(user, "too damaged, use a welding tool!")
else
balloon_alert(user, "too damaged, use a welding or plating repair tool!")
/turf/open/floor/plating/welder_act(mob/living/user, obj/item/I)
@@ -95,6 +119,8 @@
return TRUE
#undef PLATE_REINFORCE_COST
/turf/open/floor/plating/rust_heretic_act()
if(prob(70))
new /obj/effect/temp_visual/glowing_rune(src)
@@ -107,6 +133,7 @@
name = "metal foam plating"
desc = "Thin, fragile flooring created with metal foam."
icon_state = "foam_plating"
upgradable = FALSE
/turf/open/floor/plating/foam/burn_tile()
return //jetfuel can't melt steel foam
@@ -152,3 +179,134 @@
/turf/open/floor/plating/foam/tool_act(mob/living/user, obj/item/I, tool_type)
return
//reinforced plating deconstruction states
#define PLATE_INTACT 0
#define PLATE_BOLTS_LOOSENED 1
#define PLATE_CUT 2
/turf/open/floor/plating/reinforced //RCD Proof plating designed to be used on Multi-Z maps to protect the rooms below
name = "reinforced plating"
desc = "Thick, tough flooring created with multiple layers of metal."
icon_state = "r_plate-0"
thermal_conductivity = 0.025
heat_capacity = INFINITY
baseturfs = /turf/open/floor/plating
allow_replacement = FALSE
rcd_proof = TRUE
upgradable = FALSE
//Used to track which stage of deconstruction the plate is currently in, Intact > Bolts Loosened > Cut
var/deconstruction_state = PLATE_INTACT
/turf/open/floor/plating/reinforced/examine(mob/user)
. += ..()
. += deconstruction_hints(user)
/turf/open/floor/plating/reinforced/proc/deconstruction_hints(mob/user)
switch(deconstruction_state)
if(PLATE_INTACT)
return span_notice("The plating reinforcements are securely <b>bolted</b> in place.")
if(PLATE_BOLTS_LOOSENED)
return span_notice("The plating reinforcement is <i>unscrewed</i> but <b>welded</b> firmly to the plating.")
if(PLATE_CUT)
return span_notice("The plating reinforcements have been <i>sliced through</i> but is still <b>loosly</b> held in place.")
/turf/open/floor/plating/reinforced/update_icon_state()
icon_state = "r_plate-[deconstruction_state]"
return ..()
/turf/open/floor/plating/reinforced/attackby(obj/item/tool_used, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
if (!ISADVANCEDTOOLUSER(user))
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return
//get the user's location
if(!isturf(user.loc))
return //can't do this stuff whilst inside objects and such
add_fingerprint(user)
if(deconstruct_steps(tool_used, user))
return
return ..()
/turf/open/floor/plating/reinforced/proc/deconstruct_steps(obj/item/tool_used, mob/user)
switch(deconstruction_state)
if(PLATE_INTACT)
if(tool_used.tool_behaviour == TOOL_WRENCH)
balloon_alert(user, "loosening bolts...")
if(tool_used.use_tool(src, user, 10 SECONDS, volume=100))
if(!istype(src, /turf/open/floor/plating/reinforced) || deconstruction_state != PLATE_INTACT)
return TRUE
deconstruction_state = PLATE_BOLTS_LOOSENED
update_appearance(UPDATE_ICON)
drop_screws()
balloon_alert(user, "removed bolts")
return TRUE
if(PLATE_BOLTS_LOOSENED)
switch(tool_used.tool_behaviour)
if(TOOL_WELDER)
if(!tool_used.tool_start_check(user, amount=0))
return
balloon_alert(user, "slicing...")
if(tool_used.use_tool(src, user, 15 SECONDS, volume=100))
if(!istype(src, /turf/open/floor/plating/reinforced) || deconstruction_state != PLATE_BOLTS_LOOSENED)
return TRUE
deconstruction_state = PLATE_CUT
update_appearance(UPDATE_ICON)
balloon_alert(user, "sliced through")
return TRUE
if(TOOL_SCREWDRIVER)
balloon_alert(user, "securing bolts...")
if(tool_used.use_tool(src, user, 15 SECONDS, volume=100))
if(!istype(src, /turf/open/floor/plating/reinforced) || deconstruction_state != PLATE_BOLTS_LOOSENED)
return TRUE
deconstruction_state = PLATE_INTACT
update_appearance(UPDATE_ICON)
balloon_alert(user, "secured")
return TRUE
return FALSE
if(PLATE_CUT)
switch(tool_used.tool_behaviour)
if(TOOL_CROWBAR)
balloon_alert(user, "prying off...")
if(tool_used.use_tool(src, user, 20 SECONDS, volume=100))
if(!istype(src, /turf/open/floor/plating/reinforced) || deconstruction_state != PLATE_CUT)
return TRUE
balloon_alert(user, "pried off")
new /obj/item/stack/sheet/plasteel(src, 2)
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
return TRUE
if(TOOL_WELDER)
if(!tool_used.tool_start_check(user, amount=0))
return
balloon_alert(user, "welding back on...")
if(tool_used.use_tool(src, user, 15 SECONDS, volume=100))
if(!istype(src, /turf/open/floor/plating/reinforced) || deconstruction_state != PLATE_CUT)
return TRUE
deconstruction_state = PLATE_BOLTS_LOOSENED
update_appearance(UPDATE_ICON)
balloon_alert(user, "welded back on")
return TRUE
return FALSE
return FALSE
/turf/open/floor/plating/reinforced/proc/drop_screws() //When you start dismantling R-Plates they'll drop their bolts on the Z-level below, a little visible warning.
var/turf/below_turf = get_step_multiz(src, DOWN)
while(istype(below_turf, /turf/open/openspace))
below_turf = get_step_multiz(below_turf, DOWN)
if(!isnull(below_turf) && !isspaceturf(below_turf))
new /obj/effect/decal/cleanable/glass/plastitanium/screws(below_turf)
playsound(src, 'sound/effects/structure_stress/pop3.ogg', 100, vary = TRUE)
#undef PLATE_INTACT
#undef PLATE_BOLTS_LOOSENED
#undef PLATE_CUT
@@ -12,18 +12,13 @@
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
tiled_dirt = FALSE
rcd_proof = TRUE
/turf/open/floor/engine/examine(mob/user)
. += ..()
. += span_notice("The reinforcement rods are <b>wrenched</b> firmly in place.")
/turf/open/floor/engine/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) //no rcd destroying this flooring
if(passed_mode == RCD_DECONSTRUCT)
to_chat(user, span_warning("The flooring is too thick to be regularly deconstructed!"))
return FALSE
return ..()
/turf/open/floor/engine/airless
initial_gas_mix = AIRLESS_ATMOS
+17
View File
@@ -87,6 +87,23 @@
name = "lavaland baseturf editor"
baseturf = /turf/open/lava/smooth/lava_land_surface
/obj/effect/baseturf_helper/reinforced_plating
name = "reinforced plating baseturf editor"
baseturf = /turf/open/floor/plating/reinforced
baseturf_to_replace = list(/turf/open/floor/plating,/turf/open/space,/turf/baseturf_bottom)
//This applies the reinforced plating to the above Z level for every tile in the area where this is placed
/obj/effect/baseturf_helper/reinforced_plating/ceiling
name = "reinforced ceiling plating baseturf editor"
/obj/effect/baseturf_helper/reinforced_plating/ceiling/replace_baseturf(turf/thing)
var/turf/ceiling = get_step_multiz(thing, UP)
if(isnull(ceiling))
CRASH("baseturf helper is attempting to modify the Z level above but there is no Z level above above it.")
if(isspaceturf(ceiling) || istype(ceiling, /turf/open/openspace))
return
return ..(ceiling)
/obj/effect/mapping_helpers
icon = 'icons/effects/mapping_helpers.dmi'
Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 332 KiB

+1 -1
View File
@@ -2066,7 +2066,7 @@
#include "code\game\turfs\open\floor\mineral_floor.dm"
#include "code\game\turfs\open\floor\misc_floor.dm"
#include "code\game\turfs\open\floor\plating.dm"
#include "code\game\turfs\open\floor\reinf_floor.dm"
#include "code\game\turfs\open\floor\reinforced_floor.dm"
#include "code\game\turfs\open\floor\plating\misc_plating.dm"
#include "code\game\turfs\open\space\space.dm"
#include "code\game\turfs\open\space\transit.dm"