Fixes catwalk deconstruction and a runtime

Crowbaring them would runtime because they lack a floor tile type
This commit is contained in:
Krausus
2015-05-25 06:44:33 -04:00
parent a52b899863
commit 2e8cbb3e1d
+19 -11
View File
@@ -465,7 +465,7 @@ var/list/wood_icons = list("wood","wood-broken")
else
user << "\blue The lightbulb seems fine, no need to replace it."
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())))
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())) && (!is_catwalk()))
if(broken || burnt)
user << "\red You remove the broken plating."
else
@@ -482,18 +482,26 @@ var/list/wood_icons = list("wood","wood-broken")
return
if(istype(C, /obj/item/weapon/screwdriver) && is_wood_floor())
if(broken || burnt)
return
else
if(is_wood_floor())
user << "\red You unscrew the planks."
new floor_tile.type(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
if(is_catwalk())
if(istype(C, /obj/item/weapon/screwdriver))
if(is_wood_floor())
if(broken || burnt)
return
else
if(is_wood_floor())
user << "\red You unscrew the planks."
new floor_tile.type(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
else if(is_catwalk())
if(broken) return
user << "\red You unscrew the catwalk's rods."
new /obj/item/stack/rods(src, 2)
ReplaceWithLattice()
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(T.is_catwalk())
var/turf/simulated/floor/plating/airless/catwalk/CW=T
CW.update_icon(0)
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
return