Merge pull request #12350 from AnturK/ironwall

Rough Metal Walls
This commit is contained in:
Razharas
2015-10-16 09:08:00 +03:00
4 changed files with 63 additions and 6 deletions
@@ -261,3 +261,12 @@
mineral = "wood"
walltype = "wood"
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
/obj/structure/falsewall/iron
name = "rough metal wall"
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = ""
mineral = "metal"
walltype = "iron"
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
+35 -1
View File
@@ -84,7 +84,7 @@
transfer_fingerprints_to(G)
qdel(src)
else if(istype(W, /obj/item/stack/sheet))
else if(istype(W, /obj/item/stack))
if (istype(src.loc, /turf/simulated/wall))
user << "<span class='warning'>There is already a wall present!</span>"
return
@@ -95,6 +95,40 @@
user << "<span class='warning'>There is already a false wall present!</span>"
return
if(istype(W,/obj/item/stack/rods))
var/obj/item/stack/rods/S = W
if(state == GIRDER_DISPLACED)
if(S.amount < 2)
user << "<span class='warning'>You need at least two rods to create a false wall!</span>"
return
user << "<span class='notice'>You start building a reinforced false wall...</span>"
if(do_after(user, 20, target = src))
if(!src.loc || !S || S.amount < 2)
return
S.use(2)
user << "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>"
var/obj/structure/falsewall/iron/FW = new (loc)
transfer_fingerprints_to(FW)
qdel(src)
else
if(S.amount < 5)
user << "<span class='warning'>You need at least five rods to add plating!</span>"
return
user << "<span class='notice'>You start adding plating...</span>"
if (do_after(user, 40, target = src))
if(!src.loc || !S || S.amount < 5)
return
S.use(5)
user << "<span class='notice'>You add the plating.</span>"
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall/mineral/iron)
transfer_fingerprints_to(T)
qdel(src)
return
if(!istype(W,/obj/item/stack/sheet))
return
var/obj/item/stack/sheet/S = W
switch(S.type)