From e41ad0c9469de2b7d09ec58076abfc676cb36cbb Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Fri, 15 Apr 2016 16:41:33 +0200 Subject: [PATCH] Reinforced Walls Lowers amount needed for building a reinforced wall from a girder from four to two sheets. Gets rid of rod products from dismantling a reinforced wall. Adds one more extra step for undoing the deconstruction. --- code/game/objects/structures/girders.dm | 7 +++--- code/game/turfs/simulated/wall_attacks.dm | 30 +++++++++++++---------- code/game/turfs/simulated/walls.dm | 3 ++- code/modules/materials/materials.dm | 5 ++-- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 867dada6d9..9c103a8ed2 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -143,7 +143,8 @@ user << "You begin adding the plating..." - if(!do_after(user,40) || !S.use(2)) + var/amount_to_use = reinf_material ? 1 : 2 + if(!do_after(user,40) || !S.use(amount_to_use)) return 1 //once we've gotten this far don't call parent attackby() if(anchored) @@ -167,7 +168,7 @@ user << "\The [src] is already reinforced." return 0 - if(S.get_amount() < 2) + if(S.get_amount() < 1) user << "There isn't enough material here to reinforce the girder." return 0 @@ -177,7 +178,7 @@ return 0 user << "Now reinforcing..." - if (!do_after(user,40) || !S.use(2)) + if (!do_after(user,40) || !S.use(1)) return 1 //don't call parent attackby() past this point user << "You added reinforcement!" diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 23ffac6465..ffc2297d02 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -217,8 +217,7 @@ if (istype(W, /obj/item/weapon/wirecutters)) playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) construction_stage = 5 - new /obj/item/stack/rods( src ) - user << "You cut the outer grille." + user << "You cut through the outer grille." update_icon() return if(5) @@ -229,16 +228,13 @@ return construction_stage = 4 update_icon() - user << "You remove the support lines." + user << "You unscrew the support lines." + return + else if (istype(W, /obj/item/weapon/wirecutters)) + construction_stage = 6 + user << "You mend the outer grille." + update_icon() return - else if( istype(W, /obj/item/stack/rods) ) - var/obj/item/stack/O = W - if(O.get_amount()>0) - O.use(1) - construction_stage = 6 - update_icon() - user << "You replace the outer grille." - return if(4) var/cut_cover if(istype(W,/obj/item/weapon/weldingtool)) @@ -261,6 +257,15 @@ update_icon() user << "You press firmly on the cover, dislodging it." return + else if (istype(W, /obj/item/weapon/screwdriver)) + user << "You begin screwing down the support lines." + playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) + if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 4) + return + construction_stage = 5 + update_icon() + user << "You screw down the support lines." + return if(3) if (istype(W, /obj/item/weapon/crowbar)) user << "You struggle to pry off the cover." @@ -299,8 +304,7 @@ return construction_stage = 0 update_icon() - new /obj/item/stack/rods(src) - user << "The support rods drop out as you cut them loose from the frame." + user << "The slice through the support rods." return if(0) if(istype(W, /obj/item/weapon/crowbar)) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 16235a72fc..db48305926 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -162,7 +162,8 @@ reinf_material.place_dismantled_girder(src, reinf_material) else material.place_dismantled_girder(src) - material.place_dismantled_product(src,devastated) + if(!devastated) + material.place_dismantled_product(src) for(var/obj/O in src.contents) //Eject contents! if(istype(O,/obj/structure/sign/poster)) diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 70f69be834..920b751117 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -195,9 +195,8 @@ var/list/name_to_material // General wall debris product placement. // Not particularly necessary aside from snowflakey cult girders. -/material/proc/place_dismantled_product(var/turf/target,var/is_devastated) - for(var/x=1;x<(is_devastated?2:3);x++) - place_sheet(target) +/material/proc/place_dismantled_product(var/turf/target) + place_sheet(target) // Debris product. Used ALL THE TIME. /material/proc/place_sheet(var/turf/target)