diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 3fb69d575fb..5c146be2fe8 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -201,29 +201,28 @@ if (istype(W, /obj/item/weapon/wirecutters)) playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) construction_stage = 5 - //src.icon_state = "r_wall-1" - //new /obj/item/stack/rods( src ) + new /obj/item/stack/rods( src ) user << "You cut the outer grille." + set_wall_state() return if(5) if (istype(W, /obj/item/weapon/screwdriver)) user << "You begin removing the support lines." playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) - sleep(40) - if(!istype(src, /turf/simulated/wall) || !user || !W || !T ) + if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 5) return - if(construction_stage == 5 && user.loc == T && user.get_active_hand() == W ) - construction_stage = 4 - //src.icon_state = "r_wall-2" - user << "You remove the support lines." + construction_stage = 4 + set_wall_state() + user << "You remove the support lines." 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 - //src.icon_state = "r_wall" + set_wall_state() user << "You replace the outer grille." + return if(4) var/cut_cover if(istype(W,/obj/item/weapon/weldingtool)) @@ -237,43 +236,38 @@ return else if (istype(W, /obj/item/weapon/pickaxe/plasmacutter)) cut_cover = 1 - if(cut_cover) user << "You begin slicing through the metal cover." playsound(src, 'sound/items/Welder.ogg', 100, 1) - sleep(60) - if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return - if(construction_stage == 2 && user.loc == T && user.get_active_hand() == W) - construction_stage = 3 - //src.icon_state = "r_wall-3" - user << "You press firmly on the cover, dislodging it." + if(!do_after(user, 60) || !istype(src, /turf/simulated/wall) || construction_stage != 4) + return + construction_stage = 3 + set_wall_state() + user << "You press firmly on the cover, dislodging it." return if(3) if (istype(W, /obj/item/weapon/crowbar)) user << "You struggle to pry off the cover." playsound(src, 'sound/items/Crowbar.ogg', 100, 1) - sleep(100) - if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return - if( construction_stage == 3 && user.loc == T && user.get_active_hand() == W ) - construction_stage = 2 - //src.icon_state = "r_wall-4" - user << "You pry off the cover." + if(!do_after(user,100) || !istype(src, /turf/simulated/wall) || construction_stage != 3) + return + construction_stage = 2 + set_wall_state() + user << "You pry off the cover." return if(2) if (istype(W, /obj/item/weapon/wrench)) user << "You start loosening the anchoring bolts which secure the support rods to their frame." playsound(src, 'sound/items/Ratchet.ogg', 100, 1) - sleep(40) - if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return - if( construction_stage == 4 && user.loc == T && user.get_active_hand() == W ) - construction_stage = 1 - //src.icon_state = "r_wall-5" - user << "You remove the bolts anchoring the support rods." + if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 2) + return + construction_stage = 1 + set_wall_state() + user << "You remove the bolts anchoring the support rods." return if(1) - var/cut_cover - if( istype(W, /obj/item/weapon/weldingtool) ) + if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if( WT.remove_fuel(0,user) ) cut_cover=1 @@ -282,20 +276,18 @@ return else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) cut_cover = 1 - if(cut_cover) user << "You begin slicing through the support rods." playsound(src, 'sound/items/Welder.ogg', 100, 1) - sleep(70) - if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return - if( construction_stage == 5 && user.loc == T && user.get_active_hand() == W ) - construction_stage = 0 - //src.icon_state = "r_wall-6" - //new /obj/item/stack/rods( src ) - user << "The support rods drop out as you cut them loose from the frame." + if(!do_after(user,70) || !istype(src, /turf/simulated/wall) || construction_stage != 1) + return + construction_stage = 0 + set_wall_state() + new /obj/item/stack/rods(src) + user << "The support rods drop out as you cut them loose from the frame." return if(0) - if( istype(W, /obj/item/weapon/crowbar) ) + if(istype(W, /obj/item/weapon/crowbar)) user << "You struggle to pry off the outer sheath." playsound(src, 'sound/items/Crowbar.ogg', 100, 1) sleep(100) diff --git a/code/game/turfs/simulated/wall_icon.dm b/code/game/turfs/simulated/wall_icon.dm index d43937bda81..50aaa849f42 100644 --- a/code/game/turfs/simulated/wall_icon.dm +++ b/code/game/turfs/simulated/wall_icon.dm @@ -51,11 +51,20 @@ wall_cache["[new_state]-[material.icon_colour]"] = I overlays |= wall_cache["[new_state]-[material.icon_colour]"] if(reinf_material) - if(!wall_cache["[material.icon_reinf]-[reinf_material.icon_colour]"]) - var/image/I = image(icon='icons/turf/wall_masks.dmi',icon_state="[material.icon_reinf]") + + var/cache_key = "[material.icon_reinf]-[reinf_material.icon_colour]" + if(!isnull(construction_stage) && construction_stage<6) + cache_key = "reinf_construct-[reinf_material.icon_colour]-[construction_stage]" + + if(!wall_cache[cache_key]) + var/image/I + if(!isnull(construction_stage) && construction_stage<6) + I = image(icon='icons/turf/wall_masks.dmi',icon_state="reinf_construct-[construction_stage]") + else + I = image(icon='icons/turf/wall_masks.dmi',icon_state="[material.icon_reinf]") I.color = reinf_material.icon_colour - wall_cache["[material.icon_reinf]-[reinf_material.icon_colour]"] = I - overlays |= wall_cache["[material.icon_reinf]-[reinf_material.icon_colour]"] + wall_cache[cache_key] = I + overlays |= wall_cache[cache_key] /turf/simulated/wall/proc/set_material(var/material/newmaterial, var/material/newrmaterial) material = newmaterial diff --git a/icons/turf/wall_masks.dmi b/icons/turf/wall_masks.dmi index a6d21453ace..99e867746f1 100644 Binary files a/icons/turf/wall_masks.dmi and b/icons/turf/wall_masks.dmi differ diff --git a/icons/turf/walls.dmi b/icons/turf/walls.dmi index b35916ae457..259333e27be 100644 Binary files a/icons/turf/walls.dmi and b/icons/turf/walls.dmi differ