diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm
index 603e2834f23..460ac5bd897 100644
--- a/code/game/objects/effects/decals/cleanable/misc.dm
+++ b/code/game/objects/effects/decals/cleanable/misc.dm
@@ -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."
diff --git a/code/game/turfs/open/floor.dm b/code/game/turfs/open/floor.dm
index 7d3cf76cbd7..73771bb32d5 100644
--- a/code/game/turfs/open/floor.dm
+++ b/code/game/turfs/open/floor.dm
@@ -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
diff --git a/code/game/turfs/open/floor/plating.dm b/code/game/turfs/open/floor/plating.dm
index 20992307721..1561fd13512 100644
--- a/code/game/turfs/open/floor/plating.dm
+++ b/code/game/turfs/open/floor/plating.dm
@@ -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 tile or reinforcement rods.")
else
. += span_notice("You might be able to build ontop of it with some tiles...")
+ 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 bolted in place.")
+ if(PLATE_BOLTS_LOOSENED)
+ return span_notice("The plating reinforcement is unscrewed but welded firmly to the plating.")
+ if(PLATE_CUT)
+ return span_notice("The plating reinforcements have been sliced through but is still loosly 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
diff --git a/code/game/turfs/open/floor/reinf_floor.dm b/code/game/turfs/open/floor/reinforced_floor.dm
similarity index 95%
rename from code/game/turfs/open/floor/reinf_floor.dm
rename to code/game/turfs/open/floor/reinforced_floor.dm
index 15c40aaca8a..f58172e4ceb 100644
--- a/code/game/turfs/open/floor/reinf_floor.dm
+++ b/code/game/turfs/open/floor/reinforced_floor.dm
@@ -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 wrenched 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
diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm
index 9f442c05cb7..867d305b343 100644
--- a/code/modules/mapping/mapping_helpers.dm
+++ b/code/modules/mapping/mapping_helpers.dm
@@ -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'
diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi
index fb41634708b..219c55db2a6 100644
Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index 3e752cf7408..4859c1a9a07 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -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"