From eea890cb5da361aa02fd8713de454cd78b3a0b5b Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Sun, 7 May 2017 18:31:56 +0400 Subject: [PATCH] add rwall construction defines, examine hints for (de)con, fix some spelling and grammar --- code/__DEFINES/construction.dm | 9 ++ code/game/turfs/simulated/walls_reinforced.dm | 102 ++++++++++-------- 2 files changed, 69 insertions(+), 42 deletions(-) diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index fb3ee4a7373..ae8c86eeda3 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -9,6 +9,15 @@ #define GIRDER_DISPLACED 3 #define GIRDER_DISASSEMBLED 4 +//rwall construction states +#define INTACT 0 +#define SUPPORT_LINES 1 +#define COVER 2 +#define CUT_COVER 3 +#define BOLTS 4 +#define SUPPORT_RODS 5 +#define SHEATH 6 + //plastic flaps construction states #define PLASTIC_FLAPS_NORMAL 0 #define PLASTIC_FLAPS_DETACHED 1 diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index eeec1c7a8bd..613b9d4fcad 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -1,6 +1,6 @@ /turf/simulated/wall/r_wall name = "reinforced wall" - desc = "A huge chunk of reinforced metal used to seperate rooms." + desc = "A huge chunk of reinforced metal used to separate rooms." icon = 'icons/turf/walls/reinforced_wall.dmi' icon_state = "r_wall" opacity = 1 @@ -12,9 +12,27 @@ sheet_type = /obj/item/stack/sheet/plasteel sheet_amount = 1 girder_type = /obj/structure/girder/reinforced - var/d_state = 0 + var/d_state = INTACT var/can_be_reinforced = 1 +/turf/simulated/wall/r_wall/examine(mob/user) + ..() + switch(d_state) + if(INTACT) + to_chat(user, "The outer grille is fully intact.") + if(SUPPORT_LINES) + to_chat(user, "The outer grille has been cut, and the support lines are screwed securely to the outer cover.") + if(COVER) + to_chat(user, "The support lines have been unscrewed, and the metal cover is welded firmly in place.") + if(CUT_COVER) + to_chat(user, "The metal cover has been sliced through, and is connected loosely to the girder.") + if(BOLTS) + to_chat(user, "The outer cover has been pried away, and the bolts anchoring the support rods are wrenched in place.") + if(SUPPORT_RODS) + to_chat(user, "The bolts anchoring the support rods have been loosened, but are still welded firmly to the girder.") + if(SHEATH) + to_chat(user, "The support rods have been sliced through, and the outer sheath is connected loosely to the girder.") + /turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob, params) user.changeNext_move(CLICK_CD_MELEE) if(!user.IsAdvancedToolUser()) @@ -82,22 +100,22 @@ //DECONSTRUCTION switch(d_state) - if(0) + if(INTACT) if(istype(W, /obj/item/weapon/wirecutters)) playsound(src, W.usesound, 100, 1) - d_state = 1 + d_state = SUPPORT_LINES update_icon() new /obj/item/stack/rods(src) to_chat(user, "You cut the outer grille.") return - if(1) + if(SUPPORT_LINES) if(istype(W, /obj/item/weapon/screwdriver)) - to_chat(user, "You begin removing the support lines.") + to_chat(user, "You begin removing the support lines...") playsound(src, W.usesound, 100, 1) - if(do_after(user, 40 * W.toolspeed, target = src) && d_state == 1) - d_state = 2 + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == SUPPORT_LINES) + d_state = COVER update_icon() to_chat(user, "You remove the support lines.") return @@ -106,22 +124,22 @@ else if(istype(W, /obj/item/stack/rods)) var/obj/item/stack/O = W if(O.use(1)) - d_state = 0 + d_state = INTACT update_icon() src.icon_state = "r_wall" to_chat(user, "You replace the outer grille.") else to_chat(user, "You don't have enough rods for that!") - if(2) + if(COVER) if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) - to_chat(user, "You begin slicing through the metal cover.") + to_chat(user, "You begin slicing through the metal cover...") playsound(src, WT.usesound, 100, 1) - if(do_after(user, 60 * WT.toolspeed, target = src) && d_state == 2) - d_state = 3 + if(do_after(user, 60 * WT.toolspeed, target = src) && d_state == COVER) + d_state = CUT_COVER update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") @@ -130,46 +148,46 @@ return if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) - to_chat(user, "You begin slicing through the metal cover.") + to_chat(user, "You begin slicing through the metal cover...") playsound(src, W.usesound, 100, 1) - if(do_after(user, 40 * W.toolspeed, target = src) && d_state == 2) - d_state = 3 + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == COVER) + d_state = CUT_COVER update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") return - if(3) + if(CUT_COVER) if(istype(W, /obj/item/weapon/crowbar)) - to_chat(user, "You struggle to pry off the cover.") + to_chat(user, "You struggle to pry off the cover...") playsound(src, W.usesound, 100, 1) - if(do_after(user, 100 * W.toolspeed, target = src) && d_state == 3) - d_state = 4 + if(do_after(user, 100 * W.toolspeed, target = src) && d_state == CUT_COVER) + d_state = BOLTS update_icon() to_chat(user, "You pry off the cover.") return - if(4) + if(BOLTS) if(istype(W, /obj/item/weapon/wrench)) - to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame.") + to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame...") playsound(src, W.usesound, 100, 1) - if(do_after(user, 40 * W.toolspeed, target = src) && d_state == 4) - d_state = 5 + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == BOLTS) + d_state = SUPPORT_RODS update_icon() to_chat(user, "You remove the bolts anchoring the support rods.") return - if(5) + if(SUPPORT_RODS) if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) - to_chat(user, "You begin slicing through the support rods.") + to_chat(user, "You begin slicing through the support rods...") playsound(src, WT.usesound, 100, 1) - if(do_after(user, 100 * WT.toolspeed, target = src) && d_state == 5) - d_state = 6 + if(do_after(user, 100 * WT.toolspeed, target = src) && d_state == SUPPORT_RODS) + d_state = SHEATH update_icon() new /obj/item/stack/rods(src) to_chat(user, "The support rods drop out as you cut them loose from the frame.") @@ -178,22 +196,22 @@ return if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) - to_chat(user, "You begin slicing through the support rods.") + to_chat(user, "You begin slicing through the support rods...") playsound(src, W.usesound, 100, 1) - if(do_after(user, 70 * W.toolspeed, target = src) && d_state == 5) - d_state = 6 + if(do_after(user, 70 * W.toolspeed, target = src) && d_state == SUPPORT_RODS) + d_state = SHEATH update_icon() new /obj/item/stack/rods( src ) to_chat(user, "The support rods drop out as you cut them loose from the frame.") return - if(6) + if(SHEATH) if(istype(W, /obj/item/weapon/crowbar)) - to_chat(user, "You struggle to pry off the outer sheath.") + to_chat(user, "You struggle to pry off the outer sheath...") playsound(src, W.usesound, 100, 1) - if(do_after(user, 100 * W.toolspeed, target = src) && d_state == 6) + if(do_after(user, 100 * W.toolspeed, target = src) && d_state == SHEATH) to_chat(user, "You pry off the outer sheath.") dismantle_wall() return @@ -202,14 +220,14 @@ //DRILLING if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill)) - to_chat(user, "You begin to drill though the wall.") + to_chat(user, "You begin to drill though the wall...") if(do_after(user, 800 * W.toolspeed, target = src)) // Diamond drill has 0.25 toolspeed, so 200 to_chat(user, "Your drill tears through the last of the reinforced plating.") dismantle_wall() if(istype(W,/obj/item/weapon/pickaxe/drill/jackhammer)) - to_chat(user, "You begin to disintegrate the wall.") + to_chat(user, "You begin to disintegrate the wall...") if(do_after(user, 1000 * W.toolspeed, target = src)) // Jackhammer has 0.1 toolspeed, so 100 to_chat(user, "Your sonic jackhammer disintegrates the reinforced plating.") @@ -219,14 +237,14 @@ else if(istype(W, /obj/item/stack/sheet/metal) && d_state) var/obj/item/stack/sheet/metal/MS = W - to_chat(user, "You begin patching-up the wall with \a [MS].") + to_chat(user, "You begin patching-up the wall with \a [MS]...") if(do_after(user, max(20 * d_state, 100) * MS.toolspeed, target = src) && d_state) if(!MS.use(1)) to_chat(user, "You don't have enough metal for that!") return - d_state = 0 + d_state = INTACT update_icon() smooth_icon_neighbors(src) to_chat(user, "You repair the last of the damage.") @@ -237,13 +255,13 @@ if(!can_be_reinforced) to_chat(user, "The wall is already coated!") return - to_chat(user, "You begin adding an additional layer of coating to the wall with \a [MS].") + to_chat(user, "You begin adding an additional layer of coating to the wall with \a [MS]...") if(do_after(user, 40 * MS.toolspeed, target = src) && !d_state) if(!MS.use(2)) to_chat(user, "You don't have enough plasteel for that!") return - to_chat(user, "You add an additional layer of coating to the wall!") + to_chat(user, "You add an additional layer of coating to the wall.") ChangeTurf(/turf/simulated/wall/r_wall/coated) update_icon() smooth_icon_neighbors(src) @@ -267,12 +285,12 @@ playsound(get_turf(src), 'sound/weapons/circsawhit.ogg', 50, 1) user.visible_message( \ - "[user] starts drilling a hole in \the [src].", \ + "[user] starts drilling a hole in \the [src]...", \ "You start drilling a hole in \the [src]. This is going to take a while.", \ "You hear ratchet.") if(do_after(user, 160 * V.toolspeed, target = src)) user.visible_message( \ - "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ + "[user] drills a hole in \the [src] and pushes \a [P] into the void.", \ "You have finished drilling in \the [src] and push the [P] into the void.", \ "You hear ratchet.")