Merge pull request #17038 from E-MonaRhg/carpet-stuff-two

The Subsequent Carpet PR: tweaks and tables edition
This commit is contained in:
variableundefined
2021-11-07 10:24:47 -06:00
committed by GitHub
14 changed files with 103 additions and 31 deletions
+7 -11
View File
@@ -30,6 +30,7 @@
to_chat(user, "<span class='notice'>You start adding [P] to [src]...</span>")
if(do_after(user, 50, target = src) && P.use(1))
make_new_table(/obj/structure/table/reinforced)
else if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(M.get_amount() < 1)
@@ -38,6 +39,7 @@
to_chat(user, "<span class='notice'>You start adding [M] to [src]...</span>")
if(do_after(user, 20, target = src) && M.use(1))
make_new_table(/obj/structure/table)
else if(istype(I, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = I
if(G.get_amount() < 1)
@@ -46,22 +48,16 @@
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
if(do_after(user, 20, target = src) && G.use(1))
make_new_table(/obj/structure/table/glass)
else if(istype(I, /obj/item/stack/tile/carpet/black))
var/obj/item/stack/tile/carpet/black/C = I
if(C.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one black carpet sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
if(do_after(user, 20, target = src) && C.use(1))
make_new_table(/obj/structure/table/wood/fancy/black)
else if(istype(I, /obj/item/stack/tile/carpet))
if(istype(I, /obj/item/stack/tile/carpet))
var/obj/item/stack/tile/carpet/C = I
if(C.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one carpet sheet to do this!</span>")
to_chat(user, "<span class='warning'>You need one [C.name] sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
if(do_after(user, 20, target = src) && C.use(1))
make_new_table(/obj/structure/table/wood/fancy)
make_new_table(C.fancy_table_type)
else
return ..()
+68 -7
View File
@@ -498,24 +498,85 @@
/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 = 'icons/obj/smooth_structures/fancy_table.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/black)
canSmoothWith = list(/obj/structure/table/wood/fancy,
/obj/structure/table/wood/fancy/black,
/obj/structure/table/wood/fancy/blue,
/obj/structure/table/wood/fancy/cyan,
/obj/structure/table/wood/fancy/green,
/obj/structure/table/wood/fancy/orange,
/obj/structure/table/wood/fancy/purple,
/obj/structure/table/wood/fancy/red,
/obj/structure/table/wood/fancy/royalblack,
/obj/structure/table/wood/fancy/royalblue)
var/smooth_icon = 'icons/obj/smooth_structures/fancy_table.dmi'
/obj/structure/table/wood/fancy/Initialize(mapload)
/obj/structure/table/wood/fancy/flip(direction)
return FALSE
/obj/structure/table/wood/fancy/Initialize()
. = ..()
icon = 'icons/obj/smooth_structures/fancy_table.dmi' //so that the tables place correctly in the map editor
icon = smooth_icon
/obj/structure/table/wood/fancy/black
icon_state = "fancy_table_black"
buildstack = /obj/item/stack/tile/carpet/black
icon = 'icons/obj/smooth_structures/fancy_table_black.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_black.dmi'
/obj/structure/table/wood/fancy/black/Initialize(mapload)
. = ..()
icon = 'icons/obj/smooth_structures/fancy_table_black.dmi' //so that the tables place correctly in the map editor
/obj/structure/table/wood/fancy/blue
icon_state = "fancy_table_blue"
buildstack = /obj/item/stack/tile/carpet/blue
icon = 'icons/obj/smooth_structures/fancy_table_blue.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_blue.dmi'
/obj/structure/table/wood/fancy/cyan
icon_state = "fancy_table_cyan"
buildstack = /obj/item/stack/tile/carpet/cyan
icon = 'icons/obj/smooth_structures/fancy_table_cyan.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_cyan.dmi'
/obj/structure/table/wood/fancy/green
icon_state = "fancy_table_green"
buildstack = /obj/item/stack/tile/carpet/green
icon = 'icons/obj/smooth_structures/fancy_table_green.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_green.dmi'
/obj/structure/table/wood/fancy/orange
icon_state = "fancy_table_orange"
buildstack = /obj/item/stack/tile/carpet/orange
icon = 'icons/obj/smooth_structures/fancy_table_orange.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_orange.dmi'
/obj/structure/table/wood/fancy/purple
icon_state = "fancy_table_purple"
buildstack = /obj/item/stack/tile/carpet/purple
icon = 'icons/obj/smooth_structures/fancy_table_purple.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_purple.dmi'
/obj/structure/table/wood/fancy/red
icon_state = "fancy_table_red"
buildstack = /obj/item/stack/tile/carpet/red
icon = 'icons/obj/smooth_structures/fancy_table_red.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_red.dmi'
/obj/structure/table/wood/fancy/royalblack
icon_state = "fancy_table_royalblack"
buildstack = /obj/item/stack/tile/carpet/royalblack
icon = 'icons/obj/smooth_structures/fancy_table_royalblack.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblack.dmi'
/obj/structure/table/wood/fancy/royalblue
icon_state = "fancy_table_royalblue"
buildstack = /obj/item/stack/tile/carpet/royalblue
icon = 'icons/obj/smooth_structures/fancy_table_royalblue.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblue.dmi'
/*
* Reinforced tables