Screw commit history.

This commit is contained in:
Ghommie
2020-02-02 01:26:04 +01:00
parent b1a571bf2d
commit 95db5084ab
267 changed files with 2201 additions and 1848 deletions
+21 -8
View File
@@ -31,21 +31,34 @@
return
var/obj/item/stack/material = I
if (istype(I, /obj/item/stack) && material?.tableVariant)
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
if(do_after(user, 20, target = src) && material.use(1))
make_new_table(material.tableVariant)
if (istype(I, /obj/item/stack))
if(material?.tableVariant)
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
if(do_after(user, 20, target = src) && material.use(1))
make_new_table(material.tableVariant)
else
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one metal sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
if(do_after(user, 20, target = src) && material.use(1))
var/list/material_list = list()
if(material.material_type)
material_list[material.material_type] = MINERAL_MATERIAL_AMOUNT
make_new_table(/obj/structure/table/greyscale, material_list)
else
return ..()
/obj/structure/table_frame/proc/make_new_table(table_type) //makes sure the new table made retains what we had as a frame
/obj/structure/table_frame/proc/make_new_table(table_type, custom_materials) //makes sure the new table made retains what we had as a frame
var/obj/structure/table/T = new table_type(loc)
T.frame = type
T.framestack = framestack
T.framestackamount = framestackamount
if(custom_materials)
T.set_custom_materials(custom_materials)
qdel(src)
/obj/structure/table_frame/deconstruct(disassembled = TRUE)