Skip to content

Commit

Permalink
[MIRROR] Fix table top deconstruction (#2815)
Browse files Browse the repository at this point in the history
* Fix table top deconstruction

* Update tables_racks.dm

* Update tables_racks.dm

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: _0Steven <[email protected]>
Co-authored-by: Bloop <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
5 people authored Apr 11, 2024
1 parent 050ba1e commit 619eee6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
to_chat(user, span_notice("You start deconstructing [src]..."))
if(tool.use_tool(src, user, 4 SECONDS, volume=50))
playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
frame = null
deconstruct(TRUE)
return ITEM_INTERACT_SUCCESS

Expand Down Expand Up @@ -304,7 +305,11 @@
else
for(var/datum/material/mat in custom_materials)
new mat.sheet_type(target_turf, FLOOR(custom_materials[mat] / SHEET_MATERIAL_AMOUNT, 1))
new framestack(target_turf, framestackamount)

if(frame)
new frame(target_turf)
else
new framestack(get_turf(src), framestackamount)

/obj/structure/table/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if(the_rcd.mode == RCD_DECONSTRUCT)
Expand Down

0 comments on commit 619eee6

Please sign in to comment.