From b0a8b84dbf906ac7ee51639adad6fe25b3e86e6b Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 1 May 2026 20:47:14 -0400 Subject: [PATCH] Add cardboard recycling. (#31937) * Add cardboard recycling. * Add more cardboard items to the recycling list. --- code/__DEFINES/construction_defines.dm | 1 + code/datums/components/material_container.dm | 5 +++++ code/game/machinery/recycler.dm | 2 +- code/game/objects/items/cardboard_cutouts.dm | 1 + code/game/objects/items/chess.dm | 1 + code/game/objects/items/stacks/sheets/sheet_types.dm | 1 + code/game/objects/items/storage/fancy.dm | 9 +++++++++ code/game/objects/items/storage/firstaid.dm | 1 + code/game/objects/items/weapons/misc_items.dm | 1 + code/game/objects/items/weapons/storage/boxes.dm | 3 +++ code/modules/clothing/suits/cardborg_suit.dm | 2 ++ code/modules/food_and_drinks/drinks/drinks/carton.dm | 1 + code/modules/food_and_drinks/food/foods/pizza.dm | 1 + code/modules/paperwork/folders.dm | 1 + 14 files changed, 29 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/construction_defines.dm b/code/__DEFINES/construction_defines.dm index 509116e9702..a1bac1272dc 100644 --- a/code/__DEFINES/construction_defines.dm +++ b/code/__DEFINES/construction_defines.dm @@ -84,6 +84,7 @@ #define MAT_PLATINUM "platinum" #define MAT_IRIDIUM "iridium" #define MAT_SILK "silk" +#define MAT_CARDBOARD "cardboard" /// The amount of materials you get from a sheet of mineral like iron/diamond/glass etc #define MINERAL_MATERIAL_AMOUNT 2000 diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index c9b94f28f4d..45d94901398 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -483,3 +483,8 @@ name = "Wood" id = MAT_WOOD sheet_type = /obj/item/stack/sheet/wood + +/datum/material/cardboard + name = "Cardboard" + id = MAT_CARDBOARD + sheet_type = /obj/item/stack/sheet/cardboard diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index fbfeccf354d..dd427f7139c 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -25,7 +25,7 @@ /obj/machinery/recycler/Initialize(mapload) . = ..() - AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_TITANIUM, MAT_URANIUM, MAT_DIAMOND, MAT_BLUESPACE, MAT_WOOD, MAT_PLASTIC, MAT_BANANIUM, MAT_TRANQUILLITE), 0, TRUE, null, null, null, TRUE) + AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_TITANIUM, MAT_URANIUM, MAT_DIAMOND, MAT_BLUESPACE, MAT_WOOD, MAT_PLASTIC, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_CARDBOARD), 0, TRUE, null, null, null, TRUE) component_parts = list() component_parts += new /obj/item/circuitboard/recycler(null) component_parts += new /obj/item/stock_parts/matter_bin(null) diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index 5856c0e1b8f..8c081d7c465 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -15,6 +15,7 @@ var/pushed_over = FALSE /// If the cutout actually appears as what it portray and not a discolored version var/deceptive = FALSE + materials = list(MAT_CARDBOARD = 10000) /obj/item/cardboard_cutout/attack_hand(mob/living/user) if(user.a_intent == INTENT_HELP || pushed_over) diff --git a/code/game/objects/items/chess.dm b/code/game/objects/items/chess.dm index 40516ad7065..0a1fcca3c5d 100644 --- a/code/game/objects/items/chess.dm +++ b/code/game/objects/items/chess.dm @@ -4,6 +4,7 @@ name = "Chess Piece" desc = "A generic chess piece used in a game of chess." icon = 'icons/obj/chess.dmi' + materials = list(MAT_CARDBOARD = 2000) //Black chess pieces. diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index c523d3c633c..5b69801f842 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -554,6 +554,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( icon_state = "sheet-card" singular_name = "cardboard sheet" resistance_flags = FLAMMABLE + materials = list(MAT_CARDBOARD = MINERAL_MATERIAL_AMOUNT) merge_type = /obj/item/stack/sheet/cardboard /obj/item/stack/sheet/cardboard/Initialize(mapload, new_amount, merge) diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 15014b96a43..40bfc826a4c 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -58,6 +58,7 @@ can_hold = list(/obj/item/food/donut) foldable = /obj/item/stack/sheet/cardboard foldable_amt = 1 + materials = list(MAT_CARDBOARD = 2000) /obj/item/storage/fancy/donut_box/update_overlays() . = ..() @@ -111,6 +112,7 @@ storage_slots = 5 throwforce = 2 slot_flags = ITEM_SLOT_BELT + materials = list(MAT_CARDBOARD = 1000) /obj/item/storage/fancy/candle_box/Initialize(mapload) . = ..() @@ -141,6 +143,7 @@ can_hold = list( /obj/item/toy/crayon ) + materials = list(MAT_CARDBOARD = 1000) /obj/item/storage/fancy/crayons/populate_contents() new /obj/item/toy/crayon/white(src) @@ -201,6 +204,7 @@ drop_sound = 'sound/items/handling/matchbox_drop.ogg' pickup_sound = 'sound/items/handling/matchbox_pickup.ogg' can_hold = list(/obj/item/match) + materials = list(MAT_CARDBOARD = 500) /obj/item/storage/fancy/matches/populate_contents() for(var/I in 1 to storage_slots) @@ -245,6 +249,7 @@ icon_type = "cigarette" var/cigarette_slogan = "The preferred brand of coders and developers." var/cigarette_type = /obj/item/clothing/mask/cigarette + materials = list(MAT_CARDBOARD = 500) /obj/item/storage/fancy/cigarettes/examine(mob/user) . = ..() @@ -461,6 +466,7 @@ can_hold = list(/obj/item/clothing/mask/cigarette/cigar) icon_type = "cigar" var/cigar_type = /obj/item/clothing/mask/cigarette/cigar + materials = list(MAT_CARDBOARD = 2000) /obj/item/storage/fancy/cigars/populate_contents() for(var/I in 1 to storage_slots) @@ -589,6 +595,9 @@ icon_type = "juice carton" appearance_flags = parent_type::appearance_flags | KEEP_TOGETHER can_hold = list(/obj/item/reagent_containers/drinks/carton) + materials = list(MAT_CARDBOARD = 2000) + foldable = /obj/item/stack/sheet/cardboard + foldable_amt = 1 /obj/item/storage/fancy/juice_boxes/update_icon_state() return diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index d8a5f3a65fa..25a29685ab5 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -380,6 +380,7 @@ rapid_intake_message = "flips the lid of the patch pack open and begins rapidly stamping patches on themselves!" rapid_post_instake_message = "stamps the entire contents of the patch pack all over their entire body!" wrapper_state = "patch_pack_wrap" + materials = list(MAT_CARDBOARD = 4000) /obj/item/storage/pill_bottle/charcoal name = "Pill bottle (Charcoal)" diff --git a/code/game/objects/items/weapons/misc_items.dm b/code/game/objects/items/weapons/misc_items.dm index 7e8310e4b5b..30903e266a1 100644 --- a/code/game/objects/items/weapons/misc_items.dm +++ b/code/game/objects/items/weapons/misc_items.dm @@ -162,6 +162,7 @@ w_class = WEIGHT_CLASS_TINY throw_speed = 4 throw_range = 5 + materials = list(MAT_CARDBOARD = 2000) /obj/item/c_tube/decompile_act(obj/item/matter_decompiler/C, mob/user) qdel(src) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 3899551b88e..8602892ed90 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -28,6 +28,7 @@ resistance_flags = FLAMMABLE drop_sound = 'sound/items/handling/cardboardbox_drop.ogg' pickup_sound = 'sound/items/handling/cardboardbox_pickup.ogg' + materials = list(MAT_CARDBOARD = 2000) foldable = /obj/item/stack/sheet/cardboard foldable_amt = 1 /// list containing a list of what this box can change into when colored, probably don't want to manually edit this, use `add_to_colorable_lists()` @@ -377,6 +378,7 @@ desc = "You could build a fort with this." icon_state = "large_box" w_class = 4 // Big, bulky. + materials = list(MAT_CARDBOARD = 8000) foldable_amt = 4 storage_slots = 21 max_combined_w_class = 42 // 21*2 @@ -1212,6 +1214,7 @@ icon = 'icons/obj/shell_boxes.dmi' storage_slots = 8 appearance_flags = parent_type::appearance_flags | KEEP_TOGETHER + materials = list(MAT_CARDBOARD = 4000) can_hold = list(/obj/item/ammo_casing/shotgun) /// What shell do we fill the box with var/shell_type diff --git a/code/modules/clothing/suits/cardborg_suit.dm b/code/modules/clothing/suits/cardborg_suit.dm index 5345fa57a52..5704e486b5c 100644 --- a/code/modules/clothing/suits/cardborg_suit.dm +++ b/code/modules/clothing/suits/cardborg_suit.dm @@ -27,6 +27,7 @@ CONTENTS: ) /// All the borg skins that this can disguise you as. var/list/available_disguises = list("Standard") + materials = list(MAT_CARDBOARD = 2000) /obj/item/clothing/head/cardborg/examine_more(mob/user) . = ..() @@ -114,6 +115,7 @@ CONTENTS: body_parts_covered = UPPER_TORSO|LOWER_TORSO flags_inv = HIDEJUMPSUIT species_disguise = "High-tech robot" + materials = list(MAT_CARDBOARD = 6000) /obj/item/clothing/suit/cardborg/examine_more(mob/user) . = ..() diff --git a/code/modules/food_and_drinks/drinks/drinks/carton.dm b/code/modules/food_and_drinks/drinks/drinks/carton.dm index 79295628d5c..9dce01a48ae 100644 --- a/code/modules/food_and_drinks/drinks/drinks/carton.dm +++ b/code/modules/food_and_drinks/drinks/drinks/carton.dm @@ -5,6 +5,7 @@ volume = 30 icon = 'icons/obj/juice_box.dmi' icon_state = null + materials = list(MAT_CARDBOARD = 500) /obj/item/reagent_containers/drinks/carton/Initialize(mapload) if(!length(list_reagents)) diff --git a/code/modules/food_and_drinks/food/foods/pizza.dm b/code/modules/food_and_drinks/food/foods/pizza.dm index 7e4ed141bd4..88fabef2800 100644 --- a/code/modules/food_and_drinks/food/foods/pizza.dm +++ b/code/modules/food_and_drinks/food/foods/pizza.dm @@ -287,6 +287,7 @@ var/box_tag = "" /// The type of pizza that's spawned in the box. var/pizza_type + materials = list(MAT_CARDBOARD = 2000) /obj/item/pizzabox/Initialize(mapload) . = ..() diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 3774823cf3f..933d4d1c2b0 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -6,6 +6,7 @@ w_class = WEIGHT_CLASS_SMALL pressure_resistance = 2 resistance_flags = FLAMMABLE + materials = list(MAT_CARDBOARD = 2000) /obj/item/folder/emp_act(severity) ..()