From 82703b9309da64480aa8c8a9036a8756923ce01b Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Mon, 8 May 2017 10:48:11 +0400 Subject: [PATCH] rename defines --- code/__DEFINES/construction.dm | 14 ++-- code/game/turfs/simulated/walls_reinforced.dm | 82 +++++++++---------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index ae8c86eeda3..cb67ee38b7e 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -10,13 +10,13 @@ #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 +#define RWALL_INTACT 0 +#define RWALL_SUPPORT_LINES 1 +#define RWALL_COVER 2 +#define RWALL_CUT_COVER 3 +#define RWALL_BOLTS 4 +#define RWALL_SUPPORT_RODS 5 +#define RWALL_SHEATH 6 //plastic flaps construction states #define PLASTIC_FLAPS_NORMAL 0 diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 737ed9452dc..c8e9eeca687 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -12,25 +12,25 @@ sheet_type = /obj/item/stack/sheet/plasteel sheet_amount = 1 girder_type = /obj/structure/girder/reinforced - var/d_state = INTACT + var/d_state = RWALL_INTACT var/can_be_reinforced = 1 /turf/simulated/wall/r_wall/examine(mob/user) ..() switch(d_state) - if(INTACT) + if(RWALL_INTACT) to_chat(user, "The outer grille is fully intact.") - if(SUPPORT_LINES) + if(RWALL_SUPPORT_LINES) to_chat(user, "The outer grille has been cut, and the support lines are screwed securely to the outer cover.") - if(COVER) + if(RWALL_COVER) to_chat(user, "The support lines have been unscrewed, and the metal cover is welded firmly in place.") - if(CUT_COVER) + if(RWALL_CUT_COVER) to_chat(user, "The metal cover has been sliced through, and is connected loosely to the girder.") - if(BOLTS) + if(RWALL_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) + if(RWALL_SUPPORT_RODS) to_chat(user, "The bolts anchoring the support rods have been loosened, but are still welded firmly to the girder.") - if(SHEATH) + if(RWALL_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, mob/user, params) @@ -101,22 +101,22 @@ //DECONSTRUCTION switch(d_state) - if(INTACT) + if(RWALL_INTACT) if(iswirecutter(W)) playsound(src, W.usesound, 100, 1) - d_state = SUPPORT_LINES + d_state = RWALL_SUPPORT_LINES update_icon() new /obj/item/stack/rods(src) to_chat(user, "You cut the outer grille.") return - if(SUPPORT_LINES) + if(RWALL_SUPPORT_LINES) if(isscrewdriver(W)) to_chat(user, "You begin unsecuring the support lines...") playsound(src, W.usesound, 100, 1) - if(do_after(user, 40 * W.toolspeed, target = src) && d_state == SUPPORT_LINES) - d_state = COVER + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == RWALL_SUPPORT_LINES) + d_state = RWALL_COVER update_icon() to_chat(user, "You unsecure the support lines.") return @@ -125,22 +125,22 @@ else if(istype(W, /obj/item/stack/rods)) var/obj/item/stack/O = W if(O.use(1)) - d_state = INTACT + d_state = RWALL_INTACT update_icon() 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(COVER) + if(RWALL_COVER) if(iswelder(W)) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) 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 == COVER) - d_state = CUT_COVER + if(do_after(user, 60 * WT.toolspeed, target = src) && d_state == RWALL_COVER) + d_state = RWALL_CUT_COVER update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") @@ -152,8 +152,8 @@ 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 == COVER) - d_state = CUT_COVER + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == RWALL_COVER) + d_state = RWALL_CUT_COVER update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") return @@ -162,20 +162,20 @@ to_chat(user, "You begin securing the support lines...") playsound(src, W.usesound, 100, 1) if(do_after(user, 40*W.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != COVER) + if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != RWALL_COVER) return 1 - d_state = SUPPORT_LINES + d_state = RWALL_SUPPORT_LINES update_icon() to_chat(user, "The support lines have been secured.") return 1 - if(CUT_COVER) + if(RWALL_CUT_COVER) if(iscrowbar(W)) 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 == CUT_COVER) - d_state = BOLTS + if(do_after(user, 100 * W.toolspeed, target = src) && d_state == RWALL_CUT_COVER) + d_state = RWALL_BOLTS update_icon() to_chat(user, "You pry off the cover.") return @@ -186,20 +186,20 @@ to_chat(user, "You begin welding the metal cover back to the frame...") playsound(src, WT.usesound, 100, 1) if(do_after(user, 60*WT.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !WT || !WT.isOn() || d_state != CUT_COVER) + if(!istype(src, /turf/simulated/wall/r_wall) || !WT || !WT.isOn() || d_state != RWALL_CUT_COVER) return 1 - d_state = COVER + d_state = RWALL_COVER update_icon() to_chat(user, "The metal cover has been welded securely to the frame.") return 1 - if(BOLTS) + if(RWALL_BOLTS) if(iswrench(W)) 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 == BOLTS) - d_state = SUPPORT_RODS + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == RWALL_BOLTS) + d_state = RWALL_SUPPORT_RODS update_icon() to_chat(user, "You remove the bolts anchoring the support rods.") return @@ -208,22 +208,22 @@ to_chat(user, "You start to pry the cover back into place...") playsound(src, W.usesound, 100, 1) if(do_after(user, 20*W.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != BOLTS) + if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != RWALL_BOLTS) return 1 - d_state = CUT_COVER + d_state = RWALL_CUT_COVER update_icon() to_chat(user, "The metal cover has been pried back into place.") return 1 - if(SUPPORT_RODS) + if(RWALL_SUPPORT_RODS) if(iswelder(W)) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) 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 == SUPPORT_RODS) - d_state = SHEATH + if(do_after(user, 100 * WT.toolspeed, target = src) && d_state == RWALL_SUPPORT_RODS) + d_state = RWALL_SHEATH update_icon() else to_chat(user, "You need more welding fuel to complete this task.") @@ -233,8 +233,8 @@ 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 == SUPPORT_RODS) - d_state = SHEATH + if(do_after(user, 70 * W.toolspeed, target = src) && d_state == RWALL_SUPPORT_RODS) + d_state = RWALL_SHEATH update_icon() return @@ -242,19 +242,19 @@ to_chat(user, "You start tightening the bolts which secure the support rods to their frame...") playsound(src, W.usesound, 100, 1) if(do_after(user, 40*W.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != SUPPORT_RODS) + if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != RWALL_SUPPORT_RODS) return 1 - d_state = BOLTS + d_state = RWALL_BOLTS update_icon() to_chat(user, "You tighten the bolts anchoring the support rods.") return 1 - if(SHEATH) + if(RWALL_SHEATH) if(iscrowbar(W)) 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 == SHEATH) + if(do_after(user, 100 * W.toolspeed, target = src) && d_state == RWALL_SHEATH) to_chat(user, "You pry off the outer sheath.") dismantle_wall() return @@ -287,7 +287,7 @@ to_chat(user, "You don't have enough metal for that!") return - d_state = INTACT + d_state = RWALL_INTACT update_icon() smooth_icon_neighbors(src) to_chat(user, "You repair the last of the damage.")