Allows the cutting of folders back into cardboard (#92906)

## About The Pull Request
You can now cut folders apart into cardboard using wirecutters or a
knife.

## Why It's Good For The Game
It's always been weird to me that you could turn cardboard into folders
but then not reverse it, unlike boxes, which you can fold and unfold
practically freely.

## Changelog

🆑
qol: You can now cut folders apart back into cardboard with wirecutters
or a knife.
/🆑

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
This commit is contained in:
Hatterhat
2025-09-10 16:21:53 -05:00
committed by GitHub
parent ab352e85f2
commit 032d5ce23a
+15
View File
@@ -61,6 +61,9 @@
if(IS_WRITING_UTENSIL(held_item))
context[SCREENTIP_CONTEXT_LMB] = "Rename"
return CONTEXTUAL_SCREENTIP_SET
if((held_item.tool_behaviour == TOOL_KNIFE || held_item.tool_behaviour == TOOL_WIRECUTTER) && !contents.len)
context[SCREENTIP_CONTEXT_LMB] = "Cut apart"
return CONTEXTUAL_SCREENTIP_SET
return NONE
/obj/item/folder/proc/remove_item(obj/item/Item, mob/user)
@@ -93,6 +96,8 @@
return insertables_act(user, tool)
if(IS_WRITING_UTENSIL(tool))
return writing_utensil_act(user, tool)
if(tool.tool_behaviour == TOOL_KNIFE || tool.tool_behaviour == TOOL_WIRECUTTER)
return sharp_thing_act(user, tool)
return NONE
/obj/item/folder/proc/insertables_act(mob/living/user, obj/item/tool)
@@ -116,6 +121,16 @@
playsound(src, SFX_WRITING_PEN, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE, SOUND_FALLOFF_EXPONENT + 3, ignore_walls = FALSE)
return ITEM_INTERACT_SUCCESS
/obj/item/folder/proc/sharp_thing_act(mob/user, obj/item/sharp_tool)
if(contents.len)
balloon_alert(user, "empty [src] first!")
return ITEM_INTERACT_BLOCKING
balloon_alert(user, "cut apart")
qdel(src)
user.put_in_hands(new /obj/item/stack/sheet/cardboard)
return ITEM_INTERACT_SUCCESS
/obj/item/folder/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(is_type_in_typecache(interacting_with, folder_insertables))
return interact_with_insertables(interacting_with, user)