diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index 5f165715ed1..5115443a8bf 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -35,8 +35,7 @@ user << "You need one plasteel sheet to do this!" return user << "You start adding [P] to [src]..." - if(do_after(user, 50, target = src)) - P.use(1) + if(do_after(user, 50, target = src) && P.use(1)) new /obj/structure/table/reinforced(src.loc) qdel(src) else if(istype(I, /obj/item/stack/sheet/metal)) @@ -45,8 +44,7 @@ user << "You need one metal sheet to do this!" return user << "You start adding [M] to [src]..." - if(do_after(user, 20, target = src)) - M.use(1) + if(do_after(user, 20, target = src) && M.use(1)) new /obj/structure/table(src.loc) qdel(src) else if(istype(I, /obj/item/stack/sheet/glass)) @@ -55,9 +53,7 @@ user << "You need one glass sheet to do this!" return user << "You start adding [G] to [src]..." - if(do_after(user, 20, target = src)) - G.use(1) - + if(do_after(user, 20, target = src) && G.use(1)) new /obj/structure/table/glass(src.loc) qdel(src) else if(istype(I, /obj/item/stack/sheet/mineral/silver)) @@ -66,10 +62,18 @@ user << "You need one silver sheet to do this!" return user << "You start adding [S] to [src]..." - if(do_after(user, 20, target = src)) - S.use(1) + if(do_after(user, 20, target = src) && S.use(1)) new /obj/structure/table/optable(src.loc) qdel(src) + else if(istype(I, /obj/item/stack/tile/carpet)) + var/obj/item/stack/tile/carpet/C = I + if(C.get_amount() < 1) + user << "You need one carpet sheet to do this!" + return + user << "You start adding [C] to [src]..." + if(do_after(user, 20, target = src) && C.use(1)) + new /obj/structure/table/wood/fancy(src.loc) + qdel(src) else return ..() @@ -101,8 +105,7 @@ user << "You need one wood sheet to do this!" return user << "You start adding [W] to [src]..." - if(do_after(user, 20, target = src)) - W.use(1) + if(do_after(user, 20, target = src) && W.use(1)) new /obj/structure/table/wood(src.loc) qdel(src) return @@ -112,8 +115,7 @@ user << "You need one carpet sheet to do this!" return user << "You start adding [C] to [src]..." - if(do_after(user, 20, target = src)) - C.use(1) + if(do_after(user, 20, target = src) && C.use(1)) new /obj/structure/table/wood/poker(src.loc) qdel(src) else diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 72620649eb5..da1645af7aa 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -334,6 +334,24 @@ /obj/structure/table/wood/poker/narsie_act() new /obj/structure/table/wood(src.loc) +/obj/structure/table/wood/fancy + name = "fancy table" + desc = "A standard metal table frame covered with an amazingly fancy, patterned cloth." + icon = 'icons/obj/structures.dmi' + icon_state = "fancy_table" + frame = /obj/structure/table_frame + framestack = /obj/item/stack/rods + buildstack = /obj/item/stack/tile/carpet + canSmoothWith = list(/obj/structure/table/wood/fancy) + +/obj/structure/table/wood/fancy/New() + icon = 'icons/obj/smooth_structures/fancy_table.dmi' //so that the tables place correctly in the map editor + ..() + +/obj/structure/table/wood/fancy/burn() //basically made out of metal + new frame(loc) + qdel(src) + /* * Reinforced tables */ diff --git a/icons/obj/smooth_structures/fancy_table.dmi b/icons/obj/smooth_structures/fancy_table.dmi new file mode 100644 index 00000000000..a57b165f4ac Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table.dmi differ diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi index daae938fbd2..ea17810bb88 100644 Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ