diff --git a/code/defines/obj.dm b/code/defines/obj.dm index d725864ca41..418537a8f34 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -820,4 +820,12 @@ obj/item/brain icon_state = "" density = 1 opacity = 1 + anchored = 1 + +/obj/falserwall + name = "r wall" + icon = 'walls.dmi' + icon_state = "r_wall" + density = 1 + opacity = 1 anchored = 1 \ No newline at end of file diff --git a/code/game/objects/assemblies.dm b/code/game/objects/assemblies.dm index 9447870ee06..9ff1bcd4491 100644 --- a/code/game/objects/assemblies.dm +++ b/code/game/objects/assemblies.dm @@ -174,8 +174,7 @@ src.density = 0 src.sd_SetOpacity(0) var/turf/T = src.loc - T.sd_LumUpdate() - + T.sd_LumReset() else icon_state = "wall" @@ -184,8 +183,9 @@ src.density = 1 src.sd_SetOpacity(1) var/turf/T = src.loc - T.sd_LumUpdate() + //T.sd_LumUpdate() src.relativewall() + T.sd_LumReset() attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -206,4 +206,35 @@ var/turf/Tsrc = get_turf(src) Tsrc.ReplaceWithWall() - */ \ No newline at end of file + */ + +/obj/falserwall/ + attack_hand(mob/user as mob) + if(density) + // Open wall + icon_state = "frwall_open" + flick("frwall_opening", src) + sleep(15) + src.density = 0 + src.sd_SetOpacity(0) + var/turf/T = src.loc + T.sd_LumReset() + + else + icon_state = "r_wall" + flick("frwall_closing", src) + sleep(15) + src.density = 1 + src.sd_SetOpacity(1) + var/turf/T = src.loc + //T.sd_LumUpdate() + src.relativewall() + T.sd_LumReset() + + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/screwdriver)) + var/turf/T = get_turf(src) + user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the r wall.") + T.ReplaceWithWall() //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you). + del(src) \ No newline at end of file diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 584daaa4e48..cf4494b7a95 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -26,14 +26,22 @@ obj/structure new /obj/item/weapon/sheet/metal(get_turf(src)) del(src) - else if(istype(W, /obj/item/weapon/sheet/metal) && istype(src,/obj/structure/girder/displaced)) - W:amount -= 1 + else if((istype(W, /obj/item/weapon/sheet/metal)) && (W:amount >= 2) && istype(src,/obj/structure/girder/displaced)) + W:amount -= 2 if(W:amount <= 0) del(W) user << "\blue You create a false wall! Push on it to open or close the passage." new /obj/falsewall (src.loc) del(src) + else if(istype(W, /obj/item/weapon/sheet/r_metal) && istype(src,/obj/structure/girder/displaced)) + W:amount -= 1 + if(W:amount <= 0) + del(W) + user << "\blue You create a false r wall! Push on it to open or close the passage." + new /obj/falserwall (src.loc) + del(src) + else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced)) playsound(src.loc, 'Screwdriver.ogg', 100, 1) var/turf/T = get_turf(user) @@ -106,6 +114,9 @@ obj/structure user << "\blue Now reinforcing girders" sleep(60) user << "\blue Girders reinforced!" + W:amount-- + if (W:amount <= 0) + del(W) new/obj/structure/girder/reinforced( src.loc ) del(src) return diff --git a/code/game/smoothwall.dm b/code/game/smoothwall.dm index 698d40e0e9b..d4e375f22cb 100644 --- a/code/game/smoothwall.dm +++ b/code/game/smoothwall.dm @@ -13,9 +13,9 @@ if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls junction |= get_dir(src,W) - if(istype(src,/turf/simulated/wall/r_wall)) + if(istype(src,/turf/simulated/wall/r_wall) || istype(src,/obj/falserwall)) src.icon_state = "rwall[junction]" - else if(istype(src,/turf/simulated/wall) || istype(src,/obj/falsewall)) + else if(istype(src,/turf/simulated/wall) || istype(src,/obj/falsewall) || istype(src,/obj/falserwall)) src.icon_state = "wall[junction]" /* When we have animations for different directions of falsewalls, then it'd be needed. Not now. diff --git a/icons/turf/walls.dmi b/icons/turf/walls.dmi index a921acb136f..126a97c9b84 100644 Binary files a/icons/turf/walls.dmi and b/icons/turf/walls.dmi differ