From 0b0c5ea91ecbf5cbeedac35ab27a314fdf20f306 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Wed, 3 Dec 2025 00:29:01 +0100 Subject: [PATCH] Unit test material checks are now performed on all crafting recipes by default. All stack recipes now transfer mats to the results (#92620) ## About The Pull Request Extends the part of the crafting unit test that ensures consistency between the total mats of the components of a recipe (or rather, the result of said recipe) and a generic instance of the same type as its result, previously only implemented on food recipes. ## Why It's Good For The Game This ensures a degree of consistency with the material composition of various objects in the game. I couldn't do it in the original PR as that one was too big already and it took months to get it merged, and have the relative bugs fixed. Currently a WIP as I slowly deal with the unit test reports. ## Changelog :cl: refactor: Follow-up to the crafting/material refactor from months ago. All objects crafted with stacks now inherit their mat composition (not necessarily the effects and color) by default, while previously only a few things like chair, sinks and toilets did. Report any object looking or behaving weirdly as a result. fix: The material composition of ammo boxes is no longer a 1/10 of what it's supposed to be. It was a shitty hack to make it harder to recycle empty ammo boxes. Instead, they lose materials as they're emptied now. /:cl: --- code/__DEFINES/crafting.dm | 14 +- code/controllers/subsystem/materials.dm | 17 ++- code/datums/components/bakeable.dm | 2 +- code/datums/components/crafting/_recipes.dm | 6 +- code/datums/components/crafting/chemistry.dm | 1 + code/datums/components/crafting/containers.dm | 3 +- code/datums/components/crafting/crafting.dm | 21 ++- code/datums/components/crafting/equipment.dm | 1 + .../datums/components/crafting/guncrafting.dm | 34 ++++- .../components/crafting/melee_weapon.dm | 2 + code/datums/components/crafting/structures.dm | 21 +++ code/datums/components/crafting/tailoring.dm | 5 + code/datums/components/crafting/tools.dm | 1 + .../datums/components/crafting/weapon_ammo.dm | 1 + code/datums/components/grillable.dm | 2 +- code/datums/components/trapdoor.dm | 2 + code/datums/elements/dryable.dm | 2 +- code/datums/elements/food/microwavable.dm | 2 +- code/datums/elements/food/processable.dm | 2 +- code/game/atom/atom_materials.dm | 50 +++++-- code/game/machinery/ai_core/_core.dm | 1 + code/game/machinery/camera/camera.dm | 5 +- .../computer/atmos_computers/_air_sensor.dm | 2 +- code/game/machinery/computer/telescreen.dm | 3 + code/game/machinery/constructable_frame.dm | 1 + code/game/machinery/defibrillator_mount.dm | 1 + code/game/machinery/deployable.dm | 1 + code/game/machinery/doors/airlock.dm | 1 + code/game/machinery/doors/firedoor.dm | 2 + code/game/machinery/doors/poddoor.dm | 1 + code/game/machinery/doors/shutters.dm | 2 + code/game/machinery/igniter.dm | 1 + code/game/machinery/iv_drip.dm | 1 + code/game/machinery/pipe/construction.dm | 37 ++++++ .../porta_turret/portable_turret_construct.dm | 1 + .../machinery/porta_turret/turret_control.dm | 2 +- code/game/machinery/requests_console.dm | 1 + code/game/machinery/spaceheater.dm | 1 + code/game/machinery/syndicatebomb.dm | 2 + code/game/objects/items/cardboard_cutouts.dm | 1 + code/game/objects/items/cards_ids.dm | 1 + code/game/objects/items/chainsaw.dm | 1 + code/game/objects/items/cigarettes.dm | 6 +- code/game/objects/items/clown_items.dm | 1 + code/game/objects/items/devices/aicard.dm | 2 + .../objects/items/devices/pressureplates.dm | 1 + .../objects/items/devices/radio/intercom.dm | 2 +- .../objects/items/devices/traitordevices.dm | 1 + code/game/objects/items/extinguisher.dm | 2 +- code/game/objects/items/fireaxe.dm | 1 + code/game/objects/items/flamethrower.dm | 2 +- code/game/objects/items/flatpacks.dm | 1 + code/game/objects/items/food/cheese.dm | 1 + code/game/objects/items/food/sandwichtoast.dm | 1 + .../objects/items/grenades/chem_grenade.dm | 1 + .../game/objects/items/grenades/ghettobomb.dm | 1 + code/game/objects/items/gun_maintenance.dm | 1 + code/game/objects/items/handcuffs.dm | 5 +- code/game/objects/items/inspector.dm | 1 + code/game/objects/items/kitchen.dm | 2 +- code/game/objects/items/knives.dm | 10 +- code/game/objects/items/latexballoon.dm | 1 + code/game/objects/items/melee/baton.dm | 2 + .../objects/items/melee/chainofcommand.dm | 1 + code/game/objects/items/melee/misc.dm | 1 + code/game/objects/items/pinpointer.dm | 1 + ...pneumaticCannon.dm => pneumatic_cannon.dm} | 1 + code/game/objects/items/rcd/RCL.dm | 1 + code/game/objects/items/religion.dm | 1 + code/game/objects/items/shields.dm | 8 +- code/game/objects/items/signs.dm | 2 +- code/game/objects/items/skateboards.dm | 1 + code/game/objects/items/spear.dm | 9 +- code/game/objects/items/stacks/rods.dm | 4 +- .../game/objects/items/stacks/sheets/glass.dm | 5 +- .../game/objects/items/stacks/sheets/light.dm | 1 + .../objects/items/stacks/sheets/mineral.dm | 14 +- .../items/stacks/sheets/sheet_types.dm | 13 +- code/game/objects/items/stacks/stack.dm | 48 ++++--- .../game/objects/items/stacks/stack_recipe.dm | 5 + code/game/objects/items/stacks/tiles/light.dm | 1 + .../items/stacks/tiles/tile_mineral.dm | 1 + .../objects/items/stacks/tiles/tile_types.dm | 14 +- code/game/objects/items/storage/bags.dm | 2 + .../objects/items/storage/boxes/_boxes.dm | 2 + .../objects/items/storage/boxes/food_boxes.dm | 1 + code/game/objects/items/storage/fancy.dm | 2 +- code/game/objects/items/storage/medkit.dm | 1 + code/game/objects/items/surgery_tray.dm | 1 + code/game/objects/items/tanks/jetpack.dm | 1 + code/game/objects/items/tools/crowbar.dm | 6 + code/game/objects/items/toys.dm | 2 + code/game/objects/items/v8_engine.dm | 1 + code/game/objects/items/weaponry.dm | 4 +- code/game/objects/items/wind_turbine.dm | 1 + .../objects/structures/beds_chairs/bed.dm | 3 + .../objects/structures/beds_chairs/chair.dm | 17 ++- .../objects/structures/beds_chairs/pew.dm | 1 + .../objects/structures/beds_chairs/sofa.dm | 1 + code/game/objects/structures/bedsheet_bin.dm | 1 + code/game/objects/structures/bonfire.dm | 1 + .../game/objects/structures/cannons/cannon.dm | 1 + .../objects/structures/cannons/cannonballs.dm | 1 + .../cannons/mounted_guns/mounted_gun.dm | 1 + code/game/objects/structures/cat_house.dm | 1 + code/game/objects/structures/chess.dm | 1 + .../structures/crates_lockers/closets.dm | 2 + .../crates_lockers/closets/cardboardbox.dm | 1 + .../crates_lockers/closets/secure/freezer.dm | 1 + .../closets/secure/secure_closets.dm | 1 + .../structures/crates_lockers/crates.dm | 1 + .../crates_lockers/crates/wooden.dm | 1 + code/game/objects/structures/curtains.dm | 2 + code/game/objects/structures/displaycase.dm | 1 + code/game/objects/structures/door_assembly.dm | 1 + .../objects/structures/door_assembly_types.dm | 4 + code/game/objects/structures/dresser.dm | 1 + code/game/objects/structures/fireaxe.dm | 2 + code/game/objects/structures/girders.dm | 3 + code/game/objects/structures/grille.dm | 1 + code/game/objects/structures/guillotine.dm | 6 + .../objects/structures/gym/punching_bag.dm | 1 + .../objects/structures/gym/weight_machine.dm | 1 + code/game/objects/structures/headpike.dm | 3 + code/game/objects/structures/kitchen_spike.dm | 2 + code/game/objects/structures/ladders.dm | 1 + code/game/objects/structures/loom.dm | 1 + code/game/objects/structures/maintenance.dm | 1 + code/game/objects/structures/mannequin.dm | 2 + code/game/objects/structures/mirror.dm | 6 +- code/game/objects/structures/plasticflaps.dm | 1 + code/game/objects/structures/platform.dm | 1 + code/game/objects/structures/railings.dm | 4 +- code/game/objects/structures/reflector.dm | 3 + code/game/objects/structures/safe.dm | 13 +- code/game/objects/structures/secure_safe.dm | 5 +- code/game/objects/structures/shower.dm | 1 + code/game/objects/structures/stairs.dm | 2 + code/game/objects/structures/steps.dm | 1 + code/game/objects/structures/table_frames.dm | 2 + code/game/objects/structures/toiletbong.dm | 3 +- code/game/objects/structures/votingbox.dm | 2 +- .../structures/water_structures/toilet.dm | 39 ++++-- .../objects/structures/windoor_assembly.dm | 1 + code/game/objects/structures/window.dm | 10 ++ .../abductor/abductor_structures.dm | 6 + code/modules/antagonists/cult/cult_armor.dm | 1 + .../antagonists/cult/cult_structure_altar.dm | 1 + .../cult/cult_structure_archives.dm | 1 + .../antagonists/cult/cult_structure_forge.dm | 1 + .../antagonists/cult/cult_structure_pylon.dm | 1 + code/modules/art/paintings.dm | 1 + code/modules/art/statues.dm | 2 +- code/modules/assembly/mousetrap.dm | 2 +- .../machinery/portable/canister.dm | 1 + code/modules/basketball/hoop.dm | 1 + code/modules/cargo/markets/market_uplink.dm | 2 +- code/modules/clothing/glasses/_glasses.dm | 4 + code/modules/clothing/glasses/hud.dm | 3 + code/modules/clothing/gloves/bone.dm | 1 + code/modules/clothing/gloves/special.dm | 1 + code/modules/clothing/head/cone.dm | 1 + code/modules/clothing/head/costume.dm | 3 + code/modules/clothing/head/crown.dm | 1 + code/modules/clothing/head/garlands.dm | 4 + code/modules/clothing/head/hat.dm | 1 + code/modules/clothing/head/jobs.dm | 1 + code/modules/clothing/head/papersack.dm | 1 + code/modules/clothing/masks/costume.dm | 1 + code/modules/clothing/masks/gasmask.dm | 2 +- code/modules/clothing/neck/_neck.dm | 2 + code/modules/clothing/shoes/costume.dm | 2 + code/modules/clothing/shoes/sandals.dm | 2 +- code/modules/clothing/suits/costume.dm | 2 + code/modules/clothing/suits/wetfloor.dm | 1 + .../clothing/under/accessories/tribal.dm | 3 + code/modules/experisci/handheld_scanner.dm | 13 +- code/modules/fishing/aquarium/aquarium.dm | 2 + code/modules/fishing/fish_mount.dm | 2 +- code/modules/fishing/fishing_equipment.dm | 1 + code/modules/fishing/fishing_rod.dm | 1 + .../food_and_drinks/machinery/grill.dm | 1 + .../food_and_drinks/machinery/smartfridge.dm | 1 + .../food_and_drinks/recipes/food_mixtures.dm | 3 +- .../recipes/tablecraft/recipes_drink.dm | 1 + .../recipes/tablecraft/recipes_frozen.dm | 53 +++----- .../recipes/tablecraft/recipes_pastry.dm | 1 + code/modules/hydroponics/beekeeping/beebox.dm | 1 + .../hydroponics/beekeeping/honey_frame.dm | 1 + code/modules/hydroponics/fermenting_barrel.dm | 1 + code/modules/hydroponics/grown/towercap.dm | 1 + code/modules/hydroponics/hydroitemdefines.dm | 2 +- code/modules/hydroponics/soil.dm | 1 + code/modules/instruments/items.dm | 2 + code/modules/library/bookcase.dm | 1 + .../manufactorio/machines/storagebox.dm | 1 + .../mapfluff/ruins/lavaland_ruin_code.dm | 2 + .../lavalandruin_code/elephantgraveyard.dm | 8 +- .../modules/mining/equipment/explorer_gear.dm | 2 + code/modules/mining/equipment/mining_tools.dm | 2 + code/modules/mining/lavaland/ash_flora.dm | 1 + .../mining_loot/megafauna/ash_drake.dm | 2 + .../mining/lavaland/necropolis_chests.dm | 1 + code/modules/mining/ores_coins.dm | 2 +- code/modules/mining/satchel_ore_box.dm | 1 + .../living/basic/bots/cleanbot/cleanbot.dm | 1 + .../mob/living/basic/bots/firebot/firebot.dm | 1 + .../mob/living/basic/bots/honkbots/honkbot.dm | 1 + .../basic/bots/hygienebot/hygienebot.dm | 2 + .../mob/living/basic/bots/medbot/medbot.dm | 1 + .../living/basic/bots/repairbot/repairbot.dm | 1 + .../mob/living/basic/bots/vibebot/vibebot.dm | 2 + .../lavaland/bileworm/bileworm_instrument.dm | 1 + .../lavaland/brimdemon/brimdemon_loot.dm | 1 + .../lavaland/raptor/raptor_food_trough.dm | 1 + .../living/simple_animal/bot/construction.dm | 1 + .../mob/living/simple_animal/bot/ed209bot.dm | 2 + .../mob/living/simple_animal/bot/secbot.dm | 2 + code/modules/mod/mod_core.dm | 2 + .../mod/modules/modules_engineering.dm | 1 + .../computers/machinery/modular_computer.dm | 1 + code/modules/paperwork/clipboard.dm | 2 + code/modules/paperwork/desk_bell.dm | 2 +- code/modules/paperwork/filingcabinet.dm | 1 + code/modules/paperwork/folders.dm | 1 + code/modules/paperwork/paper.dm | 1 + code/modules/paperwork/paper_cutter.dm | 1 + code/modules/paperwork/paperbin.dm | 1 + code/modules/paperwork/pen.dm | 2 +- code/modules/power/floodlight.dm | 2 +- .../power/supermatter/supermatter_variants.dm | 2 + .../projectiles/ammunition/ballistic/junk.dm | 2 +- .../projectiles/ammunition/ballistic/rifle.dm | 3 + .../ammunition/ballistic/shotgun.dm | 3 + .../boxes_magazines/_box_magazine.dm | 34 ++++- .../boxes_magazines/external/pistol.dm | 6 + .../boxes_magazines/external/rifle.dm | 2 +- .../boxes_magazines/internal/_internal.dm | 1 + .../guns/ballistic/bows/bow_arrows.dm | 3 + .../guns/ballistic/bows/bow_types.dm | 2 + .../projectiles/guns/ballistic/pistol.dm | 1 + .../projectiles/guns/ballistic/rifle.dm | 11 ++ .../projectiles/guns/energy/beam_rifle.dm | 8 ++ .../projectiles/guns/energy/crank_guns.dm | 20 +++ .../projectiles/guns/energy/energy_gun.dm | 6 + code/modules/projectiles/guns/energy/laser.dm | 7 + .../projectiles/guns/energy/recharge.dm | 14 +- .../projectiles/guns/energy/special.dm | 4 + .../projectiles/guns/special/syringe_gun.dm | 1 + code/modules/reagents/chemistry/items.dm | 4 + .../chemistry/machinery/chem_separator.dm | 1 + .../reagents/reagent_containers/cups/_cup.dm | 7 +- .../reagent_containers/cups/drinks.dm | 8 +- .../reagent_containers/cups/glassbottle.dm | 1 + .../reagents/reagent_containers/dropper.dm | 1 + .../reagents/reagent_containers/syringes.dm | 1 + code/modules/reagents/reagent_dispenser.dm | 1 + .../xenobiology/vatgrowing/microscope.dm | 1 + .../mobile_port/variants/custom/blueprints.dm | 1 + .../modules/surgery/bodyparts/ghetto_parts.dm | 4 + .../surgery/organs/internal/eyes/_eyes.dm | 1 + .../modules/transport/tram/tram_controller.dm | 2 +- code/modules/transport/tram/tram_displays.dm | 2 +- code/modules/transport/tram/tram_floors.dm | 2 + code/modules/unit_tests/crafting.dm | 124 ++++++++++-------- code/modules/vehicles/cars/vim.dm | 1 + code/modules/vehicles/lavaboat.dm | 1 + code/modules/vehicles/motorized_wheelchair.dm | 1 + code/modules/vehicles/scooter.dm | 3 + code/modules/vehicles/vehicle_key.dm | 1 + code/modules/vehicles/wheelchair.dm | 7 +- tgstation.dme | 2 +- 272 files changed, 850 insertions(+), 280 deletions(-) rename code/game/objects/items/{pneumaticCannon.dm => pneumatic_cannon.dm} (99%) diff --git a/code/__DEFINES/crafting.dm b/code/__DEFINES/crafting.dm index b4bbff71ce9..83fe9efbe1a 100644 --- a/code/__DEFINES/crafting.dm +++ b/code/__DEFINES/crafting.dm @@ -26,16 +26,16 @@ #define CRAFT_ON_SOLID_GROUND (1<<4) /// If the craft checks that there are objects with density in the same turf when being built #define CRAFT_CHECK_DENSITY (1<<5) -/// If the created atom will gain custom mat datums -#define CRAFT_APPLIES_MATS (1<<6) /// Crafting passes reagents of components to the finished product -#define CRAFT_TRANSFERS_REAGENTS (1<<7) +#define CRAFT_TRANSFERS_REAGENTS (1<<6) /// Crafting clears all reagents present in the finished product -#define CRAFT_CLEARS_REAGENTS (1<<8) -/// For the crafting unit test, ensures that the custom materials of an item are the same when crafted and spawned. -#define CRAFT_ENFORCE_MATERIALS_PARITY (1<<9) +#define CRAFT_CLEARS_REAGENTS (1<<7) +/// For the crafting unit test, we don't check if the custom materials of an item are the same when crafted and spawned should its recipe have this flag. +#define CRAFT_SKIP_MATERIALS_PARITY (1<<8) /// Exclusive to the personal_crafting component, skips the time spent crafting the recipe. -#define CRAFT_IGNORE_DO_AFTER (1<<10) +#define CRAFT_IGNORE_DO_AFTER (1<<9) +/// This craft won't change the materials of the resulting item to match that of the combined components +#define CRAFT_NO_MATERIALS (1<<10) //food/drink crafting defines //When adding new defines, please make sure to also add them to the encompassing list diff --git a/code/controllers/subsystem/materials.dm b/code/controllers/subsystem/materials.dm index 22101aa2e8d..41bafa367e0 100644 --- a/code/controllers/subsystem/materials.dm +++ b/code/controllers/subsystem/materials.dm @@ -21,16 +21,16 @@ SUBSYSTEM_DEF(materials) var/list/list/material_combos ///List of stackcrafting recipes for materials using base recipes var/list/base_stack_recipes = list( - new /datum/stack_recipe("Chair", /obj/structure/chair/greyscale, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_FURNITURE), - new /datum/stack_recipe("Toilet", /obj/structure/toilet/greyscale, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_FURNITURE), - new /datum/stack_recipe("Sink Frame", /obj/structure/sinkframe, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_FURNITURE), - new /datum/stack_recipe("Material floor tile", /obj/item/stack/tile/material, 1, 4, 20, crafting_flags = CRAFT_APPLIES_MATS, category = CAT_TILES), - new /datum/stack_recipe("Material airlock assembly", /obj/structure/door_assembly/door_assembly_material, 4, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), - new /datum/stack_recipe("Material platform", /obj/structure/platform/material, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \ + new /datum/stack_recipe("Chair", /obj/structure/chair/greyscale, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_FURNITURE), + new /datum/stack_recipe("Toilet", /obj/structure/toilet/greyscale, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_FURNITURE), + new /datum/stack_recipe("Sink Frame", /obj/structure/sinkframe, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_FURNITURE), + new /datum/stack_recipe("Material floor tile", /obj/item/stack/tile/material, 1, 4, 20, crafting_flags = CRAFT_SKIP_MATERIALS_PARITY, category = CAT_TILES), + new /datum/stack_recipe("Material airlock assembly", /obj/structure/door_assembly/door_assembly_material, 4, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_DOORS), + new /datum/stack_recipe("Material platform", /obj/structure/platform/material, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \ ) ///List of stackcrafting recipes for materials using rigid recipes var/list/rigid_stack_recipes = list( - new /datum/stack_recipe("Carving block", /obj/structure/carving_block, 5, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_STRUCTURE), + new /datum/stack_recipe("Carving block", /obj/structure/carving_block, 5, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_STRUCTURE), ) ///A list of dimensional themes used by the dimensional anomaly and other things, most of which require materials to function. @@ -157,8 +157,7 @@ SUBSYSTEM_DEF(materials) if(!material_combos) InitializeMaterials() var/list/combo_params = list() - for(var/x in materials_declaration) - var/datum/material/mat = x + for(var/datum/material/mat as anything in materials_declaration) combo_params += "[istype(mat) ? mat.id : mat]=[OPTIMAL_COST(materials_declaration[mat] * multiplier)]" sortTim(combo_params, GLOBAL_PROC_REF(cmp_text_asc)) // We have to sort now in case the declaration was not in order var/combo_index = combo_params.Join("-") diff --git a/code/datums/components/bakeable.dm b/code/datums/components/bakeable.dm index 70234236ce4..9473602350f 100644 --- a/code/datums/components/bakeable.dm +++ b/code/datums/components/bakeable.dm @@ -37,7 +37,7 @@ var/atom/result = new bake_result if(!item_target.compare_materials(result)) var/warning = "custom_materials of [result.type] when baked compared to just spawned don't match" - var/what_it_should_be = item_target.get_materials_english_list() + var/what_it_should_be = item_target.transcribe_materials_list() stack_trace("[warning]. custom_materials should be [what_it_should_be].") qdel(result) diff --git a/code/datums/components/crafting/_recipes.dm b/code/datums/components/crafting/_recipes.dm index 86b5d095a55..3989b0c8de3 100644 --- a/code/datums/components/crafting/_recipes.dm +++ b/code/datums/components/crafting/_recipes.dm @@ -26,6 +26,8 @@ var/list/parts = list() ///items, structures and machineries of types that are in this list won't transfer their materials to the result var/list/requirements_mats_blacklist + ///if set, the materials in this list and their values will be subtracted from the result. + var/list/removed_mats ///like tool_behaviors but for reagents var/list/chem_catalysts = list() ///where it shows up in the crafting UI @@ -102,9 +104,9 @@ src.reqs[material] = stack_recipe.req_amount src.category = stack_recipe.category || CAT_MISC src.placement_checks = stack_recipe.placement_checks + src.crafting_flags = stack_recipe.crafting_flags - if(!(stack_recipe.crafting_flags & CRAFT_APPLIES_MATS)) - requirements_mats_blacklist = list(material) //the item is not intended to have mats :shrug: + src.removed_mats = stack_recipe.removed_mats /** * Run custom pre-craft checks for this recipe, don't add feedback messages in this because it will spam the client diff --git a/code/datums/components/crafting/chemistry.dm b/code/datums/components/crafting/chemistry.dm index 7f7d5136e83..dd21976be47 100644 --- a/code/datums/components/crafting/chemistry.dm +++ b/code/datums/components/crafting/chemistry.dm @@ -42,6 +42,7 @@ ) time = 5 SECONDS category = CAT_CHEMISTRY + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY //there are two ways to make a chem bombcore. We go with the first one for mats check /datum/crafting_recipe/alcohol_burner name = "Burner (Ethanol)" diff --git a/code/datums/components/crafting/containers.dm b/code/datums/components/crafting/containers.dm index 45e4d0e94fe..52fa895a5a3 100644 --- a/code/datums/components/crafting/containers.dm +++ b/code/datums/components/crafting/containers.dm @@ -27,8 +27,9 @@ /obj/item/stack/sheet/mineral/bamboo = 20 ) result = /obj/item/storage/basket + crafting_flags = CRAFT_SKIP_MATERIALS_PARITY category = CAT_CONTAINERS - crafting_flags = parent_type::crafting_flags | CRAFT_MUST_BE_LEARNED + crafting_flags = parent_type::crafting_flags | CRAFT_MUST_BE_LEARNED | CRAFT_SKIP_MATERIALS_PARITY steps = list( "master the art of underwater basketweaving", "be underwater" diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index a2713aa51f4..dfe48688cf3 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -244,15 +244,30 @@ //used to gather the material composition of the utilized requirements to transfer to the result var/list/total_materials = list() var/list/stuff_to_use = get_used_reqs(recipe, crafter, total_materials) + + for(var/mat in recipe.removed_mats) + var/to_remove = recipe.removed_mats[mat] + var/datum/material/ref_mat = locate(mat) in total_materials + if(!ref_mat) + continue + if(total_materials[ref_mat] < to_remove) + total_materials -= ref_mat + else + total_materials[ref_mat] -= to_remove + var/atom/result var/turf/craft_turf = get_turf(crafter.loc) - var/set_materials = TRUE + var/set_materials = !(recipe.crafting_flags & CRAFT_NO_MATERIALS) if(ispath(recipe.result, /turf)) result = craft_turf.place_on_top(recipe.result) else if(ispath(recipe.result, /obj/item/stack)) + var/res_amount = recipe.result_amount || 1 //we don't merge the stack right away but try to put it in the hand of the crafter - result = new recipe.result(craft_turf, recipe.result_amount || 1, /*merge =*/FALSE) - set_materials = FALSE //stacks are bit too complex for it for now, but you're free to change that. + if(set_materials) + result = new recipe.result(craft_turf, res_amount, /*merge =*/ FALSE, /*mat_override =*/ total_materials, /*mat_amt =*/ 1 / res_amount) + set_materials = FALSE //We've already set the materials on init. Don't do it again + else + result = new recipe.result(craft_turf, res_amount, FALSE) else result = new recipe.result(craft_turf) if(result.atom_storage && recipe.delete_contents) diff --git a/code/datums/components/crafting/equipment.dm b/code/datums/components/crafting/equipment.dm index bbc13b09ccc..16eeeff45e2 100644 --- a/code/datums/components/crafting/equipment.dm +++ b/code/datums/components/crafting/equipment.dm @@ -60,6 +60,7 @@ ) time = 10 SECONDS category = CAT_EQUIPMENT + removed_mats = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /datum/crafting_recipe/motorized_wheelchair name = "Motorized Wheelchair" diff --git a/code/datums/components/crafting/guncrafting.dm b/code/datums/components/crafting/guncrafting.dm index 8762fc38abc..0672a72c34f 100644 --- a/code/datums/components/crafting/guncrafting.dm +++ b/code/datums/components/crafting/guncrafting.dm @@ -16,6 +16,7 @@ desc = "A prototype modular receiver and trigger assembly for a firearm." icon = 'icons/obj/weapons/improvised.dmi' icon_state = "receiver" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.5, /datum/material/cardboard = SHEET_MATERIAL_AMOUNT) /obj/item/weaponcrafting/receiver/create_slapcraft_component() var/static/list/slapcraft_recipe_list = list(/datum/crafting_recipe/pipegun) @@ -28,7 +29,7 @@ /obj/item/weaponcrafting/stock name = "rifle stock" desc = "A classic rifle stock that doubles as a grip, roughly carved out of wood." - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 6) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 8) resistance_flags = FLAMMABLE icon = 'icons/obj/weapons/improvised.dmi' icon_state = "riflestock" @@ -68,31 +69,61 @@ /obj/item/weaponcrafting/gunkit/nuclear name = "advanced energy gun parts kit (lethal/nonlethal)" desc = "A suitcase containing the necessary gun parts to transform a standard energy gun into an advanced energy gun." + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/glass = SHEET_MATERIAL_AMOUNT, + /datum/material/uranium = SHEET_MATERIAL_AMOUNT * 1.5, + /datum/material/titanium = HALF_SHEET_MATERIAL_AMOUNT, + ) /obj/item/weaponcrafting/gunkit/tesla name = "tesla cannon parts kit (lethal)" desc = "A suitcase containing the necessary gun parts to construct a tesla cannon around a stabilized flux anomaly. Handle with care." icon_state = "weaponskit_tesla" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 5) /obj/item/weaponcrafting/gunkit/xray name = "x-ray laser gun parts kit (lethal)" desc = "A suitcase containing the necessary gun parts to turn a laser gun into a x-ray laser gun. Do not point most parts directly towards face." + custom_materials = list( + /datum/material/gold = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/uranium = SHEET_MATERIAL_AMOUNT * 2, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/titanium = SHEET_MATERIAL_AMOUNT, + /datum/material/bluespace = SHEET_MATERIAL_AMOUNT, + ) /obj/item/weaponcrafting/gunkit/ion name = "ion carbine parts kit (nonlethal/highly destructive/very lethal (silicons))" desc = "A suitcase containing the necessary gun parts to transform a standard laser gun into a ion carbine. Perfect against lockers you don't have access to." + custom_materials = list(/datum/material/silver = SHEET_MATERIAL_AMOUNT * 3, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 4, /datum/material/uranium = SHEET_MATERIAL_AMOUNT) /obj/item/weaponcrafting/gunkit/temperature name = "temperature gun parts kit (less lethal/very lethal (lizardpeople))" desc = "A suitcase containing the necessary gun parts to transform a standard energy gun into a temperature gun. Fantastic at birthday parties and killing indigenous populations of lizardpeople." + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 1.5) /obj/item/weaponcrafting/gunkit/beam_rifle name = "\improper Event Horizon anti-existential beam rifle part kit (DOOMSDAY DEVICE, DO NOT CONSTRUCT)" desc = "What fevered minds wrought this terrible construction kit? To create a frame to harness the strange energies that flow through the Spinward Sector towards such horrible acts of violence?" + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/glass =SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/diamond = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/uranium = SHEET_MATERIAL_AMOUNT * 4, + /datum/material/silver = SHEET_MATERIAL_AMOUNT * 2.25, + /datum/material/gold = SHEET_MATERIAL_AMOUNT * 2.5, + ) /obj/item/weaponcrafting/gunkit/ebow name = "energy crossbow part kit (less lethal)" desc = "Highly illegal weapons refurbishment kit that allows you to turn the standard proto-kinetic accelerator into a near-duplicate energy crossbow. Almost like the real thing!" + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT * 1.5, + /datum/material/uranium = HALF_SHEET_MATERIAL_AMOUNT * 1.5, + /datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT * 1.5, + ) /obj/item/weaponcrafting/gunkit/hellgun name = "hellfire laser gun degradation kit (warcrime lethal)" @@ -101,6 +132,7 @@ /obj/item/weaponcrafting/gunkit/photon name = "photon cannon parts kit (nonlethal)" desc = "A suitcase containing the necessary gun parts to construct a photon cannon around a stabilized flux anomaly. Harness the power of the sun, in the palms of your hands." + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 7, /datum/material/gold = SHEET_MATERIAL_AMOUNT * 5) /obj/item/weaponcrafting/gunkit/sks name = "\improper Sakhno SKS semi-automatic rifle parts kit (lethal)" diff --git a/code/datums/components/crafting/melee_weapon.dm b/code/datums/components/crafting/melee_weapon.dm index 7cf080680fc..ed00a731287 100644 --- a/code/datums/components/crafting/melee_weapon.dm +++ b/code/datums/components/crafting/melee_weapon.dm @@ -62,6 +62,7 @@ /obj/item/melee/baton/security = 1, ) tool_behaviors = list(TOOL_WELDER) + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY time = 10 SECONDS category = CAT_WEAPON_MELEE @@ -73,6 +74,7 @@ /obj/item/melee/baton/telescopic/contractor_baton = 1, ) tool_behaviors = list(TOOL_WELDER) + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY time = 10 SECONDS category = CAT_WEAPON_MELEE diff --git a/code/datums/components/crafting/structures.dm b/code/datums/components/crafting/structures.dm index 7d95f927999..5c137e92f17 100644 --- a/code/datums/components/crafting/structures.dm +++ b/code/datums/components/crafting/structures.dm @@ -8,6 +8,7 @@ result = /obj/item/stack/sheet/paperframes result_amount = 5 category = CAT_STRUCTURE + requirements_mats_blacklist = list(/obj/item/stack/sheet/mineral/wood) /datum/crafting_recipe/rib name = "Colossal Rib" @@ -118,6 +119,12 @@ ) tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WELDER, TOOL_DRILL) time = 30 SECONDS + removed_mats = list( + /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 2, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.55, + /datum/material/titanium = SHEET_MATERIAL_AMOUNT, + /datum/material/glass = SHEET_MATERIAL_AMOUNT, + ) category = CAT_STRUCTURE /datum/crafting_recipe/vault @@ -132,6 +139,14 @@ ) tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WELDER, TOOL_DRILL) time = 90 SECONDS + removed_mats = list( + /datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT * 2, + /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 2, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.5, + /datum/material/titanium = SHEET_MATERIAL_AMOUNT, + /datum/material/glass = SHEET_MATERIAL_AMOUNT, + ) category = CAT_STRUCTURE crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND @@ -147,4 +162,10 @@ tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WELDER, TOOL_DRILL) time = 90 SECONDS category = CAT_STRUCTURE + removed_mats = list( + /datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT * 2, + /datum/material/iron = SHEET_MATERIAL_AMOUNT, + /datum/material/glass = SHEET_MATERIAL_AMOUNT, + ) crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND diff --git a/code/datums/components/crafting/tailoring.dm b/code/datums/components/crafting/tailoring.dm index b487aa6a814..e696dc2b44b 100644 --- a/code/datums/components/crafting/tailoring.dm +++ b/code/datums/components/crafting/tailoring.dm @@ -150,6 +150,7 @@ tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) reqs = list(/obj/item/clothing/glasses/hud/security/sunglasses = 1) category = CAT_EQUIPMENT + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY /datum/crafting_recipe/hudsunmed name = "Medical HUDsunglasses" @@ -168,6 +169,7 @@ tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) reqs = list(/obj/item/clothing/glasses/hud/health/sunglasses = 1) category = CAT_EQUIPMENT + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY /datum/crafting_recipe/hudsundiag name = "Diagnostic HUDsunglasses" @@ -186,6 +188,7 @@ tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) reqs = list(/obj/item/clothing/glasses/hud/diagnostic/sunglasses = 1) category = CAT_EQUIPMENT + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY /datum/crafting_recipe/scienceglasses name = "Science Glasses" @@ -204,6 +207,7 @@ tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) reqs = list(/obj/item/clothing/glasses/sunglasses/chemical = 1) category = CAT_EQUIPMENT + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY /datum/crafting_recipe/ghostsheet name = "Ghost Sheet" @@ -539,6 +543,7 @@ /obj/item/stack/sheet/mineral/metal_hydrogen = 1, /obj/item/stack/sheet/mineral/zaukerite = 1, ) + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY // stupid recipe, don't give every atmos gas mask these mats. category = CAT_CLOTHING diff --git a/code/datums/components/crafting/tools.dm b/code/datums/components/crafting/tools.dm index 539b2b765f5..dec2d685c11 100644 --- a/code/datums/components/crafting/tools.dm +++ b/code/datums/components/crafting/tools.dm @@ -16,6 +16,7 @@ blacklist = list(/obj/item/grown/log/steel) result = /obj/structure/bonfire category = CAT_TOOLS + crafting_flags = parent_type::crafting_flags | CRAFT_SKIP_MATERIALS_PARITY /datum/crafting_recipe/boneshovel name = "Serrated Bone Shovel" diff --git a/code/datums/components/crafting/weapon_ammo.dm b/code/datums/components/crafting/weapon_ammo.dm index 1caba7a44a4..0fc39ba5dec 100644 --- a/code/datums/components/crafting/weapon_ammo.dm +++ b/code/datums/components/crafting/weapon_ammo.dm @@ -101,6 +101,7 @@ tool_behaviors = list(TOOL_SCREWDRIVER) time = 1.2 SECONDS category = CAT_WEAPON_AMMO + crafting_flags = CRAFT_SKIP_MATERIALS_PARITY /datum/crafting_recipe/trashball name = "Trashball" diff --git a/code/datums/components/grillable.dm b/code/datums/components/grillable.dm index 70507457924..7a5a1298826 100644 --- a/code/datums/components/grillable.dm +++ b/code/datums/components/grillable.dm @@ -41,7 +41,7 @@ var/atom/result = new cook_result if(!item_parent.compare_materials(result)) var/warning = "custom_materials of [result.type] when grilled compared to just spawned don't match" - var/what_it_should_be = item_parent.get_materials_english_list() + var/what_it_should_be = item_parent.transcribe_materials_list() stack_trace("[warning]. custom_materials should be [what_it_should_be].") qdel(result) diff --git a/code/datums/components/trapdoor.dm b/code/datums/components/trapdoor.dm index 22ed95c3811..7407e467bf0 100644 --- a/code/datums/components/trapdoor.dm +++ b/code/datums/components/trapdoor.dm @@ -377,6 +377,7 @@ icon = 'icons/obj/devices/remote.dmi' icon_state = "trapdoor_remote" COOLDOWN_DECLARE(trapdoor_cooldown) + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) var/trapdoor_cooldown_time = 2 SECONDS var/obj/item/assembly/trapdoor/internals @@ -474,6 +475,7 @@ desc = "A kit containing all the parts needed to build a trapdoor. Can only be used on open space." icon = 'icons/obj/weapons/improvised.dmi' icon_state = "kitsuitcase" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2.2) var/in_use = FALSE /obj/item/trapdoor_kit/Initialize(mapload) diff --git a/code/datums/elements/dryable.dm b/code/datums/elements/dryable.dm index 3d7842b3089..2d720211a8b 100644 --- a/code/datums/elements/dryable.dm +++ b/code/datums/elements/dryable.dm @@ -21,7 +21,7 @@ var/atom/result = new dry_result if(!atom_target.compare_materials(result)) var/warning = "custom_materials of [result.type] when dried compared to just spawned don't match" - var/what_it_should_be = atom_target.get_materials_english_list() + var/what_it_should_be = atom_target.transcribe_materials_list() stack_trace("[warning]. custom_materials should be [what_it_should_be].") qdel(result) diff --git a/code/datums/elements/food/microwavable.dm b/code/datums/elements/food/microwavable.dm index e7efeae4501..4c67ee379cf 100644 --- a/code/datums/elements/food/microwavable.dm +++ b/code/datums/elements/food/microwavable.dm @@ -31,7 +31,7 @@ var/atom/result = new result_typepath if(!target.compare_materials(result)) var/warning = "custom_materials of [result.type] when microwaved compared to just spawned don't match" - var/what_it_should_be = target.get_materials_english_list() + var/what_it_should_be = target.transcribe_materials_list() stack_trace("[warning]. custom_materials should be [what_it_should_be].") qdel(result) diff --git a/code/datums/elements/food/processable.dm b/code/datums/elements/food/processable.dm index cffd0c5f22f..8a116c77e7f 100644 --- a/code/datums/elements/food/processable.dm +++ b/code/datums/elements/food/processable.dm @@ -45,7 +45,7 @@ var/atom/movable/result = new result_atom_type if(!prototype.compare_materials(result)) var/warning = "custom_materials of [result.type] when processed compared to just spawned don't match" - var/what_it_should_be = prototype.get_materials_english_list() + var/what_it_should_be = prototype.transcribe_materials_list() //compose a text string containing the syntax and paths to use for editing the custom_materials var if(result.custom_materials) what_it_should_be += " (you can round values a bit)" diff --git a/code/game/atom/atom_materials.dm b/code/game/atom/atom_materials.dm index a5ce12853ac..a9694b5d56c 100644 --- a/code/game/atom/atom_materials.dm +++ b/code/game/atom/atom_materials.dm @@ -29,16 +29,28 @@ /atom/proc/initialize_materials(list/materials, multiplier = 1) SHOULD_NOT_OVERRIDE(TRUE) if(multiplier != 1) - materials = materials.Copy() //avoid editing the list that was originally used as argument if it's ever going to be used again. + materials = materials.Copy() //avoid editing the original list since it may be cached somewhere (likely in the materials subsystem). for(var/current_material in materials) materials[current_material] *= multiplier + //Let's be sure that there are absolutely no materials in the list that aren't positive. + var/list/nonpos_mats + for(var/mat in materials) + if(materials[mat] <= 0) + LAZYADD(nonpos_mats, "[mat] = [materials[mat]]") + materials -= mat + if(length(nonpos_mats)) + stack_trace("materials with non-positive values found in [type]: [english_list(nonpos_mats, and_text = ", ")]") + if(!length(materials)) + return + sortTim(materials, GLOBAL_PROC_REF(cmp_numeric_dsc), associative = TRUE) apply_material_effects(materials) ///proc responsible for applying material effects when setting materials. /atom/proc/apply_material_effects(list/materials) SHOULD_CALL_PARENT(TRUE) + if(material_flags & MATERIAL_EFFECTS) var/list/material_effects = get_material_effects_list(materials) finalize_material_effects(material_effects) @@ -375,10 +387,7 @@ * Gets the most common material in the object. */ /atom/proc/get_master_material() - var/list/cached_materials = custom_materials - if(!length(cached_materials)) - return null - return GET_MATERIAL_REF(cached_materials[1]) //materials are sorted by amount, the first is always the main one + return length(custom_materials) ? GET_MATERIAL_REF(custom_materials[1]) : null //materials are sorted by amount, the first is always the main one /** * Gets the total amount of materials in this atom. @@ -387,6 +396,16 @@ return isnull(custom_materials) ? 0 : counterlist_sum(custom_materials) +///A simple proc that iterates through each material that the object is made of and spawns some stacks based on their amount and associated sheet/ore type. +/atom/proc/drop_costum_materials(multiplier = 1) + for(var/datum/material/material as anything in custom_materials) + var/stack_type = material.sheet_type || material.ore_type + if(!stack_type) + continue + var/amount_to_spawn = FLOOR(custom_materials[material] / SHEET_MATERIAL_AMOUNT * multiplier, 1) + if(amount_to_spawn > 0) + new stack_type(loc, amount_to_spawn) + /** * A bit of leeway when comparing the amount of material of two items. * This was made to test the material composition of items spawned via crafting/processable component and an items of the same type spawned @@ -401,6 +420,8 @@ /// Compares the materials of two items to see if they're roughly the same. Primarily used in crafting and processing unit tests. /atom/proc/compare_materials(atom/target) + if(custom_materials == target.custom_materials) // SSmaterials caches the combinations so we don't have to run more complex checks + return TRUE if(length(custom_materials) != length(target.custom_materials)) return FALSE for(var/mat in custom_materials) @@ -415,17 +436,20 @@ #undef COMPARISION_ACCEPTABLE_MATERIAL_DEVIATION /** - * Returns a string with the materials and their respective amounts in it (eg. [list(/datum/material/meat = 100, /datum/material/plastic = 10)] ) - * also used in several unit tests. + * Returns a string with the materials and their respective amounts written in a way that reflects how it's displayed in the code + * (eg. [list(/datum/material/meat = 100, /datum/material/plastic = 10)]). Also used in several unit tests. + * Not to be confused with get_material_english_list() */ -/atom/proc/get_materials_english_list() - if(!custom_materials) - return "null" +/atom/proc/transcribe_materials_list(list/mats_list) + if(!mats_list) + if(!custom_materials) + return "null" + mats_list = custom_materials var/text = "\[list(" var/index = 1 - var/mats_len = length(custom_materials) - for(var/datum/material/mat as anything in custom_materials) - text += "[mat.type] = [custom_materials[mat]]" + var/mats_len = length(mats_list) + for(var/datum/material/mat as anything in mats_list) + text += "[mat.type] = [mats_list[mat]]" if(index < mats_len) text += ", " index++ diff --git a/code/game/machinery/ai_core/_core.dm b/code/game/machinery/ai_core/_core.dm index 50fb2a9c732..512e193ac12 100644 --- a/code/game/machinery/ai_core/_core.dm +++ b/code/game/machinery/ai_core/_core.dm @@ -9,6 +9,7 @@ density = TRUE anchored = FALSE max_integrity = 500 + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 4) var/state = CORE_STATE_EMPTY var/datum/ai_laws/laws var/obj/item/circuitboard/aicore/circuit diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 526d6b2ab8d..891df49f776 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -7,10 +7,7 @@ desc = "The basic construction for Nanotrasen-Always-Watching-You cameras." icon = 'icons/obj/machines/camera.dmi' icon_state = "cameracase" - custom_materials = list( - /datum/material/iron = SMALL_MATERIAL_AMOUNT * 4, - /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2.5, - ) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) result_path = /obj/machinery/camera/autoname/deconstructed wall_external = TRUE diff --git a/code/game/machinery/computer/atmos_computers/_air_sensor.dm b/code/game/machinery/computer/atmos_computers/_air_sensor.dm index ad870c9520b..bb40f34fcf6 100644 --- a/code/game/machinery/computer/atmos_computers/_air_sensor.dm +++ b/code/game/machinery/computer/atmos_computers/_air_sensor.dm @@ -167,7 +167,7 @@ desc = "A device designed to detect gases and their concentration in an area." icon = 'icons/obj/wallmounts.dmi' icon_state = "gsensor0" - custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT + SMALL_MATERIAL_AMOUNT * 0.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.2) /obj/item/air_sensor/Initialize(mapload, inlet, outlet) . = ..() diff --git a/code/game/machinery/computer/telescreen.dm b/code/game/machinery/computer/telescreen.dm index 91293383cb9..6f5f335a54d 100644 --- a/code/game/machinery/computer/telescreen.dm +++ b/code/game/machinery/computer/telescreen.dm @@ -302,6 +302,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/ordnance /obj/item/wallframe/telescreen/engine name = "engine telescreen frame" result_path = /obj/machinery/computer/security/telescreen/engine + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/engine, 32) @@ -314,6 +315,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/engine, /obj/item/wallframe/telescreen/turbine name = "turbine telescreen frame" result_path = /obj/machinery/computer/security/telescreen/turbine + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/turbine, 32) @@ -350,6 +352,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/prison, /obj/item/wallframe/telescreen/auxbase name = "auxiliary base telescreen frame" result_path = /obj/machinery/computer/security/telescreen/auxbase + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/auxbase, 32) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 880313d09fb..5012c0eb1aa 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -6,6 +6,7 @@ base_icon_state = "box_" density = TRUE max_integrity = 250 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) /// What board do we accept var/board_type = /obj/item/circuitboard /// Reference to the circuit inside the frame diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index 7724bd888f1..d5ca3b4f766 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -231,6 +231,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/defibrillator_mount, 28) icon_state = "mobile" anchored = FALSE density = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.15, /datum/material/silver = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5) /obj/machinery/defibrillator_mount/mobile/Initialize(mapload) . = ..() diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index e88fc78f408..2fea89c4605 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -70,6 +70,7 @@ icon_state = "woodenbarricade" resistance_flags = FLAMMABLE bar_material = WOOD + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) /// When destroyed or deconstructed, how many planks of wood does our barricade drop? Also determines how many it takes to repair the barricade and by how much. var/drop_amount = 3 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 17c88afe648..b7ddc7d3285 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -2444,6 +2444,7 @@ aiControlDisabled = AI_WIRE_DISABLED req_access = list(ACCESS_BLOODCULT) damage_deflection = 10 + custom_materials = list(/datum/material/runedmetal = SHEET_MATERIAL_AMOUNT) var/openingoverlaytype = /obj/effect/temp_visual/cult/door var/friendly = FALSE var/stealthy = FALSE diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 82d75de6cc3..564ce8aa27c 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -815,6 +815,7 @@ base_icon_state = "frame" anchored = FALSE density = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3) var/constructionStep = CONSTRUCTION_NO_CIRCUIT var/reinforced = 0 /// Is this a border_only firelock? Used in several checks during construction @@ -971,6 +972,7 @@ flags_1 = ON_BORDER_1 obj_flags = CAN_BE_HIT | IGNORE_DENSITY directional = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/firelock_frame/border_only/Initialize(mapload) . = ..() diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index b3804ff010b..cfd1f99ba9b 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -14,6 +14,7 @@ resistance_flags = FIRE_PROOF damage_deflection = 70 can_open_with_hands = FALSE + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 15, /datum/material/iron = SMALL_MATERIAL_AMOUNT * 2, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) /// The recipe for this door var/datum/crafting_recipe/recipe_type = /datum/crafting_recipe/blast_doors /// The current deconstruction step diff --git a/code/game/machinery/doors/shutters.dm b/code/game/machinery/doors/shutters.dm index 52c12835c27..46370354003 100644 --- a/code/game/machinery/doors/shutters.dm +++ b/code/game/machinery/doors/shutters.dm @@ -9,6 +9,7 @@ armor_type = /datum/armor/poddoor_shutters max_integrity = 100 recipe_type = /datum/crafting_recipe/shutters + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 5, /datum/material/iron = SMALL_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT) animation_sound = 'sound/machines/shutter.ogg' show_nav_computer_icon = FALSE @@ -37,6 +38,7 @@ /obj/machinery/door/poddoor/shutters/preopen/deconstructed deconstruction = BLASTDOOR_NEEDS_WIRES + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 5) /obj/machinery/door/poddoor/shutters/indestructible name = "hardened shutters" diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 74fc11c9257..285b19b6c4b 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -10,6 +10,7 @@ armor_type = /datum/armor/machinery_igniter resistance_flags = FIRE_PROOF processing_flags = NONE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5 + HALF_SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT / 2) var/id = null var/on = FALSE diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index b4d4da9169f..35d87ad8064 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -24,6 +24,7 @@ mouse_drag_pointer = MOUSE_ACTIVE_POINTER use_power = NO_POWER_USE interaction_flags_mouse_drop = NEED_HANDS + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.1, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.2) /// Information and effects about where the IV drip is attached to var/datum/iv_drip_attachment/attachment diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 786cac052a4..010f374b8c4 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -19,6 +19,7 @@ Buildable meters icon_state_preview = "manifold4w" inhand_icon_state = "buildpipe" w_class = WEIGHT_CLASS_NORMAL + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) ///Piping layer that we are going to be on var/piping_layer = PIPING_LAYER_DEFAULT ///Type of pipe-object made, selected from the RPD @@ -42,65 +43,100 @@ Buildable meters /obj/item/pipe/directional RPD_type = PIPE_UNARY + /obj/item/pipe/directional/he_junction icon_state_preview = "junction" pipe_type = /obj/machinery/atmospherics/pipe/heat_exchanging/junction + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) + /obj/item/pipe/directional/vent name = "air vent fitting" icon_state_preview = "uvent" pipe_type = /obj/machinery/atmospherics/components/unary/vent_pump + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6 + SMALL_MATERIAL_AMOUNT / 2, /datum/material/glass = SMALL_MATERIAL_AMOUNT / 2) + /obj/item/pipe/directional/scrubber name = "air scrubber fitting" icon_state_preview = "scrubber" pipe_type = /obj/machinery/atmospherics/components/unary/vent_scrubber + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6 + SMALL_MATERIAL_AMOUNT / 2, /datum/material/glass = SMALL_MATERIAL_AMOUNT / 2) + /obj/item/pipe/directional/connector icon_state_preview = "connector" pipe_type = /obj/machinery/atmospherics/components/unary/portables_connector + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) + /obj/item/pipe/directional/passive_vent icon_state_preview = "pvent" pipe_type = /obj/machinery/atmospherics/components/unary/passive_vent + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) + /obj/item/pipe/directional/injector icon_state_preview = "injector" pipe_type = /obj/machinery/atmospherics/components/unary/outlet_injector + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2, /datum/material/glass = SMALL_MATERIAL_AMOUNT / 2) + /obj/item/pipe/directional/he_exchanger icon_state_preview = "heunary" pipe_type = /obj/machinery/atmospherics/components/unary/heat_exchanger + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT) + /obj/item/pipe/directional/airlock_pump icon_state_preview = "airlock_pump" pipe_type = /obj/machinery/atmospherics/components/unary/airlock_pump + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7) + /obj/item/pipe/binary RPD_type = PIPE_STRAIGHT + /obj/item/pipe/binary/layer_adapter icon_state_preview = "manifoldlayer" pipe_type = /obj/machinery/atmospherics/pipe/layer_manifold + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) + /obj/item/pipe/binary/color_adapter icon_state_preview = "adapter_center" pipe_type = /obj/machinery/atmospherics/pipe/color_adapter + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) + /obj/item/pipe/binary/pressure_pump icon_state_preview = "pump" pipe_type = /obj/machinery/atmospherics/components/binary/pump + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6, /datum/material/glass = SMALL_MATERIAL_AMOUNT / 2) + /obj/item/pipe/binary/manual_valve icon_state_preview = "mvalve" pipe_type = /obj/machinery/atmospherics/components/binary/valve + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) + /obj/item/pipe/binary/bendable RPD_type = PIPE_BENDABLE + /obj/item/pipe/trinary RPD_type = PIPE_TRINARY + /obj/item/pipe/trinary/flippable RPD_type = PIPE_TRIN_M var/flipped = FALSE + /obj/item/pipe/trinary/flippable/filter name = "gas filter fitting" icon_state_preview = "filter" pipe_type = /obj/machinery/atmospherics/components/trinary/filter + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6, /datum/material/glass = SMALL_MATERIAL_AMOUNT / 2) + /obj/item/pipe/trinary/flippable/mixer icon_state_preview = "mixer" pipe_type = /obj/machinery/atmospherics/components/trinary/mixer + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6, /datum/material/glass = SMALL_MATERIAL_AMOUNT / 2) + /obj/item/pipe/quaternary RPD_type = PIPE_ONEDIR + /obj/item/pipe/quaternary/pipe icon_state_preview = "manifold4w" pipe_type = /obj/machinery/atmospherics/pipe/smart + /obj/item/pipe/quaternary/pipe/crafted /obj/item/pipe/quaternary/pipe/crafted/Initialize(mapload, _pipe_type, _dir, obj/machinery/atmospherics/make_from, device_color, device_init_dir = SOUTH) @@ -114,6 +150,7 @@ Buildable meters /obj/item/pipe/quaternary/he_pipe icon_state_preview = "he_manifold4w" pipe_type = /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/item/pipe/Initialize(mapload, _pipe_type, _dir, obj/machinery/atmospherics/make_from, device_color, device_init_dir = SOUTH) if(make_from) diff --git a/code/game/machinery/porta_turret/portable_turret_construct.dm b/code/game/machinery/porta_turret/portable_turret_construct.dm index d84f7bee725..6b06894e010 100644 --- a/code/game/machinery/porta_turret/portable_turret_construct.dm +++ b/code/game/machinery/porta_turret/portable_turret_construct.dm @@ -17,6 +17,7 @@ density = TRUE obj_flags = UNIQUE_RENAME | RENAME_NO_DESC use_power = NO_POWER_USE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) var/build_step = PTURRET_UNSECURED //the current step in the building process var/finish_name = "turret" //the name applied to the product turret var/obj/item/gun/installed_gun = null diff --git a/code/game/machinery/porta_turret/turret_control.dm b/code/game/machinery/porta_turret/turret_control.dm index ef1488cb1dc..368c3cfeb50 100644 --- a/code/game/machinery/porta_turret/turret_control.dm +++ b/code/game/machinery/porta_turret/turret_control.dm @@ -210,4 +210,4 @@ icon = 'icons/obj/machines/turret_control.dmi' icon_state = "control_frame" result_path = /obj/machinery/turretid - custom_materials = list(/datum/material/iron= SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index ae9ee9c4d11..018bfd65e50 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -547,6 +547,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/requests_console/auto_name, 30) icon_state = "req_comp_off" result_path = /obj/machinery/requests_console/auto_name pixel_shift = 30 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) /datum/aas_config_entry/rc_emergency name = "RC Alert: Emergency Request" diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 87c4857d20f..3010b84b19e 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -324,6 +324,7 @@ cell = null interaction_flags_click = FORBID_TELEKINESIS_REACH settable_temperature_range = 50 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 3, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) ///The beaker within the heater var/obj/item/reagent_containers/beaker = null /// How quickly it delivers heat to the reagents. In watts per joule of the thermal energy difference of the reagent from the temperature difference of the current and target temperatures. diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 726338848ec..68092473fa5 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -15,6 +15,7 @@ subsystem_type = /datum/controller/subsystem/processing/fastprocess interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_OFFLINE use_power = NO_POWER_USE + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 10) /// What is the lowest amount of time we can set the timer to? var/minimum_timer = SYNDIEBOMB_MIN_TIMER_SECONDS @@ -356,6 +357,7 @@ w_class = WEIGHT_CLASS_NORMAL flags_1 = PREVENT_CONTENTS_EXPLOSION_1 // We detonate upon being exploded. resistance_flags = FLAMMABLE //Burnable (but the casing isn't) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.05) var/adminlog = null var/range_heavy = 3 var/range_medium = 9 diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index 36efc61481d..89f9a14d99c 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -8,6 +8,7 @@ resistance_flags = FLAMMABLE obj_flags = CAN_BE_HIT item_flags = NO_PIXEL_RANDOM_DROP + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 5) /// If the cutout is pushed over and has to be righted var/pushed_over = FALSE /// If the cutout actually appears as what it portray and not a discolored version diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index a8e72017260..9db7cf8cd4a 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -2058,6 +2058,7 @@ worn_icon_state = "nothing" resistance_flags = FLAMMABLE slot_flags = ITEM_SLOT_ID + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT) ///The "name" of the "owner" of this "ID" var/scribbled_name ///The assignment written on this card. diff --git a/code/game/objects/items/chainsaw.dm b/code/game/objects/items/chainsaw.dm index d316725fbfe..ed5a62cc562 100644 --- a/code/game/objects/items/chainsaw.dm +++ b/code/game/objects/items/chainsaw.dm @@ -24,6 +24,7 @@ actions_types = list(/datum/action/item_action/startchainsaw) tool_behaviour = TOOL_SAW toolspeed = 1.5 //Turn it on first you dork + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 3) var/force_on = 24 /// The looping sound for our chainsaw when running var/datum/looping_sound/chainsaw/chainsaw_loop diff --git a/code/game/objects/items/cigarettes.dm b/code/game/objects/items/cigarettes.dm index 504177cd622..d73045b6718 100644 --- a/code/game/objects/items/cigarettes.dm +++ b/code/game/objects/items/cigarettes.dm @@ -163,7 +163,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM name = "firebrand" desc = "An unlit firebrand. It makes you wonder why it's not just called a stick." smoketime = 40 SECONDS - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) grind_results = list(/datum/reagent/carbon = 2) /obj/item/match/firebrand/Initialize(mapload) @@ -175,6 +175,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM desc = "A budget lighter done by using a battery and some aluminium. Hold tightly to ignite." icon_state = "battery_unlit" base_icon_state = "battery" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 7, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) /obj/item/match/battery/attack_self(mob/living/user, modifiers) . = ..() @@ -932,6 +933,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM list_reagents = null w_class = WEIGHT_CLASS_SMALL choke_forever = TRUE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) ///name of the stuff packed inside this pipe var/packeditem @@ -1009,7 +1011,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM inhand_icon_on = null inhand_icon_off = null lung_harm = 2 - custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 3) /////////// //ROLLING// diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index 7d8b4da6a41..b551c50b627 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -229,6 +229,7 @@ inhand_icon_state = "gold_horn" worn_icon_state = "horn_gold" COOLDOWN_DECLARE(golden_horn_cooldown) + custom_materials = list(/datum/material/bananium = SHEET_MATERIAL_AMOUNT * 5) /obj/item/bikehorn/golden/attack() flip_mobs() diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index fd9eba7ec27..1f9a78e3f3f 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -35,12 +35,14 @@ desc = "A stylish upgrade (?) to the intelliCard." icon_state = "aitater" base_icon_state = "aitater" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) /obj/item/aicard/aispook name = "intelliLantern" desc = "A spoOoOoky upgrade to the intelliCard." icon_state = "aispook" base_icon_state = "aispook" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) /obj/item/aicard/suicide_act(mob/living/user) user.visible_message(span_suicide("[user] is trying to upload [user.p_them()]self into [src]! That's not going to work out well!")) diff --git a/code/game/objects/items/devices/pressureplates.dm b/code/game/objects/items/devices/pressureplates.dm index d75682d72a4..d1bff2e7432 100644 --- a/code/game/objects/items/devices/pressureplates.dm +++ b/code/game/objects/items/devices/pressureplates.dm @@ -9,6 +9,7 @@ icon_state = "pressureplate" layer = ABOVE_OPEN_TURF_LAYER plane = FLOOR_PLANE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.75, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7) var/trigger_mob = TRUE var/trigger_item = FALSE var/specific_item = null diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 932d31a08d8..706a5749846 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -197,7 +197,7 @@ icon_state = "intercom" result_path = /obj/item/radio/intercom/unscrewed pixel_shift = 26 - custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.75, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.25) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) MAPPING_DIRECTIONAL_HELPERS(/obj/item/radio/intercom, 27) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index f5b569b5532..b4c9c628c05 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -404,6 +404,7 @@ effective or pretty fucking useless. desc = "A jury-rigged device that disrupts nearby radio communication. Its crude construction provides a significantly smaller area of effect compared to its Syndicate counterpart." range = 5 disruptor_range = 3 + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) /obj/item/jammer/makeshift/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm index f9508f3791b..9f58808a752 100644 --- a/code/game/objects/items/extinguisher.dm +++ b/code/game/objects/items/extinguisher.dm @@ -162,7 +162,7 @@ throwforce = 1 w_class = WEIGHT_CLASS_SMALL force = 3 - custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.4) + custom_materials = null max_water = 30 sprite_name = "coolant" dog_fashion = null diff --git a/code/game/objects/items/fireaxe.dm b/code/game/objects/items/fireaxe.dm index ed88848ea6d..a6f1469dab2 100644 --- a/code/game/objects/items/fireaxe.dm +++ b/code/game/objects/items/fireaxe.dm @@ -83,6 +83,7 @@ GLOBAL_DATUM(bridge_axe, /obj/item/fireaxe) icon_angle = 180 force_unwielded = 5 force_wielded = 23 + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 6) /* * Metal Hydrogen Axe diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index e406dbb6f5c..29a410dcb10 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -12,7 +12,7 @@ throw_speed = 1 throw_range = 5 w_class = WEIGHT_CLASS_NORMAL - custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT * 0.5) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.8) resistance_flags = FIRE_PROOF trigger_guard = TRIGGER_GUARD_NORMAL light_system = OVERLAY_LIGHT diff --git a/code/game/objects/items/flatpacks.dm b/code/game/objects/items/flatpacks.dm index 8894b05f7b8..b2a49a51787 100644 --- a/code/game/objects/items/flatpacks.dm +++ b/code/game/objects/items/flatpacks.dm @@ -103,6 +103,7 @@ icon_state = "flatcart" density = TRUE opacity = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 8, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT) /obj/structure/flatpack_cart/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/food/cheese.dm b/code/game/objects/items/food/cheese.dm index ee608c7e408..78d590fa10a 100644 --- a/code/game/objects/items/food/cheese.dm +++ b/code/game/objects/items/food/cheese.dm @@ -87,6 +87,7 @@ tastes = list("cheese" = 4, "royalty" = 1) rat_heal = 70 crafting_complexity = FOOD_COMPLEXITY_3 + custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 5) //Curd cheese, a general term which I will now proceed to stretch as thin as the toppings on a supermarket sandwich: //I'll use it as a substitute for ricotta, cottage cheese and quark, as well as any other non-aged, soft grainy cheese diff --git a/code/game/objects/items/food/sandwichtoast.dm b/code/game/objects/items/food/sandwichtoast.dm index 1a3b02d70eb..6e92d401378 100644 --- a/code/game/objects/items/food/sandwichtoast.dm +++ b/code/game/objects/items/food/sandwichtoast.dm @@ -270,6 +270,7 @@ tastes = list("bread" = 1, "meat" = 1, "tomato sauce" = 1, "death" = 1) foodtypes = MEAT|VEGETABLES|GRAIN eat_time = 4 SECONDS // Makes it harder to force-feed this to people as a weapon, as funny as that is. + custom_materials = list(/datum/material/meat = MEATSLAB_MATERIAL_AMOUNT * 2) var/static/list/correct_clothing = list(/obj/item/clothing/under/rank/civilian/cookjorts, /obj/item/clothing/under/shorts/jeanshorts) /obj/item/food/sandwich/death/Initialize(mapload) diff --git a/code/game/objects/items/grenades/chem_grenade.dm b/code/game/objects/items/grenades/chem_grenade.dm index 98b7edf19ae..b5780ea8406 100644 --- a/code/game/objects/items/grenades/chem_grenade.dm +++ b/code/game/objects/items/grenades/chem_grenade.dm @@ -6,6 +6,7 @@ inhand_icon_state = "flashbang" w_class = WEIGHT_CLASS_SMALL force = 2 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) /// Which stage of construction this grenade is currently at. var/stage = GRENADE_EMPTY /// The set of reagent containers that have been added to this grenade casing. diff --git a/code/game/objects/items/grenades/ghettobomb.dm b/code/game/objects/items/grenades/ghettobomb.dm index 1a7dc6f4fff..dec21fdc1f4 100644 --- a/code/game/objects/items/grenades/ghettobomb.dm +++ b/code/game/objects/items/grenades/ghettobomb.dm @@ -16,6 +16,7 @@ shrapnel_type = /obj/projectile/bullet/shrapnel/ied det_time = 225 SECONDS //this is handled by assemblies now display_timer = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.65, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) /// Explosive power var/power = 5 /// Our assembly that when activated causes us to explode diff --git a/code/game/objects/items/gun_maintenance.dm b/code/game/objects/items/gun_maintenance.dm index 77ba8035291..d580d37fe25 100644 --- a/code/game/objects/items/gun_maintenance.dm +++ b/code/game/objects/items/gun_maintenance.dm @@ -14,6 +14,7 @@ w_class = WEIGHT_CLASS_BULKY drop_sound = 'sound/items/handling/ammobox_drop.ogg' pickup_sound = 'sound/items/handling/ammobox_pickup.ogg' + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6) /// How many times we can use this maintenance kit to maintain a gun var/uses = 3 /// THe maximum uses, used for our examine text. diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index f4c36f02456..6433aca9a06 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -208,7 +208,7 @@ var/cable_color = CABLE_COLOR_RED lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - custom_materials = list(/datum/material/iron= SMALL_MATERIAL_AMOUNT * 1.5, /datum/material/glass= SMALL_MATERIAL_AMOUNT * 0.75) + custom_materials = list(/datum/material/iron= SMALL_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5) breakouttime = 30 SECONDS cuffsound = 'sound/items/weapons/cablecuff.ogg' pickup_sound = null @@ -572,6 +572,7 @@ righthand_file = 'icons/mob/inhands/weapons/thrown_righthand.dmi' breakouttime = 3.5 SECONDS//easy to apply, easy to break out of gender = NEUTER + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5) ///Amount of time to knock the target down for once it's hit in deciseconds. var/knockdown = 0 ///Reference of the mob we will attempt to snare @@ -624,6 +625,7 @@ inhand_icon_state = "bola_r" breakouttime = 7 SECONDS knockdown = 3.5 SECONDS + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 6.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7) /** * A security variant of the bola. @@ -639,6 +641,7 @@ w_class = WEIGHT_CLASS_SMALL breakouttime = 6 SECONDS custom_price = PAYCHECK_COMMAND * 0.35 + custom_materials = null /obj/item/restraints/legcuffs/bola/energy/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/inspector.dm b/code/game/objects/items/inspector.dm index 8a08562bd84..44149136307 100644 --- a/code/game/objects/items/inspector.dm +++ b/code/game/objects/items/inspector.dm @@ -336,6 +336,7 @@ icon_state = "bananium_inspector" w_class = WEIGHT_CLASS_SMALL max_mode = BANANIUM_CLOWN_INSPECTOR_PRINT_SOUND_MODE_LAST + custom_materials = list(/datum/material/bananium = SHEET_MATERIAL_AMOUNT * 5) ///How many more times can we print? var/paper_charges = 32 ///Max value of paper_charges diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm index 5ca2ae02bb4..bf6b715d2b3 100644 --- a/code/game/objects/items/kitchen.dm +++ b/code/game/objects/items/kitchen.dm @@ -167,7 +167,7 @@ throwforce = 5 throw_speed = 3 throw_range = 7 - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 1.5) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) resistance_flags = FLAMMABLE w_class = WEIGHT_CLASS_NORMAL attack_verb_continuous = list("bashes", "batters", "bludgeons", "thrashes", "whacks") diff --git a/code/game/objects/items/knives.dm b/code/game/objects/items/knives.dm index 963728761c0..fcda07ed897 100644 --- a/code/game/objects/items/knives.dm +++ b/code/game/objects/items/knives.dm @@ -217,7 +217,7 @@ obj_flags = parent_type::obj_flags & ~CONDUCTS_ELECTRICITY force = 15 throwforce = 15 - custom_materials = null + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2) /datum/embedding/combat_knife/weak embed_chance = 35 @@ -245,7 +245,7 @@ attack_verb_continuous = list("shanks", "shivs") attack_verb_simple = list("shank", "shiv") armor_type = /datum/armor/none - custom_materials = list(/datum/material/glass = SMALL_MATERIAL_AMOUNT * 4) + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT) /obj/item/knife/shiv/make_stabby() AddComponent(/datum/component/alternative_sharpness, SHARP_POINTY, alt_continuous, alt_simple, -3) @@ -258,7 +258,7 @@ force = 9 throwforce = 13 armor_type = /datum/armor/shiv_plasma - custom_materials = list(/datum/material/glass=SMALL_MATERIAL_AMOUNT *4, /datum/material/plasma=SMALL_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT) /datum/armor/shiv_plasma melee = 25 @@ -278,7 +278,7 @@ throw_range = 7 wound_bonus = 10 armor_type = /datum/armor/shiv_titanium - custom_materials = list(/datum/material/glass=SMALL_MATERIAL_AMOUNT * 4, /datum/material/titanium=SMALL_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/alloy/titaniumglass = SHEET_MATERIAL_AMOUNT) /datum/armor/shiv_titanium melee = 25 @@ -301,7 +301,7 @@ wound_bonus = 10 exposed_wound_bonus = 20 armor_type = /datum/armor/shiv_plastitanium - custom_materials = list(/datum/material/glass= SMALL_MATERIAL_AMOUNT * 4, /datum/material/alloy/plastitanium= SMALL_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/alloy/plastitaniumglass = SHEET_MATERIAL_AMOUNT) /datum/armor/shiv_plastitanium melee = 50 diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index b2190cdc886..3439e6867f5 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -15,6 +15,7 @@ w_class = WEIGHT_CLASS_TINY throw_speed = 1 throw_range = 7 + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.2, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.2) var/state = DEFLATED var/datum/gas_mixture/air_contents = null diff --git a/code/game/objects/items/melee/baton.dm b/code/game/objects/items/melee/baton.dm index b7aa2f91eee..06293e29b5b 100644 --- a/code/game/objects/items/melee/baton.dm +++ b/code/game/objects/items/melee/baton.dm @@ -836,6 +836,7 @@ slot_flags = ITEM_SLOT_BACK convertible = FALSE active_changes_inhand = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.15, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) var/obj/item/assembly/igniter/sparkler ///Determines whether or not we can improve the cattleprod into a new type. Prevents turning the cattleprod subtypes into different subtypes, or wasting materials on making it....another version of itself. var/can_upgrade = TRUE @@ -925,6 +926,7 @@ inhand_icon_state = "teleprod" slot_flags = null can_upgrade = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.15, /datum/material/bluespace = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) /obj/item/melee/baton/security/cattleprod/teleprod/clumsy_check(mob/living/carbon/human/user) . = ..() diff --git a/code/game/objects/items/melee/chainofcommand.dm b/code/game/objects/items/melee/chainofcommand.dm index ba4f4064d1f..ed0482f4abc 100644 --- a/code/game/objects/items/melee/chainofcommand.dm +++ b/code/game/objects/items/melee/chainofcommand.dm @@ -75,6 +75,7 @@ icon_state = "tailwhip" inhand_icon_state = "tailwhip" item_flags = NONE + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.1) /obj/item/melee/chainofcommand/tailwhip/kitty name = "cat o' nine tails" diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index b0d917da2f5..5f4b96d3363 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -243,6 +243,7 @@ armour_penetration = 1000 force_string = "INFINITE" item_flags = NEEDS_PERMIT|NO_BLOOD_ON_ITEM + custom_materials = list(/datum/material/adamantine = SHEET_MATERIAL_AMOUNT * 20, /datum/material/iron = SHEET_MATERIAL_AMOUNT) var/obj/machinery/power/supermatter_crystal/shard var/balanced = 1 diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index dfff30effdc..2e23ffdfbb7 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -220,6 +220,7 @@ GLOBAL_LIST_EMPTY(sniffable_sheets) desc = "A handheld tracking device that locates sheets of glass and iron." icon_state = "pinpointer_sniffer" worn_icon_state = "pinpointer_black" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.8, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7) /obj/item/pinpointer/material_sniffer/scan_for_target() if(target || !GLOB.sniffable_sheets.len) diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumatic_cannon.dm similarity index 99% rename from code/game/objects/items/pneumaticCannon.dm rename to code/game/objects/items/pneumatic_cannon.dm index e8fe75c74b3..8ea0ee60b67 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumatic_cannon.dm @@ -20,6 +20,7 @@ lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi' armor_type = /datum/armor/item_pneumatic_cannon + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6) var/maxWeightClass = 20 //The max weight of items that can fit into the cannon var/loadedWeightClass = 0 //The weight of items currently in the cannon var/obj/item/tank/internals/tank = null //The gas tank that is drawn from to fire things diff --git a/code/game/objects/items/rcd/RCL.dm b/code/game/objects/items/rcd/RCL.dm index 1d966d37670..6c48d2f691d 100644 --- a/code/game/objects/items/rcd/RCL.dm +++ b/code/game/objects/items/rcd/RCL.dm @@ -324,6 +324,7 @@ max_amount = 30 name = "makeshift rapid pipe cleaner layer" ghetto = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 15) /obj/item/rcl/ghetto/update_icon_state() if(!loaded) diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 558b5f12b7b..e74cd0af6a0 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -9,6 +9,7 @@ attack_verb_simple = list("forcefully inspire", "violently encourage", "relentlessly galvanize") lefthand_file = 'icons/mob/inhands/equipment/banners_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/banners_righthand.dmi' + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) var/inspiration_available = TRUE //If this banner can be used to inspire crew var/morale_time = 0 var/morale_cooldown = 600 //How many deciseconds between uses diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 4393a980e00..5c3211b4f9a 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -117,7 +117,7 @@ desc = "A medieval wooden buckler." icon_state = "buckler" inhand_icon_state = "buckler" - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 20) resistance_flags = FLAMMABLE block_chance = 30 max_integrity = 55 @@ -131,6 +131,7 @@ block_chance = 40 max_integrity = 40 w_class = WEIGHT_CLASS_NORMAL + custom_materials = null /obj/item/shield/kite name = "kite shield" @@ -167,7 +168,7 @@ desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder, less so bullets and laser beams." icon_state = "riot" inhand_icon_state = "riot" - custom_materials = list(/datum/material/glass= SHEET_MATERIAL_AMOUNT * 3.75, /datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/glass= SHEET_MATERIAL_AMOUNT * 4.05, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.8) transparent = TRUE max_integrity = 75 shield_break_sound = 'sound/effects/glass/glassbr3.ogg' @@ -203,6 +204,7 @@ icon_state = "flashshield" inhand_icon_state = "flashshield" var/obj/item/assembly/flash/handheld/embedded_flash = /obj/item/assembly/flash/handheld + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.1, /datum/material/glass= SHEET_MATERIAL_AMOUNT * 4.35) /obj/item/shield/riot/flash/Initialize(mapload) . = ..() @@ -479,7 +481,7 @@ desc = "A crude shield made out of several sheets of iron taped together, not very durable." icon_state = "improvised" inhand_icon_state = "improvised" - custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10) max_integrity = 35 shield_break_leftover = /obj/item/stack/rods/two armor_type = /datum/armor/item_shield/improvised diff --git a/code/game/objects/items/signs.dm b/code/game/objects/items/signs.dm index a1b60aad298..6b70eb9cad8 100644 --- a/code/game/objects/items/signs.dm +++ b/code/game/objects/items/signs.dm @@ -10,7 +10,7 @@ attack_verb_continuous = list("bashes", "smacks") attack_verb_simple = list("bash", "smack") resistance_flags = FLAMMABLE - + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) var/label = "" COOLDOWN_DECLARE(picket_sign_cooldown) diff --git a/code/game/objects/items/skateboards.dm b/code/game/objects/items/skateboards.dm index f03189ec012..0d860ef11f9 100644 --- a/code/game/objects/items/skateboards.dm +++ b/code/game/objects/items/skateboards.dm @@ -10,6 +10,7 @@ w_class = WEIGHT_CLASS_NORMAL attack_verb_continuous = list("smacks", "whacks", "slams", "smashes") attack_verb_simple = list("smack", "whack", "slam", "smash") + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10) ///The vehicle counterpart for the board var/board_item_type = /obj/vehicle/ridden/scooter/skateboard diff --git a/code/game/objects/items/spear.dm b/code/game/objects/items/spear.dm index be6a468e1b9..5282cf2fb42 100644 --- a/code/game/objects/items/spear.dm +++ b/code/game/objects/items/spear.dm @@ -16,7 +16,7 @@ demolition_mod = 0.75 // Note: This is significant, as this needs to be low enough that any possible force adjustments from better spears does not go over airlock deflection. See AIRLOCK_DAMAGE_DEFLECTION_N. embed_type = /datum/embedding/spear armour_penetration = 5 - custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/glass= HALF_SHEET_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.65, /datum/material/glass= SHEET_MATERIAL_AMOUNT * 1.15) hitsound = 'sound/items/weapons/bladeslice.ogg' attack_verb_continuous = list("attacks", "pokes", "jabs", "tears", "lacerates", "gores") attack_verb_simple = list("attack", "poke", "jab", "tear", "lacerate", "gore") @@ -96,7 +96,6 @@ if(/obj/item/shard/plasma) force = 11 throwforce = 21 - custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT, /datum/material/alloy/plasmaglass= HALF_SHEET_MATERIAL_AMOUNT * 2) icon_prefix = "spearplasma" modify_max_integrity(220) wound_bonus = -10 @@ -115,7 +114,6 @@ throwforce = 22 throw_range = 8 throw_speed = 5 - custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT, /datum/material/alloy/titaniumglass= HALF_SHEET_MATERIAL_AMOUNT * 2) modify_max_integrity(230) wound_bonus = -5 force_unwielded = 12 @@ -135,7 +133,6 @@ throwforce = 23 throw_range = 9 throw_speed = 5 - custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT, /datum/material/alloy/plastitaniumglass= HALF_SHEET_MATERIAL_AMOUNT * 2) modify_max_integrity(240) wound_bonus = 0 exposed_wound_bonus = 20 @@ -307,7 +304,7 @@ icon_prefix = "bone_spear" throwforce = 22 armour_penetration = 20 //Enhanced armor piercing - custom_materials = list(/datum/material/bone = HALF_SHEET_MATERIAL_AMOUNT * 7) + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 4) force_unwielded = 12 force_wielded = 20 spear_leftovers = /obj/item/stack/sheet/bone @@ -331,7 +328,7 @@ desc = "A haphazardly-constructed bamboo stick with a sharpened tip, ready to poke holes into unsuspecting people." throwforce = 23 //Better to throw - custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 20) + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 25) spear_leftovers = /obj/item/stack/sheet/mineral/bamboo /obj/item/spear/bamboospear/add_headpike_component() diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index fc19ce70ccc..18e7d62ddc2 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -11,7 +11,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ new/datum/stack_recipe("ladder", /obj/structure/ladder/crafted, 15, time = 15 SECONDS, crafting_flags = CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \ new/datum/stack_recipe("catwalk floor tile", /obj/item/stack/tile/catwalk_tile, 1, 4, 20, category = CAT_TILES), \ new/datum/stack_recipe("stairs frame", /obj/structure/stairs_frame, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \ - new/datum/stack_recipe("probing cane", /obj/item/cane/white, 3, time = 1 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY, category = CAT_TOOLS), \ + new/datum/stack_recipe("probing cane", /obj/item/cane/white, 3, time = 1 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_TOOLS), \ new/datum/stack_recipe("sharpened iron rod", /obj/item/ammo_casing/rebar, 1, time = 0.2 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY, category = CAT_WEAPON_AMMO), \ )) @@ -28,7 +28,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ throw_speed = 3 throw_range = 7 demolition_mod = 1.25 - mats_per_unit = list(/datum/material/iron=HALF_SHEET_MATERIAL_AMOUNT) + mats_per_unit = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) max_amount = 50 attack_verb_continuous = list("hits", "bludgeons", "whacks") attack_verb_simple = list("hit", "bludgeon", "whack") diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index c2547cbbea7..a0d56b03c44 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -146,7 +146,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \ null, \ new/datum/stack_recipe("directional reinforced window", /obj/structure/window/reinforced/unanchored, time = 0.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_CHECK_DIRECTION, category = CAT_WINDOWS), \ new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/reinforced/fulltile/unanchored, 2, time = 2 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_IS_FULLTILE, category = CAT_WINDOWS), \ - new/datum/stack_recipe("glass shard", /obj/item/shard, time = 10, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND, category = CAT_MISC), \ + new/datum/stack_recipe("glass shard", /obj/item/shard, time = 10, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_MISC), \ new/datum/stack_recipe("reinforced glass tile", /obj/item/stack/tile/rglass, 1, 4, 20, category = CAT_TILES) \ )) @@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \ GLOBAL_LIST_INIT(prglass_recipes, list ( \ new/datum/stack_recipe("directional reinforced window", /obj/structure/window/reinforced/plasma/unanchored, time = 0.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_CHECK_DIRECTION, category = CAT_WINDOWS), \ new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/reinforced/plasma/fulltile/unanchored, 2, time = 2 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_IS_FULLTILE, category = CAT_WINDOWS), \ - new/datum/stack_recipe("plasma glass shard", /obj/item/shard/plasma, time = 40, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND, category = CAT_MISC), \ + new/datum/stack_recipe("plasma glass shard", /obj/item/shard/plasma, time = 40, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_MISC), \ new/datum/stack_recipe("reinforced plasma glass tile", /obj/item/stack/tile/rglass/plasma, 1, 4, 20, category = CAT_TILES) \ )) @@ -377,6 +377,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( to_chat(user, span_notice("You begin to wrap the [cloth] around the [src]...")) if(do_after(user, craft_time, target = src)) var/obj/item/knife/shiv/shiv = new shiv_type + shiv.set_custom_materials(custom_materials) cloth.use(1) to_chat(user, span_notice("You wrap the [cloth] around the [src], forming a makeshift weapon.")) remove_item_from_storage(src, user) diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm index 8597cfc859f..9fa92aee9c2 100644 --- a/code/game/objects/items/stacks/sheets/light.dm +++ b/code/game/objects/items/stacks/sheets/light.dm @@ -12,6 +12,7 @@ obj_flags = CONDUCTS_ELECTRICITY max_amount = 60 grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/copper = 5) + mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05) merge_type = /obj/item/stack/light_w /obj/item/stack/light_w/examine(mob/user) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 0decdd0706c..c427dda7816 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -24,9 +24,9 @@ Mineral Sheets */ GLOBAL_LIST_INIT(sandstone_recipes, list ( \ - new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \ + new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ new/datum/stack_recipe("sandstone platform", /obj/structure/platform/sandstone, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \ - new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND, category = CAT_MISC), \ + new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_NO_MATERIALS, category = CAT_MISC), \ )) /obj/item/stack/sheet/mineral/sandstone @@ -108,7 +108,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \ walltype = /turf/closed/wall/mineral/diamond GLOBAL_LIST_INIT(diamond_recipes, list ( \ - new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \ + new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ new/datum/stack_recipe("diamond tile", /obj/item/stack/tile/mineral/diamond, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ )) @@ -139,7 +139,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \ walltype = /turf/closed/wall/mineral/uranium GLOBAL_LIST_INIT(uranium_recipes, list ( \ - new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \ + new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ new/datum/stack_recipe("depleted uranium platform", /obj/structure/platform/uranium, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \ new/datum/stack_recipe("uranium tile", /obj/item/stack/tile/mineral/uranium, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ )) @@ -180,7 +180,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \ return TOXLOSS//dont you kids know that stuff is toxic? GLOBAL_LIST_INIT(plasma_recipes, list ( \ - new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \ + new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ new/datum/stack_recipe("plasma tile", /obj/item/stack/tile/mineral/plasma, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ )) @@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \ walltype = /turf/closed/wall/mineral/gold GLOBAL_LIST_INIT(gold_recipes, list ( \ - new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \ + new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ new/datum/stack_recipe("golden platform", /obj/structure/platform/gold, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \ new/datum/stack_recipe("gold tile", /obj/item/stack/tile/mineral/gold, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ new/datum/stack_recipe("blank plaque", /obj/item/plaque, 1, crafting_flags = NONE, category = CAT_FURNITURE), \ @@ -246,7 +246,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \ walltype = /turf/closed/wall/mineral/silver GLOBAL_LIST_INIT(silver_recipes, list ( \ - new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \ + new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ new/datum/stack_recipe("silver platform", /obj/structure/platform/silver, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \ new/datum/stack_recipe("silver tile", /obj/item/stack/tile/mineral/silver, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ )) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index e3986fa248c..1746ef9000e 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -145,7 +145,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \ new/datum/stack_recipe("tram controller frame", /obj/item/wallframe/tram, 20, crafting_flags = NONE, category = CAT_STRUCTURE), \ new/datum/stack_recipe("tram display frame", /obj/item/wallframe/indicator_display, 7, crafting_flags = NONE, category = CAT_STRUCTURE), \ null, \ - new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \ + new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ new/datum/stack_recipe("filing cabinet", /obj/structure/filingcabinet, 2, time = 10 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE), \ new/datum/stack_recipe("desk bell", /obj/structure/desk_bell, 2, time = 3 SECONDS, crafting_flags = NONE, category = CAT_FURNITURE), \ new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \ @@ -373,7 +373,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \ new/datum/stack_recipe("rake", /obj/item/cultivator/rake, 5, time = 1 SECONDS, crafting_flags = NONE, category = CAT_TOOLS),\ new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_CONTAINERS),\ new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE),\ - new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 1.5 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE),\ + new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 1.5 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE, removed_mats = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 1.5)),\ new/datum/stack_recipe("wooden crutch", /obj/item/cane/crutch/wood, 5, time = 1.5 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE),\ new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 1.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_TOOLS), \ new/datum/stack_recipe("mortar", /obj/item/reagent_containers/cup/mortar, 3, crafting_flags = NONE, category = CAT_CHEMISTRY), \ @@ -451,7 +451,7 @@ GLOBAL_LIST_INIT(bamboo_recipes, list ( \ new/datum/stack_recipe("bamboo spear", /obj/item/spear/bamboospear, 25, time = 9 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE), \ new/datum/stack_recipe("blow gun", /obj/item/gun/syringe/blowgun, 10, time = 7 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_RANGED), \ new/datum/stack_recipe("crude syringe", /obj/item/reagent_containers/syringe/crude, 5, time = 1 SECONDS, crafting_flags = NONE, category = CAT_CHEMISTRY), \ - new/datum/stack_recipe("rice hat", /obj/item/clothing/head/costume/rice_hat, 10, time = 7 SECONDS, crafting_flags = NONE, category = CAT_CLOTHING), \ + new/datum/stack_recipe("rice hat", /obj/item/clothing/head/costume/rice_hat, 10, time = 7 SECONDS, crafting_flags = CRAFT_SKIP_MATERIALS_PARITY, category = CAT_CLOTHING), \ null, \ new/datum/stack_recipe("bamboo stool", /obj/structure/chair/stool/bamboo, 2, time = 1 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE), \ new/datum/stack_recipe("bamboo mat piece", /obj/item/stack/tile/bamboo, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ @@ -802,11 +802,6 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \ . = ..() . += GLOB.bronze_recipes -/obj/item/stack/sheet/paperframes/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1) - . = ..() - pixel_x = 0 - pixel_y = 0 - /obj/item/stack/sheet/bronze/thirty amount = 30 @@ -881,7 +876,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list( new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, time = 4 SECONDS, category = CAT_FURNITURE), \ new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/cup/glass/waterbottle/empty, crafting_flags = NONE, category = CAT_CONTAINERS), \ new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/cup/glass/waterbottle/large/empty, 3, crafting_flags = NONE, category = CAT_CONTAINERS), \ - new /datum/stack_recipe("colo cups", /obj/item/reagent_containers/cup/glass/colocup, 1, crafting_flags = NONE, category = CAT_CONTAINERS), \ + new /datum/stack_recipe("colo cups", /obj/item/reagent_containers/cup/glass/colocup, 1, crafting_flags = NONE, category = CAT_CONTAINERS, removed_mats = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT)), \ new /datum/stack_recipe("mannequin", /obj/structure/mannequin/plastic, 25, time = 5 SECONDS, crafting_flags = CRAFT_ONE_PER_TURF, category = CAT_ENTERTAINMENT), \ new /datum/stack_recipe("wet floor sign", /obj/item/clothing/suit/caution, 2, crafting_flags = NONE, category = CAT_EQUIPMENT), \ new /datum/stack_recipe("warning cone", /obj/item/clothing/head/cone, 2, crafting_flags = NONE, category = CAT_EQUIPMENT), \ diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 52a74476fbe..2e46fc07dce 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -94,12 +94,11 @@ if(merge) . = INITIALIZE_HINT_LATELOAD - var/materials_mult = amount if(LAZYLEN(mat_override)) - materials_mult *= mat_amt mats_per_unit = mat_override if(LAZYLEN(mats_per_unit)) - initialize_materials(mats_per_unit, materials_mult) + mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(mats_per_unit, mat_amt) + initialize_materials(mats_per_unit, amount) recipes = get_main_recipes().Copy() if(material_type) @@ -120,6 +119,10 @@ /obj/item/stack/LateInitialize() merge_with_loc() +/obj/item/stack/Destroy() + mats_per_unit = null + return ..() + /obj/item/stack/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change) . = ..() if((!throwing || throwing.target_turf == loc) && old_loc != loc && (flags_1 & INITIALIZED_1)) @@ -160,11 +163,6 @@ other_stack = find_other_stack(already_found, TRUE) return TRUE -/obj/item/stack/apply_material_effects(list/materials) - . = ..() - if(amount) - mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(materials, 1/amount) - /obj/item/stack/blend_requirements() if(is_cyborg) to_chat(usr, span_warning("[src] is too integrated into your chassis and can't be ground up!")) @@ -417,7 +415,7 @@ #undef FULL_LIST /// Makes the item with the given recipe. -/obj/item/stack/proc/make_item(mob/builder, datum/stack_recipe/recipe, multiplier) +/obj/item/stack/proc/make_item(mob/builder, datum/stack_recipe/recipe, multiplier = 1) if(get_amount() < 1 && !is_cyborg) //sanity check as this shouldn't happen qdel(src) return @@ -456,8 +454,6 @@ return created = covered_turf.place_on_top(recipe.result_type, flags = CHANGETURF_INHERIT_AIR) builder.balloon_alert(builder, "placed [ispath(recipe.result_type, /turf/open) ? "floor" : "wall"]") - if((recipe.crafting_flags & CRAFT_APPLIES_MATS) && LAZYLEN(mats_per_unit)) - created.set_custom_materials(mats_per_unit, recipe.req_amount / recipe.res_amount) else created = new recipe.result_type(builder.drop_location()) @@ -468,17 +464,30 @@ if(ismovable(created)) created.setDir(builder.dir) created.on_craft_completion(list(used_stack), null, builder) - qdel(used_stack) //you've outlived your purpose builder.investigate_log("crafted [recipe.title]", INVESTIGATE_CRAFTING) // Apply mat datums - if((recipe.crafting_flags & CRAFT_APPLIES_MATS) && LAZYLEN(mats_per_unit)) + if(LAZYLEN(mats_per_unit) && !(recipe.crafting_flags & CRAFT_NO_MATERIALS)) + var/list/result_mats = mats_per_unit.Copy() + for(var/mat in recipe.removed_mats) + var/to_remove = recipe.removed_mats[mat] + var/datum/material/ref_mat = locate(mat) in result_mats + if(!ref_mat) + continue + if(result_mats[ref_mat] < to_remove) + result_mats -= ref_mat + else + result_mats[ref_mat] -= to_remove + if(isstack(created)) var/obj/item/stack/crafted_stack = created - crafted_stack.set_custom_materials(mats_per_unit, (recipe.req_amount / recipe.res_amount) * crafted_stack.amount) + crafted_stack.mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(result_mats) + update_custom_materials() else - created.set_custom_materials(mats_per_unit, recipe.req_amount / recipe.res_amount) + created.set_custom_materials(result_mats, recipe.req_amount * multiplier) + + qdel(used_stack) //you've outlived your purpose // We could be qdeleted - like if it's a stack and has already been merged if(QDELETED(created)) @@ -573,11 +582,10 @@ if (amount < used) return FALSE amount -= used - if(check && is_zero_amount(delete_if_zero = TRUE)) - return TRUE - update_custom_materials() - update_appearance() - update_weight() + if(!is_zero_amount(delete_if_zero = check)) + update_custom_materials() + update_appearance() + update_weight() return TRUE /obj/item/stack/tool_use_check(mob/living/user, amount, heat_required) diff --git a/code/game/objects/items/stacks/stack_recipe.dm b/code/game/objects/items/stacks/stack_recipe.dm index f507e2fc784..3f30d259aa9 100644 --- a/code/game/objects/items/stacks/stack_recipe.dm +++ b/code/game/objects/items/stacks/stack_recipe.dm @@ -25,6 +25,8 @@ var/trait_modifier = 1 /// Category for general crafting menu var/category + /// The amount of material to remove from the recipe's result + var/list/removed_mats ///crafting_flags var to hold bool values var/crafting_flags = CRAFT_CHECK_DENSITY @@ -41,6 +43,7 @@ trait_booster, trait_modifier = 1, category, + list/removed_mats, ) src.title = title @@ -55,6 +58,8 @@ src.trait_modifier = trait_modifier src.category = src.category || category || CAT_MISC + src.removed_mats = removed_mats + // We create base64 image only if item have color. Otherwise use icon_ref for TGUI var/obj/item/result = result_type var/paint = result::color diff --git a/code/game/objects/items/stacks/tiles/light.dm b/code/game/objects/items/stacks/tiles/light.dm index 0c4bce3310a..651cf36ac1a 100644 --- a/code/game/objects/items/stacks/tiles/light.dm +++ b/code/game/objects/items/stacks/tiles/light.dm @@ -8,6 +8,7 @@ attack_verb_simple = list("bash", "batter", "bludgeon", "thrash", "smash") turf_type = /turf/open/floor/light merge_type = /obj/item/stack/tile/light + mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05) var/state = 0 /obj/item/stack/tile/light/attackby(obj/item/O, mob/user, list/modifiers, list/attack_modifiers) diff --git a/code/game/objects/items/stacks/tiles/tile_mineral.dm b/code/game/objects/items/stacks/tiles/tile_mineral.dm index 4e7c23b51ff..67a905b4334 100644 --- a/code/game/objects/items/stacks/tiles/tile_mineral.dm +++ b/code/game/objects/items/stacks/tiles/tile_mineral.dm @@ -230,3 +230,4 @@ turf_type = /turf/open/floor/fake_snow mineralType = "snow" merge_type = /obj/item/stack/tile/mineral/snow + mats_per_unit = list(/datum/material/snow = HALF_SHEET_MATERIAL_AMOUNT / 2) diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 31c20817c90..024142e04c4 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -137,6 +137,7 @@ /obj/item/stack/tile/wood/tile, /obj/item/stack/tile/wood/parquet, ) + mats_per_unit = list(/datum/material/wood = HALF_SHEET_MATERIAL_AMOUNT / 2) /obj/item/stack/tile/wood/parquet name = "parquet wood floor tile" @@ -175,6 +176,7 @@ /obj/item/stack/tile/bamboo/tatami/purple, /obj/item/stack/tile/bamboo/tatami/black, ) + mats_per_unit = list(/datum/material/bamboo = HALF_SHEET_MATERIAL_AMOUNT / 2) /obj/item/stack/tile/bamboo/tatami name = "Tatami with green rim" @@ -207,6 +209,7 @@ inhand_icon_state = "tile-basalt" turf_type = /turf/open/floor/fakebasalt merge_type = /obj/item/stack/tile/basalt + mats_per_unit = list(/datum/material/sand = SHEET_MATERIAL_AMOUNT * 2) //Carpets /obj/item/stack/tile/carpet @@ -1079,6 +1082,7 @@ /obj/item/stack/tile/circuit/green, /obj/item/stack/tile/circuit/red, ) + mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05) /obj/item/stack/tile/circuit/green name = "green circuit tile" @@ -1142,7 +1146,7 @@ singular_name = "plastic floor tile" desc = "A tile of cheap, flimsy plastic flooring." icon_state = "tile_plastic" - mats_per_unit = list(/datum/material/plastic=SMALL_MATERIAL_AMOUNT*5) + mats_per_unit = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT / 2) turf_type = /turf/open/floor/plastic merge_type = /obj/item/stack/tile/plastic @@ -1191,13 +1195,13 @@ desc = "A clangy tile made of high-quality bronze. Clockwork construction techniques allow the clanging to be minimized." icon_state = "tile_brass" turf_type = /turf/open/floor/bronze - mats_per_unit = list(/datum/material/bronze=SMALL_MATERIAL_AMOUNT*5) + mats_per_unit = list(/datum/material/bronze = HALF_SHEET_MATERIAL_AMOUNT / 2) merge_type = /obj/item/stack/tile/bronze tile_reskin_types = list( /obj/item/stack/tile/bronze, /obj/item/stack/tile/bronze/flat, /obj/item/stack/tile/bronze/filled, - ) + ) /obj/item/stack/tile/bronze/flat name = "flat bronze tile" @@ -1257,7 +1261,7 @@ desc = "Flooring that shows its contents underneath. Engineers love it!" icon_state = "maint_catwalk" inhand_icon_state = "tile-catwalk" - mats_per_unit = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT) + mats_per_unit = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 1.2) turf_type = /turf/open/floor/catwalk_floor merge_type = /obj/item/stack/tile/catwalk_tile //Just to be cleaner, these all stack with each other tile_reskin_types = list( @@ -1324,7 +1328,7 @@ inhand_icon_state = "tile-rglass" turf_type = /turf/open/floor/glass/reinforced merge_type = /obj/item/stack/tile/rglass - mats_per_unit = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT * 0.125, /datum/material/glass=SHEET_MATERIAL_AMOUNT * 0.25) // 4 tiles per sheet + mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.125, /datum/material/glass=SHEET_MATERIAL_AMOUNT * 0.25) // 4 tiles per sheet /obj/item/stack/tile/rglass/sixty amount = 60 diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 20e9700e075..29f94180caf 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -513,6 +513,7 @@ slot_flags = ITEM_SLOT_BACK|ITEM_SLOT_SUITSTORE|ITEM_SLOT_NECK resistance_flags = FLAMMABLE storage_type = /datum/storage/bag/rebar_quiver + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 6.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5) /obj/item/storage/bag/rebar_quiver/syndicate icon_state = "syndie_quiver_0" @@ -582,6 +583,7 @@ /obj/item/storage/bag/quiver/lesser storage_type = /datum/storage/bag/quiver/less + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) /obj/item/storage/bag/quiver/full/PopulateContents() . = ..() diff --git a/code/game/objects/items/storage/boxes/_boxes.dm b/code/game/objects/items/storage/boxes/_boxes.dm index ab29439da50..a491ace1eea 100644 --- a/code/game/objects/items/storage/boxes/_boxes.dm +++ b/code/game/objects/items/storage/boxes/_boxes.dm @@ -19,6 +19,8 @@ /obj/item/storage/box/Initialize(mapload) . = ..() + if(foldable_result == /obj/item/stack/sheet/cardboard) + set_custom_materials(list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT)) update_appearance() /obj/item/storage/box/suicide_act(mob/living/carbon/user) diff --git a/code/game/objects/items/storage/boxes/food_boxes.dm b/code/game/objects/items/storage/boxes/food_boxes.dm index 07ad1bdc79a..016d7c9ec7d 100644 --- a/code/game/objects/items/storage/boxes/food_boxes.dm +++ b/code/game/objects/items/storage/boxes/food_boxes.dm @@ -58,6 +58,7 @@ illustration = null resistance_flags = FLAMMABLE foldable_result = null + custom_materials = list(/datum/material/paper = SHEET_MATERIAL_AMOUNT * 1.25) /// A list of all available papersack reskins var/list/papersack_designs = list() ///What design from papersack_designs we are currently using. diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index f8b650ec0ee..8f697d4a6bd 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -609,7 +609,7 @@ spawn_count = 10 contents_tag = "pickle" foldable_result = /obj/item/reagent_containers/cup/beaker/large - custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.25) open_status = FANCY_CONTAINER_ALWAYS_OPEN has_open_closed_states = FALSE storage_type = /datum/storage/pickles_jar diff --git a/code/game/objects/items/storage/medkit.dm b/code/game/objects/items/storage/medkit.dm index 1b50ff90b07..c997a27b94d 100644 --- a/code/game/objects/items/storage/medkit.dm +++ b/code/game/objects/items/storage/medkit.dm @@ -498,6 +498,7 @@ righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' w_class = WEIGHT_CLASS_SMALL storage_type = /datum/storage/test_tube_rack + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) /obj/item/storage/test_tube_rack/update_icon_state() icon_state = "[base_icon_state][contents.len > 0 ? contents.len : null]" diff --git a/code/game/objects/items/surgery_tray.dm b/code/game/objects/items/surgery_tray.dm index 24577905a84..8c0ccdad40f 100644 --- a/code/game/objects/items/surgery_tray.dm +++ b/code/game/objects/items/surgery_tray.dm @@ -13,6 +13,7 @@ slowdown = 1 item_flags = SLOWS_WHILE_IN_HAND pass_flags = NONE + custom_materials = list(/datum/material/silver = SHEET_MATERIAL_AMOUNT, /datum/material/iron = SHEET_MATERIAL_AMOUNT) /// If true we're currently portable var/is_portable = TRUE diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index efab2d8e01f..ad6c52709ba 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -189,6 +189,7 @@ full_speed = FALSE drift_force = 1 NEWTONS stabilizer_force = 0.5 NEWTONS + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 4.4, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3) /obj/item/tank/jetpack/improvised/allow_thrust(num) if(!ismob(loc)) diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index 73b4c648a2b..04cb4cc1c5a 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -300,6 +300,12 @@ ACCESS_RD, ACCESS_SYNDICATE, ) + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 4.75, + /datum/material/silver = SHEET_MATERIAL_AMOUNT * 2.50, + /datum/material/titanium = SHEET_MATERIAL_AMOUNT * 1.75, + /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.25, + ) radio_alert = TRUE /obj/item/crowbar/power/paramedic/sound_the_alarms(mob/user, obj/machinery/door/airlock/target) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index d5cb2100575..c9f04348682 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -586,6 +586,7 @@ w_class = WEIGHT_CLASS_SMALL attack_verb_continuous = list("attacks", "strikes", "hits") attack_verb_simple = list("attack", "strike", "hit") + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 4, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.1, /datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.1) /// Whether our sword has been multitooled to rainbow var/hacked = FALSE /// The color of our fake energy sword @@ -1081,6 +1082,7 @@ icon_state = "snowball" throwforce = 20 //the same damage as a disabler shot damtype = STAMINA //maybe someday we can add stuffing rocks (or perhaps ore?) into snowballs to make them deal brute damage + custom_materials = list(/datum/material/snow = SHEET_MATERIAL_AMOUNT) /obj/item/toy/snowball/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) user.throw_item(interacting_with) diff --git a/code/game/objects/items/v8_engine.dm b/code/game/objects/items/v8_engine.dm index 80c54be8ecb..5b5e934bb25 100644 --- a/code/game/objects/items/v8_engine.dm +++ b/code/game/objects/items/v8_engine.dm @@ -66,6 +66,7 @@ throw_speed = 1 armour_penetration = 15 hitsound = 'sound/items/car_engine_start.ogg' + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 14, /datum/material/cardboard = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.8) /// The number of charges the house edge has accrued through 2-handed hits, to charge a more powerful charge attack. var/fire_charges = 0 ///Sound played when wielded. diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 852f3af1260..78accb14525 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -628,6 +628,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 icon_angle = -135 lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 4) /obj/item/bambostaff/Initialize(mapload) . = ..() @@ -745,7 +746,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 desc = "A handmade crutch. Also makes a decent bludgeon if you need it." icon_state = "crutch_wood" inhand_icon_state = "crutch_wood" - custom_materials = list(/datum/material/wood = SMALL_MATERIAL_AMOUNT * 0.5) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) /obj/item/cane/white name = "white cane" @@ -873,6 +874,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 throw_range = 1 attack_verb_continuous = list("clubs", "bludgeons") attack_verb_simple = list("club", "bludgeon") + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) /obj/item/melee/baseball_bat name = "baseball bat" diff --git a/code/game/objects/items/wind_turbine.dm b/code/game/objects/items/wind_turbine.dm index f467d68c62c..b713c3acd5e 100644 --- a/code/game/objects/items/wind_turbine.dm +++ b/code/game/objects/items/wind_turbine.dm @@ -22,6 +22,7 @@ force = 10 throwforce = 6 w_class = WEIGHT_CLASS_BULKY + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 22, /datum/material/plastic = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) ///What item is being charged currently? var/obj/item/charging = null ///Did we put power into "charging" last process()? diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm index 6b687c8a4b0..c6435e1973d 100644 --- a/code/game/objects/structures/beds_chairs/bed.dm +++ b/code/game/objects/structures/beds_chairs/bed.dm @@ -19,6 +19,7 @@ resistance_flags = FLAMMABLE max_integrity = 100 integrity_failure = 0.35 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /// What material this bed is made of var/build_stack_type = /obj/item/stack/sheet/iron /// How many mats to drop when deconstructed @@ -314,6 +315,7 @@ build_stack_type = /obj/item/stack/sheet/mineral/wood build_stack_amount = 10 elevation = 0 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10) var/owned = FALSE /obj/structure/bed/dogbed/ian @@ -381,6 +383,7 @@ icon_state = "bed_double" build_stack_amount = 4 max_buckled_mobs = 2 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 4) /// The mob who buckled to this bed second, to avoid other mobs getting pixel-shifted before he unbuckles. var/mob/living/goldilocks diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index 102bba3e817..685b3ba3fbe 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -188,6 +188,7 @@ buildstackamount = 3 item_chair = /obj/item/chair/wood fishing_modifier = -6 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3) /obj/structure/chair/wood/narsie_act() return @@ -207,6 +208,7 @@ item_chair = null fishing_modifier = -7 has_armrest = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/chair/comfy/brown color = rgb(70, 47, 28) @@ -232,7 +234,7 @@ unbuckle_sound = SFX_SEATBELT_UNBUCKLE resistance_flags = FIRE_PROOF max_integrity = 120 - custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/chair/comfy/shuttle/electrify_self(obj/item/assembly/shock_kit/input_shock_kit, mob/user, list/overlays_from_child_procs) if(!overlays_from_child_procs) @@ -286,6 +288,7 @@ icon_state = "carp_chair" buildstacktype = /obj/item/stack/sheet/animalhide/carp fishing_modifier = -12 + custom_materials = null /obj/structure/chair/office name = "office chair" @@ -294,6 +297,7 @@ item_chair = null fishing_modifier = -6 icon_state = "officechair_dark" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) /obj/structure/chair/office/Initialize(mapload) . = ..() @@ -375,6 +379,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) buildstacktype = /obj/item/stack/sheet/mineral/bamboo buildstackamount = 2 item_chair = /obj/item/chair/stool/bamboo + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 2) /obj/item/chair name = "chair" @@ -393,7 +398,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) max_integrity = 100 hitsound = 'sound/items/trayhit/trayhit1.ogg' hit_reaction_chance = 50 - custom_materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) item_flags = SKIP_FANTASY_ON_SPAWN // Duration of daze inflicted when the chair is smashed against someone from behind. @@ -524,6 +529,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) origin_type = /obj/structure/chair/stool/bamboo max_integrity = 40 //Submissive and breakable unlike the chad iron stool daze_amount = 0 //Not hard enough to cause them to become dazed + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 2) /obj/item/chair/stool/narsie_act() return //sturdy enough to ignore a god @@ -538,6 +544,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) origin_type = /obj/structure/chair/wood custom_materials = null daze_amount = 0 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3) /obj/item/chair/wood/narsie_act() return @@ -563,6 +570,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) item_chair = null fishing_modifier = -13 //the pinnacle of Ratvarian technology. has_armrest = TRUE + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT) /// Total rotations made var/turns = 0 @@ -606,6 +614,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) obj_flags = parent_type::obj_flags | NO_DEBRIS_AFTER_DECONSTRUCTION alpha = 0 fishing_modifier = -21 //it only lives for 25 seconds, so we make them worth it. + custom_materials = null /obj/structure/chair/mime/wrench_act_secondary(mob/living/user, obj/item/weapon) return NONE @@ -622,7 +631,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) desc = "No matter how much you squirm, it'll still be uncomfortable." resistance_flags = FLAMMABLE max_integrity = 70 - custom_materials = list(/datum/material/plastic =SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2) buildstacktype = /obj/item/stack/sheet/plastic buildstackamount = 2 item_chair = /obj/item/chair/plastic @@ -656,7 +665,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0) w_class = WEIGHT_CLASS_NORMAL force = 7 throw_range = 5 //Lighter Weight --> Flies Farther. - custom_materials = list(/datum/material/plastic =SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2) max_integrity = 70 daze_amount = 0 origin_type = /obj/structure/chair/plastic diff --git a/code/game/objects/structures/beds_chairs/pew.dm b/code/game/objects/structures/beds_chairs/pew.dm index e6c64d9f36f..f39be619852 100644 --- a/code/game/objects/structures/beds_chairs/pew.dm +++ b/code/game/objects/structures/beds_chairs/pew.dm @@ -8,6 +8,7 @@ buildstacktype = /obj/item/stack/sheet/mineral/wood buildstackamount = 3 item_chair = null + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3) ///This proc adds the rotate component, overwrite this if you for some reason want to change some specific args. /obj/structure/chair/pew/MakeRotate() diff --git a/code/game/objects/structures/beds_chairs/sofa.dm b/code/game/objects/structures/beds_chairs/sofa.dm index 986bbcd99a0..566877af683 100644 --- a/code/game/objects/structures/beds_chairs/sofa.dm +++ b/code/game/objects/structures/beds_chairs/sofa.dm @@ -111,6 +111,7 @@ COLORED_SOFA(/obj/structure/chair/sofa, maroon, SOFA_MAROON) buildstacktype = /obj/item/stack/sheet/mineral/bamboo buildstackamount = 3 has_armrest = FALSE + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 3) /obj/structure/chair/sofa/bamboo/left icon_state = "bamboo_sofaend_left" diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 6e5a1528d2a..dfa8594d64f 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -581,6 +581,7 @@ LINEN BINS resistance_flags = FLAMMABLE max_integrity = 70 anchored_tabletop_offset = 6 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) /// The number of bedsheets in the bin var/amount = 10 /// A list of actual sheets within the bin diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm index 2336208cf5b..1b57b479140 100644 --- a/code/game/objects/structures/bonfire.dm +++ b/code/game/objects/structures/bonfire.dm @@ -17,6 +17,7 @@ anchored = TRUE buckle_lying = 0 pass_flags_self = PASSTABLE | LETPASSTHROW + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10) /// is the bonfire lit? var/burning = FALSE /// icon for the bonfire while on. for a softer more burning embers icon, use "bonfire_warm" diff --git a/code/game/objects/structures/cannons/cannon.dm b/code/game/objects/structures/cannons/cannon.dm index 6cf1e9b8594..a552ba1a392 100644 --- a/code/game/objects/structures/cannons/cannon.dm +++ b/code/game/objects/structures/cannons/cannon.dm @@ -117,6 +117,7 @@ icon_state = "garbagegun" anchored = FALSE anchorable_cannon = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 11.15, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5) var/fires_before_deconstruction = 5 /obj/structure/cannon/trash/fire() diff --git a/code/game/objects/structures/cannons/cannonballs.dm b/code/game/objects/structures/cannons/cannonballs.dm index 855292e8521..fca8eb7e901 100644 --- a/code/game/objects/structures/cannons/cannonballs.dm +++ b/code/game/objects/structures/cannons/cannonballs.dm @@ -71,6 +71,7 @@ base_icon_state = "trashballs" merge_type = /obj/item/stack/cannonball/trashball projectile_type = /obj/projectile/bullet/cannonball/trashball + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT) /obj/item/stack/cannonball/trashball/four amount = 4 diff --git a/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm b/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm index 84f734731ee..ef4b9e3d55d 100644 --- a/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm +++ b/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm @@ -114,6 +114,7 @@ fire_delay = 3 DECISECONDS shot_delay = 2 DECISECONDS firing_shakes_camera = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 24.5, /datum/material/wood = SHEET_MATERIAL_AMOUNT * 15, /datum/material/glass = SMALL_MATERIAL_AMOUNT) /obj/structure/mounted_gun/pipe/examine_more(mob/user) . = ..() diff --git a/code/game/objects/structures/cat_house.dm b/code/game/objects/structures/cat_house.dm index ea016e00d67..746c67f0b1e 100644 --- a/code/game/objects/structures/cat_house.dm +++ b/code/game/objects/structures/cat_house.dm @@ -5,6 +5,7 @@ icon_state = "cat_house" density = TRUE anchored = TRUE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) ///cat residing in this house var/mob/living/resident_cat diff --git a/code/game/objects/structures/chess.dm b/code/game/objects/structures/chess.dm index 04410e29980..a8d45ccbf8f 100644 --- a/code/game/objects/structures/chess.dm +++ b/code/game/objects/structures/chess.dm @@ -6,6 +6,7 @@ name = "\improper Probably a White Pawn" desc = "This is weird. Please inform administration on how you managed to get the parent chess piece. Thanks!" max_integrity = 100 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/chess/wrench_act(mob/user, obj/item/tool) if(flags_1 & HOLOGRAM_1) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 7a776378165..c4186198824 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -20,6 +20,8 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) /// How insulated the thing is, for the purposes of calculating body temperature. Must be between 0 and 1! contents_thermal_insulation = 0 pass_flags_self = PASSSTRUCTURE | LETPASSCLICKS + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) + /// The overlay for the closet's door var/obj/effect/overlay/closet_door/door_obj /// Whether or not this door is being animated diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 7773d54e3e4..1a0edaa8719 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -19,6 +19,7 @@ door_anim_time = 0 // no animation can_install_electronics = FALSE paint_jobs = null + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 4) /// Cooldown controlling when the box can trigger the Metal Gear Solid-style '!' alert. COOLDOWN_DECLARE(alert_cooldown) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index 1e19671a455..9f6acb67817 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -5,6 +5,7 @@ door_anim_squish = 0.22 door_anim_angle = 123 door_anim_time = 4 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3.5) /// If FALSE, we will protect the first person in the freezer from an explosion / nuclear blast. var/jones = FALSE paint_jobs = null diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 1fad4a1c902..1d798b567a3 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -8,6 +8,7 @@ secure = TRUE damage_deflection = 20 material_drop_amount = 5 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) /datum/armor/closet_secure_closet melee = 30 diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index c54605eb78c..cd4cf9e9600 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -184,6 +184,7 @@ paint_jobs = null elevation_open = 0 can_weld_shut = FALSE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) /obj/structure/closet/crate/trashcart //please make this a generic cart path later after things calm down a little desc = "A heavy, metal trashcart with wheels." diff --git a/code/game/objects/structures/crates_lockers/crates/wooden.dm b/code/game/objects/structures/crates_lockers/crates/wooden.dm index 5703cb6ddcb..062428d6f43 100644 --- a/code/game/objects/structures/crates_lockers/crates/wooden.dm +++ b/code/game/objects/structures/crates_lockers/crates/wooden.dm @@ -11,6 +11,7 @@ close_sound_volume = 50 paint_jobs = null cutting_tool = /obj/item/crowbar + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 6) /obj/structure/closet/crate/wooden/toy name = "toy box" diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index cde4f4da174..7cb8e8c68d3 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -12,6 +12,7 @@ anchored = TRUE opacity = FALSE density = FALSE + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) /// used in making the icon state var/icon_type = "bathroom" var/open = TRUE @@ -107,6 +108,7 @@ color = null alpha = 255 opaque_closed = TRUE + custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) /obj/structure/curtain/cloth/atom_deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/cloth (loc, 4) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index fb6347791dc..2eb7fecaf50 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -227,6 +227,7 @@ resistance_flags = FLAMMABLE anchored = TRUE density = FALSE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) ///The airlock electronics inserted into the chassis, to be moved to the finished product. var/obj/item/electronics/airlock/electronics diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index bea64c05e8c..cac245d3aff 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -6,6 +6,7 @@ anchored = FALSE density = TRUE max_integrity = 200 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 4) /// Airlock's current construction state var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES var/base_name = "Airlock" diff --git a/code/game/objects/structures/door_assembly_types.dm b/code/game/objects/structures/door_assembly_types.dm index d62fb1bec76..203039779d6 100644 --- a/code/game/objects/structures/door_assembly_types.dm +++ b/code/game/objects/structures/door_assembly_types.dm @@ -122,6 +122,7 @@ noglass = TRUE material_type = /obj/item/stack/sheet/plasteel material_amt = 4 + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 4) /obj/structure/door_assembly/door_assembly_vault name = "vault door assembly" @@ -132,6 +133,7 @@ noglass = TRUE material_type = /obj/item/stack/sheet/plasteel material_amt = 6 + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 6) /obj/structure/door_assembly/door_assembly_shuttle name = "shuttle airlock assembly" @@ -255,6 +257,7 @@ airlock_type = /obj/machinery/door/airlock/bronze noglass = TRUE material_type = /obj/item/stack/sheet/bronze + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 4) /obj/structure/door_assembly/door_assembly_bronze/seethru airlock_type = /obj/machinery/door/airlock/bronze/seethru @@ -282,6 +285,7 @@ noglass = TRUE mineral = "titanium" material_type = /obj/item/stack/sheet/mineral/titanium + custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 8) /obj/structure/door_assembly/door_assembly_material/atom_deconstruct(disassembled = TRUE) var/turf/target_turf = get_turf(src) diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 785871dac66..c43730070a1 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -6,6 +6,7 @@ resistance_flags = FLAMMABLE density = TRUE anchored = TRUE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10) /obj/structure/dresser/attackby(obj/item/I, mob/user, list/modifiers, list/attack_modifiers) if(I.tool_behaviour == TOOL_WRENCH) diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 70e56c2d501..44aa56d6088 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -8,6 +8,7 @@ armor_type = /datum/armor/structure_fireaxecabinet max_integrity = 150 integrity_failure = 0.33 + custom_materials = /obj/item/wallframe/fireaxecabinet::custom_materials /// Do we need to be unlocked to be opened. var/locked = TRUE /// Are we opened, can someone take the held item out. @@ -221,6 +222,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/fireaxecabinet/empty, 32) icon_state = "fireaxe" result_path = /obj/structure/fireaxecabinet/empty pixel_shift = 32 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 5.1, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 5, /datum/material/iron = SMALL_MATERIAL_AMOUNT) /obj/structure/fireaxecabinet/mechremoval name = "mech removal tool cabinet" diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 1b80d84dd01..f51bfafa2e5 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -11,6 +11,7 @@ smoothing_flags = SMOOTH_BITMASK smoothing_groups = SMOOTH_GROUP_GIRDER canSmoothWith = SMOOTH_GROUP_GIRDER + SMOOTH_GROUP_WALLS + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) var/state = GIRDER_NORMAL var/girderpasschance = 20 // percentage chance that a projectile passes through the girder. var/can_displace = TRUE //If the girder can be moved around by wrenching it @@ -472,6 +473,7 @@ smoothing_flags = NONE smoothing_groups = null canSmoothWith = null + custom_materials = list(/datum/material/runedmetal = SHEET_MATERIAL_AMOUNT) /obj/structure/girder/cult/attackby(obj/item/W, mob/user, list/modifiers, list/attack_modifiers) add_fingerprint(user) @@ -547,6 +549,7 @@ smoothing_flags = NONE smoothing_groups = null canSmoothWith = null + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/girder/bronze/attackby(obj/item/W, mob/living/user, list/modifiers, list/attack_modifiers) add_fingerprint(user) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 141af49f66d..ed3aa733d66 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -15,6 +15,7 @@ armor_type = /datum/armor/structure_grille max_integrity = 50 integrity_failure = 0.4 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) var/rods_type = /obj/item/stack/rods var/rods_amount = 2 /// Whether or not we're disappearing but dramatically diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index ca7344d2f24..6742e89248b 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -42,6 +42,12 @@ buckle_lying = 0 buckle_prevents_pull = TRUE layer = ABOVE_MOB_LAYER + custom_materials = list( + /datum/material/wood = SHEET_MATERIAL_AMOUNT * 20, + /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 3, + /datum/material/iron = SMALL_MATERIAL_AMOUNT, + /datum/material/glass = SMALL_MATERIAL_AMOUNT, + ) /// The sound the guillotine makes when it successfully cuts off a head var/drop_sound = 'sound/items/weapons/guillotine.ogg' /// The current state of the blade diff --git a/code/game/objects/structures/gym/punching_bag.dm b/code/game/objects/structures/gym/punching_bag.dm index 4c02e08e5be..f767f77c912 100644 --- a/code/game/objects/structures/gym/punching_bag.dm +++ b/code/game/objects/structures/gym/punching_bag.dm @@ -5,6 +5,7 @@ icon_state = "punchingbag" anchored = TRUE layer = ABOVE_MOB_LAYER + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5) ///List of sounds that can be played when punched. var/static/list/hit_sounds = list( 'sound/items/weapons/genhit1.ogg', diff --git a/code/game/objects/structures/gym/weight_machine.dm b/code/game/objects/structures/gym/weight_machine.dm index 6644711f2b7..c3ba59cead6 100644 --- a/code/game/objects/structures/gym/weight_machine.dm +++ b/code/game/objects/structures/gym/weight_machine.dm @@ -12,6 +12,7 @@ density = TRUE anchored = TRUE blocks_emissive = EMISSIVE_BLOCK_UNIQUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) ///How much we shift the user's pixel y when using the weight machine. var/pixel_shift_z = -3 diff --git a/code/game/objects/structures/headpike.dm b/code/game/objects/structures/headpike.dm index c9b9562ce73..5dcfac5f77e 100644 --- a/code/game/objects/structures/headpike.dm +++ b/code/game/objects/structures/headpike.dm @@ -5,6 +5,7 @@ icon_state = "headpike" density = FALSE anchored = TRUE + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.15, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.65) var/obj/item/spear/spear var/obj/item/spear/speartype = /obj/item/spear var/obj/item/bodypart/head/victim @@ -12,10 +13,12 @@ /obj/structure/headpike/bone //for bone spears icon_state = "headpike-bone" speartype = /obj/item/spear/bonespear + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 4) /obj/structure/headpike/bamboo //for bamboo spears icon_state = "headpike-bamboo" speartype = /obj/item/spear/bamboospear + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 25) /obj/structure/headpike/military //for military spears icon_state = "headpike-military" diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index d70315a43e9..f1492da1267 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -8,6 +8,7 @@ density = TRUE anchored = FALSE max_integrity = 200 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) /obj/structure/kitchenspike_frame/Initialize(mapload) . = ..() @@ -74,6 +75,7 @@ buckle_lying = FALSE can_buckle = TRUE max_integrity = 250 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) /obj/structure/kitchenspike/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 6a60c80f92d..5d15c1af89f 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -7,6 +7,7 @@ base_icon_state = "ladder" anchored = TRUE obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7.5) ///the ladder below this one VAR_FINAL/obj/structure/ladder/down ///the ladder above this one diff --git a/code/game/objects/structures/loom.dm b/code/game/objects/structures/loom.dm index 2d10df50a74..c60bae1af3f 100644 --- a/code/game/objects/structures/loom.dm +++ b/code/game/objects/structures/loom.dm @@ -6,6 +6,7 @@ icon_state = "loom" density = TRUE anchored = TRUE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10) /obj/structure/loom/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/maintenance.dm b/code/game/objects/structures/maintenance.dm index 273a446eb85..f4017ef0287 100644 --- a/code/game/objects/structures/maintenance.dm +++ b/code/game/objects/structures/maintenance.dm @@ -250,6 +250,7 @@ at the cost of risking a vicious bite.**/ icon_state = "steam_vent" anchored = TRUE density = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.3, /datum/material/plastic = SMALL_MATERIAL_AMOUNT * 2) /// How often does the vent reset the blow_steam cooldown. var/steam_speed = 20 SECONDS /// Is the steam vent active? diff --git a/code/game/objects/structures/mannequin.dm b/code/game/objects/structures/mannequin.dm index 2260751bbf7..bb45333cf5b 100644 --- a/code/game/objects/structures/mannequin.dm +++ b/code/game/objects/structures/mannequin.dm @@ -146,9 +146,11 @@ /obj/structure/mannequin/wood material = MANNEQUIN_WOOD + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 25) /obj/structure/mannequin/plastic material = MANNEQUIN_PLASTIC + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 25) /obj/structure/mannequin/skeleton name = "skeleton model" diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 659d7761a89..1423d292d06 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -25,6 +25,7 @@ anchored = TRUE integrity_failure = 0.5 max_integrity = 200 + custom_materials = /obj/item/wallframe/mirror::custom_materials ///Can this mirror be removed from walls with tools? var/deconstructable = TRUE var/list/mirror_options = INERT_MIRROR_OPTIONS @@ -350,10 +351,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28) desc = "An unmounted mirror. Attach it to a wall to use." icon = 'icons/obj/watercloset.dmi' icon_state = "mirror" - custom_materials = list( - /datum/material/glass = SHEET_MATERIAL_AMOUNT, - /datum/material/silver = SHEET_MATERIAL_AMOUNT, - ) + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 2) result_path = /obj/structure/mirror pixel_shift = 28 diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 4837627dacc..0c153c59128 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -12,6 +12,7 @@ integrity_failure = 0.75 // This layer only matters for determining when you click it vs other objects layer = BELOW_OPEN_DOOR_LAYER + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 5) /// If TRUE, we can't pass through unless the mob is resting (or fulfills more specific requirements) var/require_resting = TRUE /// Layer the flaps render on diff --git a/code/game/objects/structures/platform.dm b/code/game/objects/structures/platform.dm index 6adfcf310aa..9d3628e36bf 100644 --- a/code/game/objects/structures/platform.dm +++ b/code/game/objects/structures/platform.dm @@ -18,6 +18,7 @@ anchored = TRUE armor_type = /datum/armor/half_wall material_flags = MATERIAL_EFFECTS | MATERIAL_AFFECT_STATISTICS + custom_materials = list(/datum/material/iron = PLATFORM_BASE_MATERIAL_AMOUNT) /// Icon used for the frame var/frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_normal.dmi' /// Material used in our construction diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm index 5beb43a31bc..c32cd8221c9 100644 --- a/code/game/objects/structures/railings.dm +++ b/code/game/objects/structures/railings.dm @@ -13,7 +13,7 @@ /// armor is a little bit less than a grille. max_integrity about half that of a grille. armor_type = /datum/armor/structure_railing max_integrity = 25 - + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) var/climbable = TRUE ///item released when deconstructed var/item_deconstruct = /obj/item/stack/rods @@ -32,6 +32,7 @@ icon_state = "railing_corner" density = FALSE climbable = FALSE + custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) /obj/structure/railing/corner/unbreakable resistance_flags = INDESTRUCTIBLE @@ -172,6 +173,7 @@ item_deconstruct = /obj/item/stack/sheet/mineral/wood layer = ABOVE_MOB_LAYER plane = GAME_PLANE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/railing/wooden_fence/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index ada47e65bc0..1e955d163e4 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -5,6 +5,7 @@ desc = "A base for reflector assemblies." anchored = FALSE density = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) var/deflector_icon_state var/mutable_appearance/deflector_overlay var/finished = FALSE @@ -209,6 +210,7 @@ finished = TRUE buildstacktype = /obj/item/stack/sheet/rglass buildstackamount = 10 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 10) /obj/structure/reflector/double/anchored anchored = TRUE @@ -234,6 +236,7 @@ finished = TRUE buildstacktype = /obj/item/stack/sheet/mineral/diamond buildstackamount = 1 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10, /datum/material/diamond = SHEET_MATERIAL_AMOUNT) /obj/structure/reflector/box/anchored anchored = TRUE diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 825c609f4a7..0822d1db77c 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -21,11 +21,13 @@ FLOOR SAFES obj_flags = CONDUCTS_ELECTRICITY interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT custom_materials = list( - /datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT*10, - /datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT*5, + /datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT * 15, + /datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT * 8, + /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 6, + /datum/material/titanium = SHEET_MATERIAL_AMOUNT * 3, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 3, ) material_flags = MATERIAL_EFFECTS - /// The maximum combined w_class of stuff in the safe var/maxspace = 24 /// The amount of tumblers that will be generated @@ -302,6 +304,11 @@ FLOOR SAFES icon_state = "floorsafe" density = FALSE layer = LOW_OBJ_LAYER + custom_materials = list( + /datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT * 15, + /datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT * 8, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.55, + ) /obj/structure/safe/floor/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/secure_safe.dm b/code/game/objects/structures/secure_safe.dm index 8642e6febe8..71c3d0bb481 100644 --- a/code/game/objects/structures/secure_safe.dm +++ b/code/game/objects/structures/secure_safe.dm @@ -10,8 +10,9 @@ obj_flags = CONDUCTS_ELECTRICITY resistance_flags = FIRE_PROOF custom_materials = list( - /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT*5, - /datum/material/titanium = SHEET_MATERIAL_AMOUNT*3, + /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 8, + /datum/material/titanium = SHEET_MATERIAL_AMOUNT * 4, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2, ) material_flags = MATERIAL_EFFECTS /// The lock code transferred from the structure diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 081bc50dfad..6c4d323744a 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -384,6 +384,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16)) icon_state = "shower_frame" desc = "A shower frame, that needs a water recycler to finish construction." anchored = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/showerframe/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/stairs.dm b/code/game/objects/structures/stairs.dm index 31c65be2ec3..cddff131c84 100644 --- a/code/game/objects/structures/stairs.dm +++ b/code/game/objects/structures/stairs.dm @@ -326,6 +326,7 @@ icon_state = "stairs_frame" density = FALSE anchored = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) /// What type of stack will this drop on deconstruction? var/frame_stack = /obj/item/stack/rods /// How much of frame_stack should this drop on deconstruction? @@ -335,6 +336,7 @@ name = "wooden stairs frame" desc = "Everything you need to build a staircase, minus the actual stairs. This one is made of wood." frame_stack = /obj/item/stack/sheet/mineral/wood + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10) /obj/structure/stairs_frame/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/steps.dm b/code/game/objects/structures/steps.dm index a8e27e0b21a..9163e57083a 100644 --- a/code/game/objects/structures/steps.dm +++ b/code/game/objects/structures/steps.dm @@ -6,6 +6,7 @@ icon_state = "iron" anchored = TRUE move_resist = INFINITY + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/steps/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index 36ae8e5fb70..f5df2da0fa5 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -17,6 +17,7 @@ density = FALSE anchored = FALSE layer = PROJECTILE_HIT_THRESHHOLD_LAYER + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) max_integrity = 100 var/framestack = /obj/item/stack/rods var/framestackamount = 2 @@ -97,6 +98,7 @@ framestack = /obj/item/stack/sheet/mineral/wood framestackamount = 2 resistance_flags = FLAMMABLE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/table_frame/wood/get_table_type(obj/item/stack/our_stack) if(istype(our_stack, /obj/item/stack/sheet/mineral/wood)) diff --git a/code/game/objects/structures/toiletbong.dm b/code/game/objects/structures/toiletbong.dm index c45e58d5845..269ec6a90d6 100644 --- a/code/game/objects/structures/toiletbong.dm +++ b/code/game/objects/structures/toiletbong.dm @@ -6,6 +6,7 @@ base_icon_state = "toiletbong" density = FALSE anchored = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.05, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.8) var/smokeradius = 1 var/mutable_appearance/weed_overlay @@ -93,9 +94,9 @@ if (!do_after(user, 10 SECONDS, target = src)) return FALSE new /obj/item/flamethrower(get_turf(src)) - new /obj/item/stack/sheet/iron(get_turf(src)) var/obj/item/tank/internals/plasma/ptank = new /obj/item/tank/internals/plasma(get_turf(src)) ptank.air_contents.gases[/datum/gas/plasma][MOLES] = (0) + drop_costum_materials() qdel(src) return TRUE diff --git a/code/game/objects/structures/votingbox.dm b/code/game/objects/structures/votingbox.dm index f31c8510d31..8ab34de74ba 100644 --- a/code/game/objects/structures/votingbox.dm +++ b/code/game/objects/structures/votingbox.dm @@ -9,7 +9,7 @@ icon_state = "votebox_maint" anchored = TRUE - + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 15) var/obj/item/card/id/owner //Slapping the box with this ID starts/ends the vote. var/voting_active = FALSE //Voting or Maintenance Mode diff --git a/code/game/objects/structures/water_structures/toilet.dm b/code/game/objects/structures/water_structures/toilet.dm index 2bc1eb4283a..e7f200b299c 100644 --- a/code/game/objects/structures/water_structures/toilet.dm +++ b/code/game/objects/structures/water_structures/toilet.dm @@ -6,6 +6,7 @@ base_icon_state = "toilet" density = FALSE anchored = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) /// Boolean if whether the toilet is currently flushing. var/flushing = FALSE @@ -17,10 +18,6 @@ var/w_items = 0 /// Reference to the mob being given a swirlie. var/mob/living/swirlie - /// The type of material used to build the toilet. - var/buildstacktype = /obj/item/stack/sheet/iron - /// How much of the buildstacktype is needed to construct the toilet. - var/buildstackamount = 1 /// Lazylist of items in the cistern. var/list/cistern_items /// Lazylist of fish in the toilet, not to be mixed with the items in the cistern. Max of 3 @@ -238,11 +235,7 @@ /obj/structure/toilet/atom_deconstruct(dissambled = TRUE) dump_contents() - if(buildstacktype) - new buildstacktype(loc,buildstackamount) - else - for(var/datum/material/M as anything in custom_materials) - new M.sheet_type(loc, FLOOR(custom_materials[M] / SHEET_MATERIAL_AMOUNT, 1)) + drop_costum_materials() if(has_water_reclaimer) new /obj/item/stock_parts/water_recycler(drop_location()) @@ -396,7 +389,7 @@ /obj/structure/toilet/greyscale material_flags = MATERIAL_EFFECTS | MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS - buildstacktype = null + custom_materials = null has_water_reclaimer = FALSE /obj/structure/toilet/secret @@ -409,3 +402,29 @@ secret.desc += " It's a secret!" w_items += secret.w_class LAZYADD(cistern_items, secret) + +///A toilet made of meat that only drops remains when deconstructed, often unleashed unto this cursed plane of existence by hopeless people off'ing themselves with experi-scanners. +/obj/structure/toilet/greyscale/flesh + desc = "A horrendous mass of fused flesh resembling a standard-issue HT-451 model toilet. How it manages to function as one is beyond you. \ + This one seems to be made out of the flesh of a devoted employee of the RnD department." + +/obj/structure/toilet/greyscale/flesh/Initialize(mapload, mob/living/carbon/suicide) + . = ..() + ///The suicide victim's brain that will be placed inside the toilet's cistern + var/obj/item/organ/brain/toilet_brain + if(suicide) + toilet_brain = suicide.get_organ_slot(ORGAN_SLOT_BRAIN) + suicide.gib(DROP_BRAIN) //we delete everything but the brain, as it's going to be moved to the cistern + set_custom_materials(list(GET_MATERIAL_REF(/datum/material/meat/mob_meat, suicide) = SHEET_MATERIAL_AMOUNT)) + else + toilet_brain = new(drop_location()) + set_custom_materials(list(/datum/material/meat = SHEET_MATERIAL_AMOUNT)) + + toilet_brain.forceMove(src) + w_items += toilet_brain.w_class + +//this also prevents the toilet from dropping meat sheets. if you want to cheese the meat exepriments, sacrifice more people +/obj/structure/toilet/greyscale/flesh/atom_deconstruct(dissambled = TRUE) + for(var/obj/toilet_item in cistern_items) + toilet_item.forceMove(drop_location()) + new /obj/effect/decal/remains/human(loc) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 84073ddb317..bd8bd115d71 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -11,6 +11,7 @@ obj_flags = CAN_BE_HIT | BLOCKS_CONSTRUCTION_DIR | UNIQUE_RENAME | RENAME_NO_DESC set_dir_on_move = FALSE can_atmos_pass = ATMOS_PASS_PROC + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 5, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5) /// Reference to the airlock electronics inside for determining window access. var/obj/item/electronics/airlock/electronics = null diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index fd786385993..eaff88d518a 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -17,6 +17,7 @@ set_dir_on_move = FALSE flags_ricochet = RICOCHET_HARD receive_ricochet_chance_mod = 0.5 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT) var/state = WINDOW_OUT_OF_FRAME var/reinf = FALSE var/heat_resistance = 800 @@ -495,6 +496,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) glass_type = /obj/item/stack/sheet/rglass rad_insulation = RAD_LIGHT_INSULATION receive_ricochet_chance_mod = 1.1 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) //this is shitcode but all of construction is shitcode and needs a refactor, it works for now //If you find this like 4 years later and construction still hasn't been refactored, I'm so sorry for this @@ -630,6 +632,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/unanchored/spawner, glass_type = /obj/item/stack/sheet/plasmaglass rad_insulation = RAD_MEDIUM_INSULATION glass_material_datum = /datum/material/alloy/plasmaglass + custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT) /datum/armor/window_plasma melee = 80 @@ -660,6 +663,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/plasma/spawner, 0) glass_type = /obj/item/stack/sheet/plasmarglass rad_insulation = RAD_HEAVY_INSULATION glass_material_datum = /datum/material/alloy/plasmaglass + custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) /datum/armor/reinforced_plasma melee = 80 @@ -705,6 +709,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE glass_amount = 2 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/window/fulltile/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) if(the_rcd.mode == RCD_DECONSTRUCT) @@ -726,6 +731,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE glass_amount = 2 + custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/window/plasma/fulltile/unanchored anchored = FALSE @@ -743,6 +749,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE glass_amount = 2 + custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = SHEET_MATERIAL_AMOUNT) /obj/structure/window/reinforced/plasma/fulltile/unanchored anchored = FALSE @@ -763,6 +770,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE glass_amount = 2 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = SHEET_MATERIAL_AMOUNT) /obj/structure/window/reinforced/fulltile/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) if(the_rcd.mode == RCD_DECONSTRUCT) @@ -1000,6 +1008,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw icon = 'icons/obj/smooth_structures/structure_variations.dmi' icon_state = "clockwork_window-single" glass_type = /obj/item/stack/sheet/bronze + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 1) MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/bronze/spawner, 0) @@ -1018,6 +1027,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/bronze/spawner, 0) obj_flags = CAN_BE_HIT max_integrity = 50 glass_amount = 2 + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/window/bronze/fulltile/unanchored anchored = FALSE diff --git a/code/modules/antagonists/abductor/abductor_structures.dm b/code/modules/antagonists/abductor/abductor_structures.dm index 4668a67b65b..92b73488767 100644 --- a/code/modules/antagonists/abductor/abductor_structures.dm +++ b/code/modules/antagonists/abductor/abductor_structures.dm @@ -7,6 +7,7 @@ icon = 'icons/obj/antags/abductor.dmi' build_stack_type = /obj/item/stack/sheet/mineral/abductor icon_state = "bed" + custom_materials = list(/datum/material/alloy/alien = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/table_frame/abductor name = "alien table frame" @@ -14,6 +15,7 @@ icon_state = "alien_frame" framestack = /obj/item/stack/sheet/mineral/abductor framestackamount = 1 + custom_materials = list(/datum/material/alloy/alien = SHEET_MATERIAL_AMOUNT) /obj/structure/table_frame/abductor/get_table_type(obj/item/stack/our_stack) if(istype(our_stack, /obj/item/stack/sheet/mineral/abductor)) @@ -36,6 +38,7 @@ frame = /obj/structure/table_frame/abductor custom_materials = list(/datum/material/silver =SHEET_MATERIAL_AMOUNT) can_flip = FALSE + custom_materials = list(/datum/material/alloy/alien = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/table/optable/abductor name = "alien operating table" @@ -49,6 +52,7 @@ icon_state = "bed" can_buckle = TRUE buckle_lying = 90 + custom_materials = list(/datum/material/alloy/alien = SHEET_MATERIAL_AMOUNT, /datum/material/silver = SHEET_MATERIAL_AMOUNT) /// Amount to inject per second var/inject_amount = 0.5 @@ -88,6 +92,7 @@ can_weld_shut = FALSE door_anim_time = 0 material_drop = /obj/item/stack/sheet/mineral/abductor + custom_materials = list(/datum/material/alloy/alien = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/door_assembly/door_assembly_abductor name = "alien airlock assembly" @@ -97,3 +102,4 @@ airlock_type = /obj/machinery/door/airlock/abductor material_type = /obj/item/stack/sheet/mineral/abductor noglass = TRUE + custom_materials = list(/datum/material/alloy/alien = SHEET_MATERIAL_AMOUNT * 4) diff --git a/code/modules/antagonists/cult/cult_armor.dm b/code/modules/antagonists/cult/cult_armor.dm index 4f6aae945be..d4a62d5fd54 100644 --- a/code/modules/antagonists/cult/cult_armor.dm +++ b/code/modules/antagonists/cult/cult_armor.dm @@ -246,6 +246,7 @@ actions_types = null color_cutoffs = list(40, 0, 0) //red glass_colour_type = null + custom_materials = null /obj/item/clothing/glasses/hud/health/night/cultblind/equipped(mob/living/user, slot) . = ..() diff --git a/code/modules/antagonists/cult/cult_structure_altar.dm b/code/modules/antagonists/cult/cult_structure_altar.dm index 237d695996f..a6b646587c7 100644 --- a/code/modules/antagonists/cult/cult_structure_altar.dm +++ b/code/modules/antagonists/cult/cult_structure_altar.dm @@ -12,6 +12,7 @@ icon_state = "talismanaltar" break_message = span_warning("The altar shatters, leaving only the wailing of the damned!") mansus_conversion_path = /obj/effect/heretic_rune + custom_materials = list(/datum/material/runedmetal = SHEET_MATERIAL_AMOUNT * 3) /obj/structure/destructible/cult/item_dispenser/altar/setup_options() var/static/list/altar_items = list( diff --git a/code/modules/antagonists/cult/cult_structure_archives.dm b/code/modules/antagonists/cult/cult_structure_archives.dm index 29c00cf0168..9445d200219 100644 --- a/code/modules/antagonists/cult/cult_structure_archives.dm +++ b/code/modules/antagonists/cult/cult_structure_archives.dm @@ -14,6 +14,7 @@ light_color = LIGHT_COLOR_FIRE break_message = span_warning("The books and tomes of the archives burn into ash as the desk shatters!") mansus_conversion_path = /obj/item/codex_cicatrix + custom_materials = list(/datum/material/runedmetal = SHEET_MATERIAL_AMOUNT * 3) /obj/structure/destructible/cult/item_dispenser/archives/setup_options() var/static/list/archive_items = list( diff --git a/code/modules/antagonists/cult/cult_structure_forge.dm b/code/modules/antagonists/cult/cult_structure_forge.dm index 689cdd2edcb..3fe9a884369 100644 --- a/code/modules/antagonists/cult/cult_structure_forge.dm +++ b/code/modules/antagonists/cult/cult_structure_forge.dm @@ -14,6 +14,7 @@ light_color = LIGHT_COLOR_LAVA break_message = span_warning("The forge breaks apart into shards with a howling scream!") mansus_conversion_path = /obj/structure/destructible/eldritch_crucible + custom_materials = list(/datum/material/runedmetal = SHEET_MATERIAL_AMOUNT * 3) /obj/structure/destructible/cult/item_dispenser/forge/setup_options() var/static/list/forge_items = list( diff --git a/code/modules/antagonists/cult/cult_structure_pylon.dm b/code/modules/antagonists/cult/cult_structure_pylon.dm index 54151f1171e..506e8dd0ef9 100644 --- a/code/modules/antagonists/cult/cult_structure_pylon.dm +++ b/code/modules/antagonists/cult/cult_structure_pylon.dm @@ -8,6 +8,7 @@ break_sound = 'sound/effects/glass/glassbr2.ogg' break_message = span_warning("The blood-red crystal falls to the floor and shatters!") /// Length of the cooldown in between tile corruptions. Doubled if no turfs are found. + custom_materials = list(/datum/material/runedmetal = SHEET_MATERIAL_AMOUNT * 4) var/corruption_cooldown_duration = 5 SECONDS /// The cooldown for corruptions. COOLDOWN_DECLARE(corruption_cooldown) diff --git a/code/modules/art/paintings.dm b/code/modules/art/paintings.dm index f134a7566b6..40ac4c85498 100644 --- a/code/modules/art/paintings.dm +++ b/code/modules/art/paintings.dm @@ -12,6 +12,7 @@ density = TRUE resistance_flags = FLAMMABLE max_integrity = 60 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) var/obj/item/canvas/painting = null //Adding canvases diff --git a/code/modules/art/statues.dm b/code/modules/art/statues.dm index d4e5915d54a..7cfb01d1da2 100644 --- a/code/modules/art/statues.dm +++ b/code/modules/art/statues.dm @@ -279,7 +279,7 @@ name = "Elder Atmosian" desc = "A statue of an Elder Atmosian, capable of bending the laws of thermodynamics to their will." icon_state = "eng" - custom_materials = list(/datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT*10) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 30, /datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT * 20, /datum/material/zaukerite = SHEET_MATERIAL_AMOUNT * 15) max_integrity = 1000 impressiveness = 100 uncarveable = TRUE diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 2b2065a67a0..fb61b7c74ab 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -3,7 +3,7 @@ desc = "A handy little spring-loaded trap for catching pesty rodents." icon_state = "mousetrap" inhand_icon_state = "mousetrap" - custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) assembly_behavior = ASSEMBLY_TOGGLEABLE_INPUT var/armed = FALSE drop_sound = 'sound/items/handling/component_drop.ogg' diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index b1615a82032..7ed1d9ca32a 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -18,6 +18,7 @@ integrity_failure = 0.4 pressure_resistance = 7 * ONE_ATMOSPHERE req_access = list() + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10) ///Is the valve open? var/valve_open = FALSE diff --git a/code/modules/basketball/hoop.dm b/code/modules/basketball/hoop.dm index a00a1f39d99..0017ffdf741 100644 --- a/code/modules/basketball/hoop.dm +++ b/code/modules/basketball/hoop.dm @@ -18,6 +18,7 @@ density = TRUE layer = ABOVE_MOB_LAYER interaction_flags_click = NEED_DEXTERITY | NEED_HANDS | FORBID_TELEKINESIS_REACH + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3.5) /// Keeps track of the total points scored var/total_score = 0 /// The chance to score a ball into the hoop based on distance diff --git a/code/modules/cargo/markets/market_uplink.dm b/code/modules/cargo/markets/market_uplink.dm index 9a5509b5e8b..d3408f804ae 100644 --- a/code/modules/cargo/markets/market_uplink.dm +++ b/code/modules/cargo/markets/market_uplink.dm @@ -3,7 +3,7 @@ desc = "A market uplink. Usable with markets. You probably shouldn't have this!" icon = 'icons/obj/devices/blackmarket.dmi' icon_state = "uplink" - + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.65, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3.3) // UI variables. /// What category is the current uplink viewing? var/viewing_category diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 0affe715fe0..f4d9167c6fa 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -409,6 +409,7 @@ icon_state = "sunhudsci" desc = "A pair of tacky purple sunglasses that allow the wearer to recognize various chemical compounds with only a glance." clothing_traits = list(TRAIT_REAGENT_SCANNER, TRAIT_RESEARCH_SCANNER) + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 0.55, /datum/material/iron = SMALL_MATERIAL_AMOUNT / 2) /obj/item/clothing/glasses/sunglasses/chemical/add_glasses_slapcraft_component() var/static/list/slapcraft_recipe_list = list(/datum/crafting_recipe/scienceglassesremoval) @@ -530,6 +531,7 @@ flags_cover = GLASSESCOVERSEYES tint = INFINITY // You WILL Be blind, no matter what dog_fashion = /datum/dog_fashion/head + custom_materials = null /obj/item/clothing/glasses/blindfold/Initialize(mapload) . = ..() @@ -541,6 +543,7 @@ icon_state = "trickblindfold" inhand_icon_state = "blindfold" flags_cover = GLASSESCOVERSEYES + custom_materials = null /obj/item/clothing/glasses/blindfold/white name = "blind personnel blindfold" @@ -819,3 +822,4 @@ icon_state = "phantom_glasses" inhand_icon_state = null flags_cover = GLASSESCOVERSEYES + custom_materials = null diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 170d624a32f..3887807503c 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -100,6 +100,7 @@ flags_cover = GLASSESCOVERSEYES tint = 1 glass_colour_type = /datum/client_colour/glass_colour/blue + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 0.55, /datum/material/iron = SMALL_MATERIAL_AMOUNT / 2) /obj/item/clothing/glasses/hud/health/sunglasses/Initialize(mapload) . = ..() @@ -141,6 +142,7 @@ flash_protect = FLASH_PROTECTION_FLASH flags_cover = GLASSESCOVERSEYES tint = 1 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 0.55, /datum/material/iron = SMALL_MATERIAL_AMOUNT / 2) /obj/item/clothing/glasses/hud/diagnostic/sunglasses/Initialize(mapload) . = ..() @@ -184,6 +186,7 @@ flags_cover = GLASSESCOVERSEYES tint = 1 glass_colour_type = /datum/client_colour/glass_colour/darkred + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 0.55, /datum/material/iron = SMALL_MATERIAL_AMOUNT / 2) /obj/item/clothing/glasses/hud/security/sunglasses/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/gloves/bone.dm b/code/modules/clothing/gloves/bone.dm index a29d4cfd223..f429d938241 100644 --- a/code/modules/clothing/gloves/bone.dm +++ b/code/modules/clothing/gloves/bone.dm @@ -11,6 +11,7 @@ max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | LAVA_PROOF armor_type = /datum/armor/gloves_bracer + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2) /obj/item/clothing/gloves/bracer/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/gloves/special.dm b/code/modules/clothing/gloves/special.dm index 4207b9eafda..875fdcfda52 100644 --- a/code/modules/clothing/gloves/special.dm +++ b/code/modules/clothing/gloves/special.dm @@ -68,6 +68,7 @@ icon_state = "radio_g" inhand_icon_state = null clothing_traits = list(TRAIT_CAN_SIGN_ON_COMMS) + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.9, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.4) /obj/item/clothing/gloves/race name = "race gloves" diff --git a/code/modules/clothing/head/cone.dm b/code/modules/clothing/head/cone.dm index a77d40b541f..844558b5515 100644 --- a/code/modules/clothing/head/cone.dm +++ b/code/modules/clothing/head/cone.dm @@ -16,6 +16,7 @@ pickup_sound = 'sound/items/handling/materials/plastic_pick_up.ogg' drop_sound = 'sound/items/handling/materials/plastic_drop.ogg' resistance_flags = NONE + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2) /obj/item/clothing/head/cone/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/head/costume.dm b/code/modules/clothing/head/costume.dm index ff386aba546..dca79cd254b 100644 --- a/code/modules/clothing/head/costume.dm +++ b/code/modules/clothing/head/costume.dm @@ -124,6 +124,7 @@ clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT) dog_fashion = /datum/dog_fashion/head/cardborg @@ -142,6 +143,7 @@ clothing_flags = SNUG_FIT flags_inv = HIDEEARS|HIDEHAIR armor_type = /datum/armor/costume_bronze + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT) /obj/item/clothing/head/costume/fancy name = "fancy hat" @@ -173,6 +175,7 @@ clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES|HEADCOVERSMOUTH flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) /datum/armor/costume_bronze melee = 5 diff --git a/code/modules/clothing/head/crown.dm b/code/modules/clothing/head/crown.dm index b441453a1c3..5cb914875f1 100644 --- a/code/modules/clothing/head/crown.dm +++ b/code/modules/clothing/head/crown.dm @@ -4,6 +4,7 @@ icon_state = "crown" armor_type = /datum/armor/costume_crown resistance_flags = FIRE_PROOF + custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 5) /datum/armor/costume_crown melee = 15 diff --git a/code/modules/clothing/head/garlands.dm b/code/modules/clothing/head/garlands.dm index 374bd2fdafd..3bf2506c6e8 100644 --- a/code/modules/clothing/head/garlands.dm +++ b/code/modules/clothing/head/garlands.dm @@ -18,6 +18,7 @@ desc = "A flower crown made out of the flowers of the rainbow bunch plant." icon_state = "rainbow_bunch_crown_1" base_icon_state = "rainbow_bunch_crown" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.3) //tied together with cable coil /obj/item/clothing/head/costume/garland/rainbowbunch/Initialize(mapload) . = ..() @@ -38,16 +39,19 @@ desc = "A bright flower crown made out sunflowers that is sure to brighten up anyone's day!" icon_state = "sunflower_crown" worn_icon_state = "sunflower_crown" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.3) //tied together with cable coil /obj/item/clothing/head/costume/garland/poppy name = "poppy crown" desc = "A flower crown made out of a string of bright red poppies." icon_state = "poppy_crown" worn_icon_state = "poppy_crown" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.3) //tied together with cable coil /obj/item/clothing/head/costume/garland/lily name = "lily crown" desc = "A leafy flower crown with a cluster of large white lilies at the front." icon_state = "lily_crown" worn_icon_state = "lily_crown" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.3) //tied together with cable coil diff --git a/code/modules/clothing/head/hat.dm b/code/modules/clothing/head/hat.dm index f2684ac56b9..97b586bd660 100644 --- a/code/modules/clothing/head/hat.dm +++ b/code/modules/clothing/head/hat.dm @@ -391,3 +391,4 @@ icon_state = "paper" worn_icon_state = "paper" dog_fashion = /datum/dog_fashion/head + custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index c92c7a02360..ff8c725218f 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -444,6 +444,7 @@ worn_icon = 'icons/mob/large-worn-icons/64x64/head.dmi' worn_x_dimension = 64 worn_y_dimension = 64 + custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 2, /datum/material/gold = SHEET_MATERIAL_AMOUNT * 2) /obj/item/clothing/head/hats/hos/beret name = "head of security's beret" diff --git a/code/modules/clothing/head/papersack.dm b/code/modules/clothing/head/papersack.dm index 984b73d6bcc..1c1aa342792 100644 --- a/code/modules/clothing/head/papersack.dm +++ b/code/modules/clothing/head/papersack.dm @@ -3,6 +3,7 @@ desc = "A paper sack with crude holes cut out for eyes. Useful for hiding one's identity or ugliness." icon_state = "papersack" flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS|HIDESNOUT + custom_materials = list(/datum/material/paper = SHEET_MATERIAL_AMOUNT * 1.25) /obj/item/clothing/head/costume/papersack/smiley name = "paper sack hat" diff --git a/code/modules/clothing/masks/costume.dm b/code/modules/clothing/masks/costume.dm index 253380adc49..27d17af36e0 100644 --- a/code/modules/clothing/masks/costume.dm +++ b/code/modules/clothing/masks/costume.dm @@ -93,3 +93,4 @@ greyscale_config = /datum/greyscale_config/rebellion_mask greyscale_config_worn = /datum/greyscale_config/rebellion_mask/worn flags_1 = IS_PLAYER_COLORABLE_1 + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index b838a4578d0..486e41b5915 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -453,7 +453,7 @@ GLOBAL_LIST_INIT(clown_mask_options, list( desc = "A creepy wooden mask. Surprisingly expressive for a poorly carved bit of wood." icon_state = "tiki_eyebrow" inhand_icon_state = null - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 1.25) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) resistance_flags = FLAMMABLE flags_cover = MASKCOVERSEYES max_integrity = 100 diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index cc18e6dd41f..d6e061aebe7 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -573,6 +573,7 @@ worn_y_offset = 10 alternate_worn_layer = ABOVE_BODY_FRONT_HEAD_LAYER resistance_flags = FIRE_PROOF | LAVA_PROOF + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2, /datum/material/diamond = SHEET_MATERIAL_AMOUNT * 2) /obj/item/clothing/neck/wreath/worn_overlays(mutable_appearance/standing, isinhands, icon_file) . = ..() @@ -584,3 +585,4 @@ desc = "An elaborate crown made from the twisted flesh and sinew of an icewing watcher. \ Wearing it sends shivers down your spine just from being near it." icon_state = "icewing_wreath" + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SHEET_MATERIAL_AMOUNT * 2) diff --git a/code/modules/clothing/shoes/costume.dm b/code/modules/clothing/shoes/costume.dm index 6b44d607077..bc361e3685b 100644 --- a/code/modules/clothing/shoes/costume.dm +++ b/code/modules/clothing/shoes/costume.dm @@ -7,6 +7,7 @@ equip_delay_other = 10 SECONDS armor_type = /datum/armor/shoes_roman fastening_type = SHOES_STRAPS + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) /obj/item/clothing/shoes/griffin name = "griffon boots" @@ -41,6 +42,7 @@ icon = 'icons/obj/clothing/shoes.dmi' icon_state = "clockwork_treads" fastening_type = SHOES_SLIPON + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT) /obj/item/clothing/shoes/bronze/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/shoes/sandals.dm b/code/modules/clothing/shoes/sandals.dm index 097bf62ecbf..e1f8b445a10 100644 --- a/code/modules/clothing/shoes/sandals.dm +++ b/code/modules/clothing/shoes/sandals.dm @@ -3,7 +3,7 @@ name = "sandals" icon_state = "wizard" inhand_icon_state = "wizshoe" - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 0.5) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) resistance_flags = FLAMMABLE strip_delay = 0.5 SECONDS equip_delay_other = 5 SECONDS diff --git a/code/modules/clothing/suits/costume.dm b/code/modules/clothing/suits/costume.dm index 8d0473c988e..b7f44165879 100644 --- a/code/modules/clothing/suits/costume.dm +++ b/code/modules/clothing/suits/costume.dm @@ -176,6 +176,7 @@ body_parts_covered = CHEST|GROIN|LEGS flags_inv = HIDEJUMPSUIT dog_fashion = /datum/dog_fashion/back + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 3) var/in_use = FALSE /obj/item/clothing/suit/costume/cardborg/equipped(mob/living/user, slot) @@ -568,6 +569,7 @@ /obj/item/toy/clockwork_watch, ) armor_type = /datum/armor/costume_bronze + custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT) /obj/item/clothing/suit/hooded/mysticrobe name = "mystic's robe" diff --git a/code/modules/clothing/suits/wetfloor.dm b/code/modules/clothing/suits/wetfloor.dm index 09368cbed41..9a623d88f8b 100644 --- a/code/modules/clothing/suits/wetfloor.dm +++ b/code/modules/clothing/suits/wetfloor.dm @@ -23,6 +23,7 @@ /obj/item/tank/internals/plasmaman, /obj/item/gun/ballistic/rifle/boltaction/pipegun, ) + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2) /datum/armor/suit_caution melee = 5 diff --git a/code/modules/clothing/under/accessories/tribal.dm b/code/modules/clothing/under/accessories/tribal.dm index 552751bd8ea..c75b8940f8a 100644 --- a/code/modules/clothing/under/accessories/tribal.dm +++ b/code/modules/clothing/under/accessories/tribal.dm @@ -5,6 +5,7 @@ icon_state = "talisman" attachment_slot = NONE resistance_flags = FIRE_PROOF | LAVA_PROOF + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2) /obj/item/clothing/accessory/skullcodpiece name = "skull codpiece" @@ -12,6 +13,7 @@ icon_state = "skull" attachment_slot = GROIN resistance_flags = FIRE_PROOF | LAVA_PROOF + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2) /obj/item/clothing/accessory/skilt name = "sinew skirt" @@ -20,3 +22,4 @@ minimize_when_attached = FALSE attachment_slot = GROIN resistance_flags = FIRE_PROOF | LAVA_PROOF + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT) diff --git a/code/modules/experisci/handheld_scanner.dm b/code/modules/experisci/handheld_scanner.dm index a89fcfd16d7..a91db73a017 100644 --- a/code/modules/experisci/handheld_scanner.dm +++ b/code/modules/experisci/handheld_scanner.dm @@ -49,19 +49,8 @@ return MANUAL_SUICIDE /obj/item/experi_scanner/proc/make_meat_toilet(mob/living/carbon/user) - ///The suicide victim's brain that will be placed inside the toilet's cistern - var/obj/item/organ/brain/toilet_brain = user.get_organ_slot(ORGAN_SLOT_BRAIN) ///The toilet we're about to unleash unto this cursed plane of existence - var/obj/structure/toilet/greyscale/result_toilet = new (drop_location()) - - result_toilet.set_custom_materials(list(GET_MATERIAL_REF(/datum/material/meat/mob_meat, user) = SHEET_MATERIAL_AMOUNT)) - result_toilet.desc = "A horrendous mass of fused flesh resembling a standard-issue HT-451 model toilet. How it manages to function as one is beyond you. \ - This one seems to be made out of the flesh of a devoted employee of the RnD department." - result_toilet.buildstacktype = /obj/effect/decal/remains/human //this also prevents the toilet from dropping meat sheets. if you want to cheese the meat exepriments, sacrifice more people + new /obj/structure/toilet/greyscale/flesh (drop_location(), user) //the toilet's Initialize proc will handle the rest from here. icon_state = "experiscanner" remove_atom_colour(ADMIN_COLOUR_PRIORITY, COLOR_RED) - - user.gib(DROP_BRAIN) //we delete everything but the brain, as it's going to be moved to the cistern - toilet_brain.forceMove(result_toilet) - result_toilet.w_items += toilet_brain.w_class diff --git a/code/modules/fishing/aquarium/aquarium.dm b/code/modules/fishing/aquarium/aquarium.dm index efe4e2a648c..db01cfb9cb5 100644 --- a/code/modules/fishing/aquarium/aquarium.dm +++ b/code/modules/fishing/aquarium/aquarium.dm @@ -9,6 +9,7 @@ base_icon_state = "aquarium" integrity_failure = 0.3 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 10) //This is the area where fish can swim var/aquarium_zone_min_pw = 2 @@ -129,6 +130,7 @@ throw_range = 3 w_class = WEIGHT_CLASS_BULKY item_flags = SLOWS_WHILE_IN_HAND + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 5) custom_price = PAYCHECK_CREW * 9 diff --git a/code/modules/fishing/fish_mount.dm b/code/modules/fishing/fish_mount.dm index 2363a206548..0aa95678051 100644 --- a/code/modules/fishing/fish_mount.dm +++ b/code/modules/fishing/fish_mount.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/wallmounts.dmi' icon_state = "fish_mount_item" result_path = /obj/structure/fish_mount - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) pixel_shift = 31 ///Reference to the persistent_id of the mount this was spawned from. var/persistence_id diff --git a/code/modules/fishing/fishing_equipment.dm b/code/modules/fishing/fishing_equipment.dm index 66bd2c8a1d2..941639871c0 100644 --- a/code/modules/fishing/fishing_equipment.dm +++ b/code/modules/fishing/fishing_equipment.dm @@ -291,6 +291,7 @@ desc = "A simple hook carved from sharpened bone" icon_state = "hook_bone" wiki_desc = "A generic fishing hook carved out of sharpened bone. Bone fishing rods come pre-equipped with it." + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT) /obj/item/fishing_hook/stabilized name = "gyro-stabilized hook" diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm index 69387aa293e..542295d92fe 100644 --- a/code/modules/fishing/fishing_rod.dm +++ b/code/modules/fishing/fishing_rod.dm @@ -695,6 +695,7 @@ frame_state = "frame_bone" line = null //sinew line (usable to fish in lava) not included hook = /obj/item/fishing_hook/bone + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2) /obj/item/fishing_rod/telescopic name = "telescopic fishing rod" diff --git a/code/modules/food_and_drinks/machinery/grill.dm b/code/modules/food_and_drinks/machinery/grill.dm index a52749280dd..75c8a06359d 100644 --- a/code/modules/food_and_drinks/machinery/grill.dm +++ b/code/modules/food_and_drinks/machinery/grill.dm @@ -12,6 +12,7 @@ pass_flags_self = PASSMACHINE | LETPASSTHROW processing_flags = START_PROCESSING_MANUALLY use_power = NO_POWER_USE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 8, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5) ///The amount of fuel gained from stacks or reagents var/grill_fuel = 0 diff --git a/code/modules/food_and_drinks/machinery/smartfridge.dm b/code/modules/food_and_drinks/machinery/smartfridge.dm index f6605a71a5b..d8ed0be1a62 100644 --- a/code/modules/food_and_drinks/machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/machinery/smartfridge.dm @@ -550,6 +550,7 @@ base_build_path = /obj/machinery/smartfridge/drying/rack use_power = NO_POWER_USE idle_power_usage = 0 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10) /obj/machinery/smartfridge/drying/rack/Initialize(mapload) . = ..() diff --git a/code/modules/food_and_drinks/recipes/food_mixtures.dm b/code/modules/food_and_drinks/recipes/food_mixtures.dm index ec5b91f41b7..ffa4b2c5c4f 100644 --- a/code/modules/food_and_drinks/recipes/food_mixtures.dm +++ b/code/modules/food_and_drinks/recipes/food_mixtures.dm @@ -4,8 +4,9 @@ /obj/item/reagent_containers/cup/bowl, /obj/item/popsicle_stick, /obj/item/stack/rods, + /obj/item/reagent_containers/cup/glass/sillycup, ) - crafting_flags = parent_type::crafting_flags | CRAFT_TRANSFERS_REAGENTS | CRAFT_CLEARS_REAGENTS | CRAFT_ENFORCE_MATERIALS_PARITY + crafting_flags = parent_type::crafting_flags | CRAFT_TRANSFERS_REAGENTS | CRAFT_CLEARS_REAGENTS ///The food types that are added to the result when the recipe is completed var/added_foodtypes = NONE ///The food types that are removed to the result when the recipe is completed diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_drink.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_drink.dm index 82016dab5c3..ada80461970 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_drink.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_drink.dm @@ -32,6 +32,7 @@ /datum/reagent/consumable/ethanol/hooch = 100 ) result = /obj/item/reagent_containers/cup/glass/bottle/hooch + requirements_mats_blacklist = list(/obj/item/storage/box/papersack) category = CAT_DRINK /datum/crafting_recipe/blazaambottle diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_frozen.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_frozen.dm index 8ac20e53398..37213a2a684 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_frozen.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_frozen.dm @@ -73,7 +73,7 @@ //////////////////////////SNOW CONES/////////////////////// -/datum/crafting_recipe/food/flavorless_sc +/datum/crafting_recipe/food/snowcone name = "Flavorless snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -82,7 +82,7 @@ result = /obj/item/food/snowcones category = CAT_ICE -/datum/crafting_recipe/food/pineapple_sc +/datum/crafting_recipe/food/snowcone/pineapple name = "Pineapple snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -90,9 +90,8 @@ /datum/reagent/consumable/pineapplejuice = 5 ) result = /obj/item/food/snowcones/pineapple - category = CAT_ICE -/datum/crafting_recipe/food/lime_sc +/datum/crafting_recipe/food/snowcone/lime name = "Lime snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -100,9 +99,8 @@ /datum/reagent/consumable/limejuice = 5 ) result = /obj/item/food/snowcones/lime - category = CAT_ICE -/datum/crafting_recipe/food/lemon_sc +/datum/crafting_recipe/food/snowcone/lemon name = "Lemon snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -110,9 +108,8 @@ /datum/reagent/consumable/lemonjuice = 5 ) result = /obj/item/food/snowcones/lemon - category = CAT_ICE -/datum/crafting_recipe/food/apple_sc +/datum/crafting_recipe/food/snowcone/apple name = "Apple snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -120,9 +117,8 @@ /datum/reagent/consumable/applejuice = 5 ) result = /obj/item/food/snowcones/apple - category = CAT_ICE -/datum/crafting_recipe/food/grape_sc +/datum/crafting_recipe/food/snowcone/grape name = "Grape snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -130,9 +126,8 @@ /datum/reagent/consumable/grapejuice = 5 ) result = /obj/item/food/snowcones/grape - category = CAT_ICE -/datum/crafting_recipe/food/orange_sc +/datum/crafting_recipe/food/snowcone/orange name = "Orange snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -140,9 +135,8 @@ /datum/reagent/consumable/orangejuice = 5 ) result = /obj/item/food/snowcones/orange - category = CAT_ICE -/datum/crafting_recipe/food/blue_sc +/datum/crafting_recipe/food/snowcone/blue name = "Bluecherry snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -150,9 +144,8 @@ /datum/reagent/consumable/bluecherryjelly= 5 ) result = /obj/item/food/snowcones/blue - category = CAT_ICE -/datum/crafting_recipe/food/red_sc +/datum/crafting_recipe/food/snowcone/red name = "Cherry snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -160,9 +153,8 @@ /datum/reagent/consumable/cherryjelly= 5 ) result = /obj/item/food/snowcones/red - category = CAT_ICE -/datum/crafting_recipe/food/berry_sc +/datum/crafting_recipe/food/snowcone/berry name = "Berry snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -170,9 +162,8 @@ /datum/reagent/consumable/berryjuice = 5 ) result = /obj/item/food/snowcones/berry - category = CAT_ICE -/datum/crafting_recipe/food/fruitsalad_sc +/datum/crafting_recipe/food/snowcone/fruitsalad name = "Fruit Salad snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -183,9 +174,8 @@ /datum/reagent/consumable/lemonjuice = 5 ) result = /obj/item/food/snowcones/fruitsalad - category = CAT_ICE -/datum/crafting_recipe/food/mime_sc +/datum/crafting_recipe/food/snowcone/mime name = "Mime snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -193,9 +183,8 @@ /datum/reagent/consumable/nothing = 5 ) result = /obj/item/food/snowcones/mime - category = CAT_ICE -/datum/crafting_recipe/food/clown_sc +/datum/crafting_recipe/food/snowcone/clown name = "Clown snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -203,9 +192,8 @@ /datum/reagent/consumable/laughter = 5 ) result = /obj/item/food/snowcones/clown - category = CAT_ICE -/datum/crafting_recipe/food/soda_sc +/datum/crafting_recipe/food/snowcone/soda name = "Space Cola snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -213,9 +201,8 @@ /datum/reagent/consumable/space_cola = 5 ) result = /obj/item/food/snowcones/soda - category = CAT_ICE -/datum/crafting_recipe/food/spacemountainwind_sc +/datum/crafting_recipe/food/snowcone/spacemountainwind name = "Space Mountain Wind snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -223,9 +210,8 @@ /datum/reagent/consumable/spacemountainwind = 5 ) result = /obj/item/food/snowcones/spacemountainwind - category = CAT_ICE -/datum/crafting_recipe/food/pwrgame_sc +/datum/crafting_recipe/food/snowcone/pwrgame name = "Pwrgame snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -233,9 +219,8 @@ /datum/reagent/consumable/pwr_game = 15 ) result = /obj/item/food/snowcones/pwrgame - category = CAT_ICE -/datum/crafting_recipe/food/honey_sc +/datum/crafting_recipe/food/snowcone/honey name = "Honey snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -243,9 +228,8 @@ /datum/reagent/consumable/honey = 5 ) result = /obj/item/food/snowcones/honey - category = CAT_ICE -/datum/crafting_recipe/food/rainbow_sc +/datum/crafting_recipe/food/snowcone/rainbow name = "Rainbow snowcone" reqs = list( /obj/item/reagent_containers/cup/glass/sillycup = 1, @@ -253,7 +237,6 @@ /datum/reagent/colorful_reagent = 1 //Harder to make ) result = /obj/item/food/snowcones/rainbow - category = CAT_ICE //////////////////////////POPSICLES/////////////////////// diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm index acf3109431c..0a7bc4c97d5 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm @@ -555,6 +555,7 @@ result = /obj/item/food/fortunecookie added_foodtypes = SUGAR category = CAT_PASTRY + requirements_mats_blacklist = list(/obj/item/paper) /datum/crafting_recipe/food/poppypretzel time = 1.5 SECONDS diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index cb073c99b03..ff25eac7976 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -30,6 +30,7 @@ icon_state = "beebox" anchored = TRUE density = TRUE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 40) var/mob/living/basic/bee/queen/queen_bee = null var/list/bees = list() //bees owned by the box, not those inside it var/list/honeycombs = list() diff --git a/code/modules/hydroponics/beekeeping/honey_frame.dm b/code/modules/hydroponics/beekeeping/honey_frame.dm index 5c4c1f3f8d1..bb92091b6d1 100644 --- a/code/modules/hydroponics/beekeeping/honey_frame.dm +++ b/code/modules/hydroponics/beekeeping/honey_frame.dm @@ -4,6 +4,7 @@ desc = "A scaffold for bees to build honeycomb on." icon = 'icons/obj/service/hydroponics/equipment.dmi' icon_state = "honey_frame" + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) var/honeycomb_capacity = 10 //10 Honeycomb per frame by default, researchable frames perhaps? diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index ab52f9e6c56..b4c15f221a2 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -10,6 +10,7 @@ anchored = FALSE pressure_resistance = 2 * ONE_ATMOSPHERE max_integrity = 300 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 8) /// Is the barrel currently opened? var/open = FALSE /// Can the barrel be opened? diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index f2d611b1aef..cf7b7411c48 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -137,6 +137,7 @@ density = FALSE anchored = TRUE buckle_lying = 90 + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 5) /// Overlay we apply when impaling a mob. var/mutable_appearance/stab_overlay diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index edd652f59a2..51100267572 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -64,7 +64,7 @@ attack_verb_continuous = list("slashes", "slices", "bashes", "claws") attack_verb_simple = list("slash", "slice", "bash", "claw") hitsound = null - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 1.5) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) resistance_flags = FLAMMABLE flags_1 = NONE diff --git a/code/modules/hydroponics/soil.dm b/code/modules/hydroponics/soil.dm index c46685ac689..afa100cf4a3 100644 --- a/code/modules/hydroponics/soil.dm +++ b/code/modules/hydroponics/soil.dm @@ -13,6 +13,7 @@ maxnutri = 15 tray_flags = SOIL armor_type = /datum/armor/obj_soil + custom_materials = list(/datum/material/sand = SHEET_MATERIAL_AMOUNT * 3) //which type of sack to create when shovled. var/sack_type = /obj/item/soil_sack diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index cde0adbdc94..af22d2a8df8 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -48,6 +48,7 @@ inhand_icon_state = "violin" hitsound = SFX_SWING_HIT allowed_instrument_ids = "violin" + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 4, /datum/material/iron = SHEET_MATERIAL_AMOUNT) /obj/item/instrument/violin/golden name = "golden violin" @@ -55,6 +56,7 @@ icon_state = "golden_violin" inhand_icon_state = "golden_violin" resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 4, /datum/material/iron = SHEET_MATERIAL_AMOUNT) /obj/item/instrument/banjo name = "banjo" diff --git a/code/modules/library/bookcase.dm b/code/modules/library/bookcase.dm index a591b15d15c..f0440ba70e4 100644 --- a/code/modules/library/bookcase.dm +++ b/code/modules/library/bookcase.dm @@ -13,6 +13,7 @@ resistance_flags = FLAMMABLE max_integrity = 200 armor_type = /datum/armor/structure_bookcase + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 4) var/state = BOOKCASE_UNANCHORED /// When enabled, books_to_load number of random books will be generated for this bookcase var/load_random_books = FALSE diff --git a/code/modules/manufactorio/machines/storagebox.dm b/code/modules/manufactorio/machines/storagebox.dm index 408493d4a89..bd528d349b4 100644 --- a/code/modules/manufactorio/machines/storagebox.dm +++ b/code/modules/manufactorio/machines/storagebox.dm @@ -2,6 +2,7 @@ name = "manufacturing storage unit" desc = "Its basically a box. Receives resources (if anchored). Needs a machine to take stuff out of without dumping everything out." icon_state = "box" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10) /// how much can we hold var/max_stuff = 16 diff --git a/code/modules/mapfluff/ruins/lavaland_ruin_code.dm b/code/modules/mapfluff/ruins/lavaland_ruin_code.dm index 18db493cf84..1e5d10beb0f 100644 --- a/code/modules/mapfluff/ruins/lavaland_ruin_code.dm +++ b/code/modules/mapfluff/ruins/lavaland_ruin_code.dm @@ -35,6 +35,7 @@ icon_state = "shell_unfinished" desc = "The incomplete body of a golem. Add ten sheets of certain minerals to finish." w_class = WEIGHT_CLASS_BULKY + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 20) /// Amount of minerals you need to feed the shell to wake it up var/required_stacks = 10 /// Type of shell to create @@ -65,3 +66,4 @@ /obj/item/golem_shell/servant name = "incomplete servant golem shell" shell_type = /obj/effect/mob_spawn/ghost_role/human/golem/servant + custom_materials = list(/datum/material/adamantine = SHEET_MATERIAL_AMOUNT * 3) diff --git a/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm b/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm index 2fe5f1a9b45..9e2c52e453f 100644 --- a/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm +++ b/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm @@ -6,7 +6,7 @@ impressiveness = 18 // Carved from the bones of a massive creature, it's going to be a specticle to say the least layer = ABOVE_ALL_MOB_LAYER plane = ABOVE_GAME_PLANE - custom_materials = list(/datum/material/bone=SHEET_MATERIAL_AMOUNT*5) + custom_materials = list(/datum/material/bone= SHEET_MATERIAL_AMOUNT * 5) abstract_type = /obj/structure/statue/bone /obj/structure/statue/bone/Initialize(mapload) @@ -17,7 +17,7 @@ /obj/structure/statue/bone/rib name = "colossal rib" desc = "It's staggering to think that something this big could have lived, let alone died." - custom_materials = list(/datum/material/bone=SHEET_MATERIAL_AMOUNT*4) + custom_materials = list(/datum/material/bone=SHEET_MATERIAL_AMOUNT * 10) icon = 'icons/obj/art/statuelarge.dmi' icon_state = "rib" icon_preview = 'icons/obj/fluff/previews.dmi' @@ -26,7 +26,7 @@ /obj/structure/statue/bone/skull name = "colossal skull" desc = "The gaping maw of a dead, titanic monster." - custom_materials = list(/datum/material/bone=SHEET_MATERIAL_AMOUNT*12) + custom_materials = list(/datum/material/bone=SHEET_MATERIAL_AMOUNT * 6) icon = 'icons/obj/art/statuelarge.dmi' icon_state = "skull" icon_preview = 'icons/obj/fluff/previews.dmi' @@ -34,7 +34,7 @@ /obj/structure/statue/bone/skull/half desc = "The gaping maw of a dead, titanic monster. This one is cracked in half." - custom_materials = list(/datum/material/bone=SHEET_MATERIAL_AMOUNT*6) + custom_materials = list(/datum/material/bone=SHEET_MATERIAL_AMOUNT * 3) icon = 'icons/obj/art/statuelarge.dmi' icon_state = "skull-half" icon_preview = 'icons/obj/fluff/previews.dmi' diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 4c3a9cb529b..e3b92dda982 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -194,6 +194,7 @@ heat_protection = CHEST|GROIN|LEGS|FEET|ARMS max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 6) /obj/item/clothing/suit/armor/bone/Initialize(mapload) . = ..() @@ -214,6 +215,7 @@ max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT armor_type = /datum/armor/hooded_explorer resistance_flags = FIRE_PROOF + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 4) /obj/item/clothing/head/helmet/skull/Initialize(mapload) . = ..() diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm index 3c24a608262..73ebdf10a71 100644 --- a/code/modules/mining/equipment/mining_tools.dm +++ b/code/modules/mining/equipment/mining_tools.dm @@ -181,6 +181,7 @@ attack_verb_simple = list("slash", "impale", "stab", "slice") sharpness = SHARP_EDGED item_flags = CRUEL_IMPLEMENT + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 4, /datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5) /obj/item/shovel/serrated/Initialize(mapload) . = ..() @@ -322,6 +323,7 @@ item_flags = SLOWS_WHILE_IN_HAND | IMMUTABLE_SLOW slowdown = 3 attack_speed = 1.2 SECONDS + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6.6, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 5) /// The factor at which the recoil becomes less. var/recoil_factor = 3 /// Wether we knock down and launch away out enemies when we attack. diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 0fdebbed0ce..823d125e6c1 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -417,6 +417,7 @@ icon_state = "mushroom_bowl" fill_icon_state = "fullbowl" fill_icon = 'icons/obj/mining_zones/ash_flora.dmi' + custom_materials = null /obj/item/reagent_containers/cup/bowl/mushroom_bowl/update_icon_state() if(!reagents.total_volume) diff --git a/code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm b/code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm index 7cbd1628be9..7f80822d652 100644 --- a/code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm +++ b/code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm @@ -5,6 +5,7 @@ desc = "The gathered remains of a drake. It still crackles with heat, and smells distinctly of brimstone." icon = 'icons/obj/clothing/head/helmet.dmi' icon_state = "dragon" + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 10) /obj/item/drake_remains/Initialize(mapload) . = ..() @@ -27,6 +28,7 @@ max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF transparent_protection = HIDEGLOVES|HIDESUITSTORAGE|HIDEJUMPSUIT|HIDESHOES + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 10) /datum/armor/cloak_drake melee = 65 diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 4e411ef8dc6..09bdd931fdd 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -134,3 +134,4 @@ icon = 'icons/obj/mining_zones/artefacts.dmi' icon_state = "skeleton_key" w_class = WEIGHT_CLASS_SMALL + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 5) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 5616080fa92..564cd18fe50 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -116,7 +116,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ new /datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 1 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_TOOLS), \ - new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50, crafting_flags = NONE, category = CAT_MISC),\ + new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50, crafting_flags = CRAFT_NO_MATERIALS, category = CAT_MISC),\ new /datum/stack_recipe("aesthetic volcanic floor tile", /obj/item/stack/tile/basalt, 2, 1, 50, crafting_flags = NONE, category = CAT_TILES)\ )) diff --git a/code/modules/mining/satchel_ore_box.dm b/code/modules/mining/satchel_ore_box.dm index 79bc8618a04..0c2011e2c54 100644 --- a/code/modules/mining/satchel_ore_box.dm +++ b/code/modules/mining/satchel_ore_box.dm @@ -8,6 +8,7 @@ desc = "A heavy wooden box, which can be filled with a lot of ores or boulders" density = TRUE pressure_resistance = 5 * ONE_ATMOSPHERE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 4) /obj/structure/ore_box/Initialize(mapload) . = ..() diff --git a/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm b/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm index 0fe0a6fab67..d52b70575c5 100644 --- a/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm +++ b/code/modules/mob/living/basic/bots/cleanbot/cleanbot.dm @@ -8,6 +8,7 @@ health = 25 maxHealth = 25 light_color = "#99ccff" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) req_one_access = list(ACCESS_ROBOTICS, ACCESS_JANITOR) radio_key = /obj/item/encryptionkey/headset_service diff --git a/code/modules/mob/living/basic/bots/firebot/firebot.dm b/code/modules/mob/living/basic/bots/firebot/firebot.dm index 1db37c6340b..b6ef076c629 100644 --- a/code/modules/mob/living/basic/bots/firebot/firebot.dm +++ b/code/modules/mob/living/basic/bots/firebot/firebot.dm @@ -7,6 +7,7 @@ icon_state = "firebot1" light_color = "#8cffc9" light_power = 0.8 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.9, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) req_one_access = list(ACCESS_ROBOTICS, ACCESS_CONSTRUCTION) radio_key = /obj/item/encryptionkey/headset_eng diff --git a/code/modules/mob/living/basic/bots/honkbots/honkbot.dm b/code/modules/mob/living/basic/bots/honkbots/honkbot.dm index cc4469f8971..eb57581ae16 100644 --- a/code/modules/mob/living/basic/bots/honkbots/honkbot.dm +++ b/code/modules/mob/living/basic/bots/honkbots/honkbot.dm @@ -4,6 +4,7 @@ icon_state = "honkbot" base_icon_state = "honkbot" damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, STAMINA = 0, OXY = 0) + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.8, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) req_access = list(ACCESS_ROBOTICS, ACCESS_THEATRE, ACCESS_JANITOR) radio_key = /obj/item/encryptionkey/headset_service ai_controller = /datum/ai_controller/basic_controller/bot/honkbot diff --git a/code/modules/mob/living/basic/bots/hygienebot/hygienebot.dm b/code/modules/mob/living/basic/bots/hygienebot/hygienebot.dm index e7077d30c16..eb4dd4565fd 100644 --- a/code/modules/mob/living/basic/bots/hygienebot/hygienebot.dm +++ b/code/modules/mob/living/basic/bots/hygienebot/hygienebot.dm @@ -21,6 +21,8 @@ additional_access = /datum/id_trim/job/janitor hackables = "cleaning service protocols" ai_controller = /datum/ai_controller/basic_controller/bot/hygienebot + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) + ///are we currently washing someone? var/washing = FALSE diff --git a/code/modules/mob/living/basic/bots/medbot/medbot.dm b/code/modules/mob/living/basic/bots/medbot/medbot.dm index 4ee3d826162..2877bac8d21 100644 --- a/code/modules/mob/living/basic/bots/medbot/medbot.dm +++ b/code/modules/mob/living/basic/bots/medbot/medbot.dm @@ -14,6 +14,7 @@ pass_flags = PASSMOB | PASSFLAPS status_flags = (CANPUSH | CANSTUN) ai_controller = /datum/ai_controller/basic_controller/bot/medbot + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) req_one_access = list(ACCESS_ROBOTICS, ACCESS_MEDICAL) radio_key = /obj/item/encryptionkey/headset_med diff --git a/code/modules/mob/living/basic/bots/repairbot/repairbot.dm b/code/modules/mob/living/basic/bots/repairbot/repairbot.dm index 29583c9fca9..ac42cc45916 100644 --- a/code/modules/mob/living/basic/bots/repairbot/repairbot.dm +++ b/code/modules/mob/living/basic/bots/repairbot/repairbot.dm @@ -11,6 +11,7 @@ health = 100 can_be_held = TRUE maxHealth = 100 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2) path_image_color = "#80dae7" bot_ui = "RepairBot" req_one_access = list(ACCESS_ROBOTICS, ACCESS_ENGINEERING) diff --git a/code/modules/mob/living/basic/bots/vibebot/vibebot.dm b/code/modules/mob/living/basic/bots/vibebot/vibebot.dm index b881e74fc92..ab89baea651 100644 --- a/code/modules/mob/living/basic/bots/vibebot/vibebot.dm +++ b/code/modules/mob/living/basic/bots/vibebot/vibebot.dm @@ -9,6 +9,8 @@ light_range = 6 ai_controller = /datum/ai_controller/basic_controller/bot/vibebot light_power = 2 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.8, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 4) + hackables = "vibing scanners" radio_key = /obj/item/encryptionkey/headset_service diff --git a/code/modules/mob/living/basic/lavaland/bileworm/bileworm_instrument.dm b/code/modules/mob/living/basic/lavaland/bileworm/bileworm_instrument.dm index 1e2d42761b9..508728ffa73 100644 --- a/code/modules/mob/living/basic/lavaland/bileworm/bileworm_instrument.dm +++ b/code/modules/mob/living/basic/lavaland/bileworm/bileworm_instrument.dm @@ -6,6 +6,7 @@ icon_state = "bilehorn" allowed_instrument_ids = "bilehorn" inhand_icon_state = null + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2) /datum/crafting_recipe/bilehorn name = "Bilehorn" diff --git a/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_loot.dm b/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_loot.dm index debd43e4504..662bbe9fb69 100644 --- a/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_loot.dm +++ b/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_loot.dm @@ -17,6 +17,7 @@ icon_state = "oresensor" icon = 'icons/obj/mining.dmi' slot_flags = ITEM_SLOT_EARS + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT) var/range = 5 var/cooldown = 4 SECONDS //between the standard and the advanced ore scanner in strength COOLDOWN_DECLARE(ore_sensing_cooldown) diff --git a/code/modules/mob/living/basic/lavaland/raptor/raptor_food_trough.dm b/code/modules/mob/living/basic/lavaland/raptor/raptor_food_trough.dm index 03289f2d0fe..efa600de5ae 100644 --- a/code/modules/mob/living/basic/lavaland/raptor/raptor_food_trough.dm +++ b/code/modules/mob/living/basic/lavaland/raptor/raptor_food_trough.dm @@ -5,3 +5,4 @@ icon_state = "raptor_trough" x_offsets = list(-5, 5) y_offsets = list(-4, 5) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 72dc3b9f644..11953281a2b 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -499,6 +499,7 @@ desc = "Clear out the swamp once and for all" icon_state = "hygienebot" created_name = "Hygienebot" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/item/bot_assembly/hygienebot/attackby(obj/item/I, mob/user, list/modifiers, list/attack_modifiers) . = ..() diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 4c492a545c9..5a615407f9a 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -15,6 +15,8 @@ automated_announcements = list(ED209_VOICED_DOWN_WEAPONS = 'sound/mobs/non-humanoids/ed209/ed209_20sec.ogg') + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.8, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2.1) + var/lastfired = 0 var/shot_delay = 1.5 SECONDS var/shoot_sound = 'sound/items/weapons/laser.ogg' diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index bf21d14b9f0..9630339022a 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -34,6 +34,8 @@ BEEPSKY_VOICED_SECURE_DAY = 'sound/mobs/non-humanoids/beepsky/secureday.ogg', ) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.2, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3.2) + ///Whether this secbot is considered 'commissioned' and given the trait on Initialize. var/commissioned = FALSE ///The type of baton this Secbot will use diff --git a/code/modules/mod/mod_core.dm b/code/modules/mod/mod_core.dm index ab5cc6ef9aa..174299fdc67 100644 --- a/code/modules/mod/mod_core.dm +++ b/code/modules/mod/mod_core.dm @@ -6,6 +6,7 @@ inhand_icon_state = "electronic" lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi' + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05) /// MOD unit we are powering. var/obj/item/mod/control/mod @@ -301,6 +302,7 @@ liquid electricity, this core makes it much more efficient, running all soft, hard, and wetware with several \ times less energy usage." /// A modifier to all charge we use, ethereals don't need to spend as much energy as normal suits. + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.15, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05) var/charge_modifier = 0.1 /obj/item/mod/core/ethereal/charge_source() diff --git a/code/modules/mod/modules/modules_engineering.dm b/code/modules/mod/modules/modules_engineering.dm index ab3e9366db6..9b24c5b7dc3 100644 --- a/code/modules/mod/modules/modules_engineering.dm +++ b/code/modules/mod/modules/modules_engineering.dm @@ -256,6 +256,7 @@ icon = 'icons/obj/clothing/modsuit/mod_modules.dmi' max_integrity = 60 interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6.15, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5) /// MODsuit tether module that created our projectile var/obj/item/mod/module/tether/parent_module /// Should we reset our pixel positions next time we move? diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 5f4b1f5dc6f..33199c8a92f 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -10,6 +10,7 @@ density = TRUE max_integrity = 300 integrity_failure = 0.5 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10) ///A flag that describes this device type var/hardware_flag = PROGRAM_CONSOLE diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 2856dddc296..cf9acc679d2 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -31,6 +31,8 @@ slot_flags = ITEM_SLOT_BELT resistance_flags = FLAMMABLE + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) + /// The stored pen var/obj/item/pen/pen /// Is the pen integrated? diff --git a/code/modules/paperwork/desk_bell.dm b/code/modules/paperwork/desk_bell.dm index 0f37a458729..860becaece0 100644 --- a/code/modules/paperwork/desk_bell.dm +++ b/code/modules/paperwork/desk_bell.dm @@ -11,7 +11,7 @@ max_integrity = 5000 // To make attacking it not instantly break it throwforce = 2 interaction_flags_mouse_drop = NEED_HANDS - + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /// The amount of times this bell has been rang, used to check the chance it breaks var/times_rang = 0 /// Is this bell broken? diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index ecd0ca40029..7f51baea891 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -17,6 +17,7 @@ icon_state = "filingcabinet" density = TRUE anchored = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2) /obj/structure/filingcabinet/chestdrawer name = "chest drawer" diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 944132545a5..382e6ea8212 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -7,6 +7,7 @@ pressure_resistance = 2 resistance_flags = FLAMMABLE obj_flags = UNIQUE_RENAME | RENAME_NO_DESC + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT) /// The background color for tgui in hex (with a `#`) var/bg_color = "#7f7f7f" /// A typecache of the objects that can be inserted into a folder diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index d8493feea2b..838019ef1e9 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -27,6 +27,7 @@ drop_sound = 'sound/items/handling/paper_drop.ogg' pickup_sound = 'sound/items/handling/paper_pickup.ogg' grind_results = list(/datum/reagent/cellulose = 3) + custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) color = COLOR_WHITE item_flags = SKIP_FANTASY_ON_SPAWN interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 6e24123bfa1..df55320a435 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -204,6 +204,7 @@ desc = "A plastic card for confidential corporate matters. Can be written on with pen somehow." icon_state = "corppaperslip" grind_results = list(/datum/reagent/plastic_polymers = 1.5) //It's a plastic card after all + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 3, /datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) max_integrity = 130 //Slightly more sturdy because of being made out of a plastic drop_sound = 'sound/items/handling/disk_drop.ogg' pickup_sound = 'sound/items/handling/disk_pickup.ogg' diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index f301ba3a29c..2e02ff0fdce 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -215,6 +215,7 @@ papertype = /obj/item/paper/natural resistance_flags = FLAMMABLE bin_overlay_string = "paper_bundle_overlay" + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) ///Cable this bundle is held together with. var/obj/item/stack/cable_coil/binding_cable diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index e92bfe47b47..572939355b8 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -165,7 +165,7 @@ icon_state = "pen-charcoal" colour = "#696969" font = CHARCOAL_FONT - custom_materials = null + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) grind_results = list(/datum/reagent/ash = 5, /datum/reagent/cellulose = 10) requires_gravity = FALSE // this is technically a pencil can_click = FALSE diff --git a/code/modules/power/floodlight.dm b/code/modules/power/floodlight.dm index 762272ebd64..1b5a8692743 100644 --- a/code/modules/power/floodlight.dm +++ b/code/modules/power/floodlight.dm @@ -11,7 +11,7 @@ icon = 'icons/obj/lighting.dmi' icon_state = "floodlight_c1" density = TRUE - + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) var/state = FLOODLIGHT_NEEDS_WIRES /obj/structure/floodlight_frame/Initialize(mapload) diff --git a/code/modules/power/supermatter/supermatter_variants.dm b/code/modules/power/supermatter/supermatter_variants.dm index 270994d0a10..146c5b34545 100644 --- a/code/modules/power/supermatter/supermatter_variants.dm +++ b/code/modules/power/supermatter/supermatter_variants.dm @@ -61,6 +61,7 @@ icon_state = "sm_small" moveable = TRUE anchored = FALSE + custom_materials = list(/datum/material/adamantine = SHEET_MATERIAL_AMOUNT * 20, /datum/material/iron = SHEET_MATERIAL_AMOUNT) /obj/machinery/power/supermatter_crystal/small/Initialize(mapload) . = ..() @@ -76,3 +77,4 @@ throw_speed = 1 throw_range = 1 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + custom_materials = list(/datum/material/adamantine = SHEET_MATERIAL_AMOUNT * 20) diff --git a/code/modules/projectiles/ammunition/ballistic/junk.dm b/code/modules/projectiles/ammunition/ballistic/junk.dm index 99a9b637923..2ec346b7d21 100644 --- a/code/modules/projectiles/ammunition/ballistic/junk.dm +++ b/code/modules/projectiles/ammunition/ballistic/junk.dm @@ -6,7 +6,7 @@ icon_state = "improvshell" caliber = CALIBER_JUNK projectile_type = /obj/projectile/bullet/junk - custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*2, /datum/material/glass=SMALL_MATERIAL_AMOUNT*1) + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 2, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1) // Junk Shell Spawner; used to spawn in our random shells upon crafting diff --git a/code/modules/projectiles/ammunition/ballistic/rifle.dm b/code/modules/projectiles/ammunition/ballistic/rifle.dm index fdef40f5f0f..ceef56677b0 100644 --- a/code/modules/projectiles/ammunition/ballistic/rifle.dm +++ b/code/modules/projectiles/ammunition/ballistic/rifle.dm @@ -64,6 +64,7 @@ base_icon_state = "rod_sharp" projectile_type = /obj/projectile/bullet/rebar newtonian_force = 1.5 + custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) /obj/item/ammo_casing/rebar/Initialize(mapload) . = ..() @@ -104,6 +105,7 @@ icon_state = "rod_healium" base_icon_state = "rod_healium" projectile_type = /obj/projectile/bullet/rebar/healium + custom_materials = null /// How many seconds of healing/sleeping action we have left, once all are spent the bolt dissolves var/heals_left = 6 SECONDS @@ -181,3 +183,4 @@ base_icon_state = "paperball" projectile_type = /obj/projectile/bullet/paperball newtonian_force = 0.5 + custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) diff --git a/code/modules/projectiles/ammunition/ballistic/shotgun.dm b/code/modules/projectiles/ammunition/ballistic/shotgun.dm index ea13dd878b8..8df354201f9 100644 --- a/code/modules/projectiles/ammunition/ballistic/shotgun.dm +++ b/code/modules/projectiles/ammunition/ballistic/shotgun.dm @@ -66,6 +66,7 @@ desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired." icon_state = "mshell" projectile_type = /obj/projectile/bullet/cannonball/meteorslug + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 8, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 4) /obj/item/ammo_casing/shotgun/pulseslug name = "pulse slug" @@ -74,6 +75,7 @@ would have difficulty with." icon_state = "pshell" projectile_type = /obj/projectile/beam/pulse/shotgun + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.2) /obj/item/ammo_casing/shotgun/frag12 name = "FRAG-12 slug" @@ -161,6 +163,7 @@ pellets = 4 variance = 15 randomspread = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7) /obj/item/ammo_casing/shotgun/scatterlaser name = "scatter laser shell" diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index f5c123866b3..bcc551bdd17 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -45,9 +45,16 @@ /obj/item/ammo_box/Initialize(mapload) . = ..() - custom_materials = SSmaterials.FindOrCreateMaterialCombo(custom_materials, 0.1) if(!start_empty) top_off(starting=TRUE) + else if(custom_materials && !(item_flags & ABSTRACT)) //internal magazines are abstract + var/obj/item/ammo_casing/prototype = new ammo_type + var/list/new_materials = custom_materials?.Copy() + for(var/mat in prototype.custom_materials) + new_materials[mat] -= prototype.custom_materials[mat] * max_ammo + qdel(prototype) + set_custom_materials(new_materials) + update_icon_state() /obj/item/ammo_box/Destroy(force) @@ -64,6 +71,11 @@ /obj/item/ammo_box/proc/remove_from_stored_ammo(atom/movable/gone) stored_ammo -= gone + if(gone.custom_materials && custom_materials && !(item_flags & ABSTRACT)) + var/list/new_materials = custom_materials?.Copy() + for(var/mat in gone.custom_materials) + new_materials[mat] -= gone.custom_materials[mat] + set_custom_materials(new_materials) update_appearance() /obj/item/ammo_box/add_weapon_description() @@ -108,8 +120,21 @@ stack_trace("Tried loading unsupported ammocasing type [load_type] into ammo box [type].") return + var/list/new_materials = null + if(!(item_flags & ABSTRACT)) + new_materials = custom_materials?.Copy() || list() for(var/i in max(1, stored_ammo.len + 1) to max_ammo) - stored_ammo += starting ? round_check : new round_check(src) + var/obj/item/ammo_casing/casing = round_check + if(!starting) + casing = new round_check(src) + if(new_materials) + for(var/mat in casing.custom_materials) + new_materials[mat] += casing.custom_materials[mat] + stored_ammo += casing + + if(!starting && length(new_materials)) + set_custom_materials(new_materials) + update_appearance() ///gets a round from the magazine @@ -141,6 +166,11 @@ if (stored_ammo.len < max_ammo) stored_ammo += new_round new_round.forceMove(src) + if(new_round.custom_materials && !(item_flags & ABSTRACT)) + var/list/new_materials = custom_materials?.Copy() || list() + for(var/mat in new_round.custom_materials) + new_materials[mat] += new_round.custom_materials[mat] + set_custom_materials(new_materials) return TRUE if(!replace_spent) diff --git a/code/modules/projectiles/boxes_magazines/external/pistol.dm b/code/modules/projectiles/boxes_magazines/external/pistol.dm index 250ec30af39..7fbece15863 100644 --- a/code/modules/projectiles/boxes_magazines/external/pistol.dm +++ b/code/modules/projectiles/boxes_magazines/external/pistol.dm @@ -104,6 +104,12 @@ max_ammo = 8 multiple_sprites = AMMO_BOX_PER_BULLET multiple_sprite_use_base = TRUE + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 10, + /datum/material/gold = SHEET_MATERIAL_AMOUNT * 10, + /datum/material/silver = SHEET_MATERIAL_AMOUNT * 10, + /datum/material/plasma = SHEET_MATERIAL_AMOUNT * 10, + ) // M1911 (.45) // diff --git a/code/modules/projectiles/boxes_magazines/external/rifle.dm b/code/modules/projectiles/boxes_magazines/external/rifle.dm index b716b8d1811..41f9ec15492 100644 --- a/code/modules/projectiles/boxes_magazines/external/rifle.dm +++ b/code/modules/projectiles/boxes_magazines/external/rifle.dm @@ -24,7 +24,7 @@ ammo_type = /obj/item/ammo_casing/c38 caliber = CALIBER_38 custom_materials = list( - /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT * 3, + /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT * 4, /datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT * 1, ) max_ammo = 15 diff --git a/code/modules/projectiles/boxes_magazines/internal/_internal.dm b/code/modules/projectiles/boxes_magazines/internal/_internal.dm index 43b34979e44..238ac94406d 100644 --- a/code/modules/projectiles/boxes_magazines/internal/_internal.dm +++ b/code/modules/projectiles/boxes_magazines/internal/_internal.dm @@ -4,6 +4,7 @@ spawn_blacklisted = TRUE obj_flags = CONDUCTS_ELECTRICITY item_flags = ABSTRACT + custom_materials = null //we are never gonna be recycled anyway //internals magazines are accessible, so replace spent ammo if full when trying to put a live one in /obj/item/ammo_box/magazine/internal/give_round(obj/item/ammo_casing/R) diff --git a/code/modules/projectiles/guns/ballistic/bows/bow_arrows.dm b/code/modules/projectiles/guns/ballistic/bows/bow_arrows.dm index 96459341cf3..d1d5a977de8 100644 --- a/code/modules/projectiles/guns/ballistic/bows/bow_arrows.dm +++ b/code/modules/projectiles/guns/ballistic/bows/bow_arrows.dm @@ -11,6 +11,7 @@ throwforce = 1 firing_effect_type = null caliber = CALIBER_ARROW + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT, /datum/material/iron = SHEET_MATERIAL_AMOUNT) ///Whether the bullet type spawns another casing of the same type or not. var/reusable = TRUE @@ -131,6 +132,7 @@ base_icon_state = "plastic_arrow" projectile_type = /obj/projectile/bullet/arrow/plastic reusable = FALSE //cheap shit + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT) /// plastic arrow projectile /obj/projectile/bullet/arrow/plastic @@ -179,6 +181,7 @@ inhand_icon_state = "ashen_arrow" base_icon_state = "ashen_arrow" projectile_type = /obj/projectile/bullet/arrow/ashen + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT) /// ashen arrow projectile /obj/projectile/bullet/arrow/ashen diff --git a/code/modules/projectiles/guns/ballistic/bows/bow_types.dm b/code/modules/projectiles/guns/ballistic/bows/bow_types.dm index 83d1edd8f63..dfc9e1ca980 100644 --- a/code/modules/projectiles/guns/ballistic/bows/bow_types.dm +++ b/code/modules/projectiles/guns/ballistic/bows/bow_types.dm @@ -10,6 +10,7 @@ desc = "A simple homemade shortbow. Great for LARPing. Or poking out someones eye." obj_flags = UNIQUE_RENAME projectile_damage_multiplier = 0.5 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 4, /datum/material/iron = SHEET_MATERIAL_AMOUNT) ///chaplain's divine archer bow /obj/item/gun/ballistic/bow/divine @@ -49,3 +50,4 @@ slot_flags = ITEM_SLOT_BACK obj_flags = UNIQUE_RENAME projectile_damage_multiplier = 0.5 + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 6) diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index e3f46ccaf40..4f1d86842e6 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -187,6 +187,7 @@ accepted_magazine_type = /obj/item/ammo_box/magazine/r10mm actions_types = list(/datum/action/item_action/toggle_firemode) obj_flags = UNIQUE_RENAME // if you did the sidequest, you get the customization + custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 30, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 25, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 11.5) /obj/item/gun/ballistic/automatic/pistol/aps name = "\improper Stechkin APS machine pistol" diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index 2a18fe54d70..db6567e2767 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -217,6 +217,7 @@ fire_sound = 'sound/items/xbow_lock.ogg' can_be_sawn_off = FALSE tac_reloads = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.2) var/draw_time = 3 SECONDS SET_BASE_PIXEL(0, 0) @@ -298,6 +299,7 @@ inhand_icon_state = "pipegun" worn_icon_state = "pipegun" fire_sound = 'sound/items/weapons/gun/sniper/shot.ogg' + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 8, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 8, /datum/material/cardboard = SHEET_MATERIAL_AMOUNT) accepted_magazine_type = /obj/item/ammo_box/magazine/internal/boltaction/pipegun projectile_damage_multiplier = 1.35 @@ -336,6 +338,7 @@ icon_state = "pipepistol" inhand_icon_state = "pipepistol" worn_icon_state = "gun" + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 4, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 7, /datum/material/cardboard = SHEET_MATERIAL_AMOUNT) accepted_magazine_type = /obj/item/ammo_box/magazine/internal/boltaction/pipegun/pistol projectile_damage_multiplier = 0.50 spread = 15 //kinda inaccurate @@ -360,6 +363,13 @@ worn_icon_state = "regal_pipegun" accepted_magazine_type = /obj/item/ammo_box/magazine/internal/boltaction/pipegun/prime projectile_damage_multiplier = 2 + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 9.15, + /datum/material/wood = SHEET_MATERIAL_AMOUNT *8, + /datum/material/gold = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.15, + /datum/material/cardboard = SHEET_MATERIAL_AMOUNT, + ) /obj/item/gun/ballistic/rifle/boltaction/pipegun/pistol/prime name = "regal pipe pistol" @@ -485,6 +495,7 @@ semi_auto = TRUE slot_flags = ITEM_SLOT_BACK projectile_damage_multiplier = 0.5 + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 8, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.5, /datum/material/cardboard = SHEET_MATERIAL_AMOUNT) SET_BASE_PIXEL(-8, 0) diff --git a/code/modules/projectiles/guns/energy/beam_rifle.dm b/code/modules/projectiles/guns/energy/beam_rifle.dm index 2791566fdcd..bf82ed7939b 100644 --- a/code/modules/projectiles/guns/energy/beam_rifle.dm +++ b/code/modules/projectiles/guns/energy/beam_rifle.dm @@ -21,6 +21,14 @@ selfcharge = TRUE light_color = COLOR_STRONG_BLUE self_charge_amount = STANDARD_ENERGY_GUN_SELF_CHARGE_RATE * 10 + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/uranium = SHEET_MATERIAL_AMOUNT * 4, + /datum/material/glass = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/diamond = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/gold = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/silver = SHEET_MATERIAL_AMOUNT * 2.25, + ) /obj/item/gun/energy/event_horizon/Initialize(mapload) . = ..() diff --git a/code/modules/projectiles/guns/energy/crank_guns.dm b/code/modules/projectiles/guns/energy/crank_guns.dm index 9ee228528c6..4110874abfb 100644 --- a/code/modules/projectiles/guns/energy/crank_guns.dm +++ b/code/modules/projectiles/guns/energy/crank_guns.dm @@ -7,6 +7,7 @@ ammo_type = list(/obj/item/ammo_casing/energy/laser/musket) slot_flags = ITEM_SLOT_BACK obj_flags = UNIQUE_RENAME + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 8, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.2, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.2) light_color = COLOR_PURPLE /obj/item/gun/energy/laser/musket/add_bayonet_point() @@ -35,6 +36,13 @@ inhand_icon_state = "musket_prime" worn_icon_state = "las_musket_prime" ammo_type = list(/obj/item/ammo_casing/energy/laser/musket/prime) + custom_materials = list( + /datum/material/wood = SHEET_MATERIAL_AMOUNT * 8, + /datum/material/silver = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.4, + /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.35, + /datum/material/plastic = SMALL_MATERIAL_AMOUNT * 2, + ) /obj/item/gun/energy/disabler/smoothbore @@ -46,6 +54,12 @@ charge_sections = 1 spread = 22.5 obj_flags = UNIQUE_RENAME + custom_materials = list( + /datum/material/wood = SHEET_MATERIAL_AMOUNT * 8, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.25, + /datum/material/cardboard = SHEET_MATERIAL_AMOUNT, + /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.2, + ) /obj/item/gun/energy/disabler/smoothbore/Initialize(mapload) . = ..() @@ -75,6 +89,12 @@ ammo_type = list(/obj/item/ammo_casing/energy/disabler/smoothbore/prime) charge_sections = 2 spread = 0 //could be like 5, but having just very tiny spread kinda feels like bullshit + custom_materials = list( + /datum/material/wood = SHEET_MATERIAL_AMOUNT * 8, + /datum/material/gold = SHEET_MATERIAL_AMOUNT * 5, + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.25, + /datum/material/cardboard = SHEET_MATERIAL_AMOUNT, + /datum/material/glass = SMALL_MATERIAL_AMOUNT * 5.2) //Inferno and Cryo Pistols diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 2e29748ec0f..0968d648979 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -157,6 +157,12 @@ ammo_x_offset = 1 ammo_type = list(/obj/item/ammo_casing/energy/laser, /obj/item/ammo_casing/energy/disabler) selfcharge = 1 + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 6, + /datum/material/uranium = SHEET_MATERIAL_AMOUNT * 1.5, + /datum/material/glass = SHEET_MATERIAL_AMOUNT, + /datum/material/titanium = HALF_SHEET_MATERIAL_AMOUNT, + ) var/reactor_overloaded var/fail_tick = 0 var/fail_chance = 0 diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 0bb5b510dd6..7850955345b 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -235,6 +235,13 @@ inhand_icon_state = null ammo_type = list(/obj/item/ammo_casing/energy/xray) ammo_x_offset = 3 + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 3.5, + /datum/material/gold = SHEET_MATERIAL_AMOUNT * 2.5, + /datum/material/uranium = SHEET_MATERIAL_AMOUNT * 2, + /datum/material/titanium = SHEET_MATERIAL_AMOUNT, + /datum/material/bluespace = SHEET_MATERIAL_AMOUNT, + ) shaded_charge = FALSE light_color = LIGHT_COLOR_GREEN diff --git a/code/modules/projectiles/guns/energy/recharge.dm b/code/modules/projectiles/guns/energy/recharge.dm index 7ed3e9f9816..7c47e7b3b83 100644 --- a/code/modules/projectiles/guns/energy/recharge.dm +++ b/code/modules/projectiles/guns/energy/recharge.dm @@ -105,7 +105,12 @@ inhand_icon_state = "crossbow" no_charge_state = "crossbow_empty" w_class = WEIGHT_CLASS_SMALL - custom_materials = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT) + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT, + /datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT * 0.5, + /datum/material/uranium = HALF_SHEET_MATERIAL_AMOUNT * 0.5, + /datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT * 0.5, + ) suppressed = SUPPRESSED_QUIET ammo_type = list(/obj/item/ammo_casing/energy/bolt) recharge_time = 2 SECONDS @@ -130,7 +135,12 @@ base_icon_state = "crossbowlarge" no_charge_state = "crossbowlarge_empty" w_class = WEIGHT_CLASS_BULKY - custom_materials = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT*2) + custom_materials = list( + /datum/material/iron = SHEET_MATERIAL_AMOUNT * 3.5, + /datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT * 1.5, + /datum/material/uranium = HALF_SHEET_MATERIAL_AMOUNT * 1.5, + /datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT * 1.5, + ) suppressed = SUPPRESSED_NONE ammo_type = list(/obj/item/ammo_casing/energy/bolt/large) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index f53987ff253..a47d417bce2 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -9,6 +9,7 @@ obj_flags = CONDUCTS_ELECTRICITY slot_flags = ITEM_SLOT_BACK ammo_type = list(/obj/item/ammo_casing/energy/ion) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 3, /datum/material/uranium = SHEET_MATERIAL_AMOUNT) light_color = LIGHT_COLOR_BLUE /obj/item/gun/energy/ionrifle/Initialize(mapload) @@ -323,6 +324,7 @@ ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot) cell_type = /obj/item/stock_parts/power_store/cell/high pin = null + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3.5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT) /obj/item/gun/energy/temperature/security name = "security temperature gun" @@ -389,6 +391,7 @@ it is often confused with the mech weapon of the same name, since it is a bit mo weapon_weight = WEAPON_HEAVY w_class = WEIGHT_CLASS_BULKY ///if our stpck is extended and we are ready to fire. + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 5) var/ready_to_fire = FALSE /obj/item/gun/energy/tesla_cannon/Initialize(mapload) @@ -503,6 +506,7 @@ it is often confused with the mech weapon of the same name, since it is a bit mo light_system = OVERLAY_LIGHT light_power = 2 light_range = 1 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 7, /datum/material/gold = SHEET_MATERIAL_AMOUNT * 5) /obj/item/gun/energy/photon/Initialize(mapload) . = ..() diff --git a/code/modules/projectiles/guns/special/syringe_gun.dm b/code/modules/projectiles/guns/special/syringe_gun.dm index fda1bf7c57b..e17e9bb43ea 100644 --- a/code/modules/projectiles/guns/special/syringe_gun.dm +++ b/code/modules/projectiles/guns/special/syringe_gun.dm @@ -224,6 +224,7 @@ pixel_x = 0 force = 4 trigger_guard = TRIGGER_GUARD_ALLOW_ALL + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 10) /obj/item/gun/syringe/blowgun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0) . = ..() diff --git a/code/modules/reagents/chemistry/items.dm b/code/modules/reagents/chemistry/items.dm index 735fc037486..0500a0b3e4c 100644 --- a/code/modules/reagents/chemistry/items.dm +++ b/code/modules/reagents/chemistry/items.dm @@ -15,6 +15,7 @@ resistance_flags = FLAMMABLE w_class = WEIGHT_CLASS_TINY interaction_flags_mouse_drop = NEED_HANDS + custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) ///How many pages the booklet holds var/number_of_pages = 50 @@ -151,6 +152,7 @@ icon = 'icons/obj/medical/chemical.dmi' icon_state = "burner" grind_results = list(/datum/reagent/consumable/ethanol = 5, /datum/reagent/silicon = 10) + custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) item_flags = NOBLUDGEON resistance_flags = FLAMMABLE w_class = WEIGHT_CLASS_TINY @@ -295,6 +297,7 @@ item_flags = NOBLUDGEON w_class = WEIGHT_CLASS_TINY grind_results = list(/datum/reagent/mercury = 5) + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT) ///The reagents datum that this object is attached to, so we know where we are when it's added to something. var/datum/reagents/attached_to_reagents @@ -352,6 +355,7 @@ /obj/item/thermometer/pen color = "#888888" + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.1) #undef DETAILED_CHEM_OUTPUT #undef SHORTENED_CHEM_OUTPUT diff --git a/code/modules/reagents/chemistry/machinery/chem_separator.dm b/code/modules/reagents/chemistry/machinery/chem_separator.dm index f9b98f67ce0..c0611a7e0ec 100644 --- a/code/modules/reagents/chemistry/machinery/chem_separator.dm +++ b/code/modules/reagents/chemistry/machinery/chem_separator.dm @@ -7,6 +7,7 @@ icon = 'icons/obj/medical/chemical.dmi' icon_state = "separator" light_power = 1 + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 2, /datum/material/wood = SHEET_MATERIAL_AMOUNT, /datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) ///Is the mixture currently boiling var/boiling = FALSE diff --git a/code/modules/reagents/reagent_containers/cups/_cup.dm b/code/modules/reagents/reagent_containers/cups/_cup.dm index 85016f87aad..c2ac3844771 100644 --- a/code/modules/reagents/reagent_containers/cups/_cup.dm +++ b/code/modules/reagents/reagent_containers/cups/_cup.dm @@ -315,7 +315,7 @@ righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' fill_icon_state = "bucket" fill_icon_thresholds = list(50, 90) - custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 2) w_class = WEIGHT_CLASS_NORMAL amount_per_transfer_from_this = 20 possible_transfer_amounts = list(5,10,15,20,25,30,50,70) @@ -348,7 +348,7 @@ name = "wooden bucket" icon_state = "woodbucket" inhand_icon_state = "woodbucket" - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3) resistance_flags = FLAMMABLE armor_type = /datum/armor/bucket_wooden @@ -403,6 +403,7 @@ icon = 'icons/obj/medical/chemical.dmi' icon_state = "pestle" force = 7 + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT) /obj/item/reagent_containers/cup/mortar name = "mortar" @@ -412,7 +413,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50, 100) volume = 100 - custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3) resistance_flags = FLAMMABLE initial_reagent_flags = OPENCONTAINER var/obj/item/grinded diff --git a/code/modules/reagents/reagent_containers/cups/drinks.dm b/code/modules/reagents/reagent_containers/cups/drinks.dm index 989820216c6..9d51600ac5b 100644 --- a/code/modules/reagents/reagent_containers/cups/drinks.dm +++ b/code/modules/reagents/reagent_containers/cups/drinks.dm @@ -235,7 +235,7 @@ icon_state = "smallbottle" inhand_icon_state = null list_reagents = list(/datum/reagent/water = 49.5, /datum/reagent/fluorine = 0.5)//see desc, don't think about it too hard - custom_materials = list(/datum/material/plastic=HALF_SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT) volume = 50 amount_per_transfer_from_this = 10 fill_icon_thresholds = list(0, 10, 25, 50, 75, 80, 90) @@ -320,7 +320,7 @@ /obj/item/reagent_containers/cup/glass/waterbottle/large desc = "A fresh commercial-sized bottle of water." icon_state = "largebottle" - custom_materials = list(/datum/material/plastic=SHEET_MATERIAL_AMOUNT * 1.5) + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 3) list_reagents = list(/datum/reagent/water = 100) volume = 100 amount_per_transfer_from_this = 10 @@ -353,6 +353,7 @@ possible_transfer_amounts = list(10) volume = 10 isGlass = FALSE + custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT) /obj/item/reagent_containers/cup/glass/sillycup/update_icon_state() icon_state = reagents.total_volume ? "water_cup" : "water_cup_e" @@ -365,6 +366,7 @@ icon_state = "juicebox" volume = 15 drink_type = NONE + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT) /obj/item/reagent_containers/cup/glass/bottle/juice/smallcarton/Initialize(mapload, vol) . = ..() @@ -390,7 +392,7 @@ icon = 'icons/obj/drinks/colo.dmi' icon_state = "colocup" inhand_icon_state = "colocup" - custom_materials = list(/datum/material/plastic =HALF_SHEET_MATERIAL_AMOUNT) + custom_materials = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT) possible_transfer_amounts = list(5, 10, 15, 20) volume = 20 amount_per_transfer_from_this = 5 diff --git a/code/modules/reagents/reagent_containers/cups/glassbottle.dm b/code/modules/reagents/reagent_containers/cups/glassbottle.dm index bcd1d91c2eb..7ee6ffbb2f9 100644 --- a/code/modules/reagents/reagent_containers/cups/glassbottle.dm +++ b/code/modules/reagents/reagent_containers/cups/glassbottle.dm @@ -1022,6 +1022,7 @@ righthand_file = 'icons/mob/inhands/items/drinks_righthand.dmi' isGlass = FALSE age_restricted = FALSE + custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 1.5) /obj/item/reagent_containers/cup/glass/bottle/juice/orangejuice name = "orange juice" diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 05ab3ac88e2..6702fcf4fe6 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -10,6 +10,7 @@ volume = 5 initial_reagent_flags = TRANSPARENT custom_price = PAYCHECK_CREW + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT) /obj/item/reagent_containers/dropper/interact_with_atom(atom/target, mob/living/user, list/modifiers) if(!target.reagents) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 94a0d39b2ff..e32b60e9a2b 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -352,6 +352,7 @@ dart_insert_casing_icon_state = "overlay_syringe_crude" dart_insert_projectile_icon_state = "overlay_syringe_crude_proj" embed_type = /datum/embedding/syringe/crude + custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 5) /datum/embedding/syringe/crude embed_chance = 75 diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 68e54510893..9043c254d62 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -364,6 +364,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/reagent_dispensers/wall/peppertank, 3 tank_volume = 200 can_be_tanked = FALSE max_integrity = 150 + custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 25) ///Paper cups left from the cooler. var/paper_cups = 25 ///Reference to our jug. diff --git a/code/modules/research/xenobiology/vatgrowing/microscope.dm b/code/modules/research/xenobiology/vatgrowing/microscope.dm index d96f577db66..9eb78f17a5a 100644 --- a/code/modules/research/xenobiology/vatgrowing/microscope.dm +++ b/code/modules/research/xenobiology/vatgrowing/microscope.dm @@ -3,6 +3,7 @@ desc = "A simple microscope, allowing you to examine micro-organisms." icon = 'icons/obj/science/vatgrowing.dmi' icon_state = "microscope" + custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT) ///Analyzed dish var/obj/item/petri_dish/current_dish diff --git a/code/modules/shuttle/mobile_port/variants/custom/blueprints.dm b/code/modules/shuttle/mobile_port/variants/custom/blueprints.dm index db7d3aa1ecc..c37cb6cef7d 100644 --- a/code/modules/shuttle/mobile_port/variants/custom/blueprints.dm +++ b/code/modules/shuttle/mobile_port/variants/custom/blueprints.dm @@ -700,6 +700,7 @@ base_icon_state = "shuttle_blueprints_crude" base_desc = "This is just a sheet of paper thoroughly covered in what could either be crayon or spraypaint." linked_desc = "This is just a crude doodle of a shuttle drawn on a background of what could either be crayon or spraypaint." + custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2) /obj/item/shuttle_blueprints/borg name = "shuttle blueprint database" diff --git a/code/modules/surgery/bodyparts/ghetto_parts.dm b/code/modules/surgery/bodyparts/ghetto_parts.dm index 4835bba0300..5e8858c68c2 100644 --- a/code/modules/surgery/bodyparts/ghetto_parts.dm +++ b/code/modules/surgery/bodyparts/ghetto_parts.dm @@ -17,6 +17,7 @@ disabling_threshold_percentage = 1 bodypart_flags = BODYPART_UNHUSKABLE biological_state = (BIO_WOOD|BIO_JOINTED) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) /obj/item/bodypart/arm/left/ghetto/Initialize(mapload, ...) . = ..() @@ -41,6 +42,7 @@ disabling_threshold_percentage = 1 bodypart_flags = BODYPART_UNHUSKABLE biological_state = (BIO_WOOD|BIO_JOINTED) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) /obj/item/bodypart/arm/right/ghetto/Initialize(mapload, ...) . = ..() @@ -63,6 +65,7 @@ disabling_threshold_percentage = 1 bodypart_flags = BODYPART_UNHUSKABLE biological_state = (BIO_WOOD|BIO_JOINTED) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) /obj/item/bodypart/leg/left/ghetto/Initialize(mapload, ...) . = ..() @@ -85,6 +88,7 @@ disabling_threshold_percentage = 1 bodypart_flags = BODYPART_UNHUSKABLE biological_state = (BIO_WOOD|BIO_JOINTED) + custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2) /obj/item/bodypart/leg/right/ghetto/Initialize(mapload, ...) . = ..() diff --git a/code/modules/surgery/organs/internal/eyes/_eyes.dm b/code/modules/surgery/organs/internal/eyes/_eyes.dm index 5e0761cb0ce..73367aa6978 100644 --- a/code/modules/surgery/organs/internal/eyes/_eyes.dm +++ b/code/modules/surgery/organs/internal/eyes/_eyes.dm @@ -732,6 +732,7 @@ iris_overlay = null flash_protect = FLASH_PROTECTION_WELDER tint = INFINITY + custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 2.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.9) var/obj/item/flashlight/eyelight/eye light_reactive = FALSE pupils_name = "flashlights" diff --git a/code/modules/transport/tram/tram_controller.dm b/code/modules/transport/tram/tram_controller.dm index db5e44d49e9..594c2f443fe 100644 --- a/code/modules/transport/tram/tram_controller.dm +++ b/code/modules/transport/tram/tram_controller.dm @@ -1195,7 +1195,7 @@ desc = "A box that contains the equipment to control a tram. Just secure to the tram wall." icon = 'icons/obj/tram/tram_controllers.dmi' icon_state = "tram-controller" - custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 4, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 20) result_path = /obj/machinery/transport/tram_controller pixel_shift = 32 diff --git a/code/modules/transport/tram/tram_displays.dm b/code/modules/transport/tram/tram_displays.dm index 81b73398a15..4e850abb2a8 100644 --- a/code/modules/transport/tram/tram_displays.dm +++ b/code/modules/transport/tram/tram_displays.dm @@ -39,7 +39,7 @@ desc = "Used to build tram indicator displays, just secure to the wall." icon_state = "indi_blank" icon = 'icons/obj/tram/tram_indicator.dmi' - custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 4, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 2) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7) result_path = /obj/machinery/transport/destination_sign/indicator pixel_shift = 32 diff --git a/code/modules/transport/tram/tram_floors.dm b/code/modules/transport/tram/tram_floors.dm index 623b13896f7..eb13a36e414 100644 --- a/code/modules/transport/tram/tram_floors.dm +++ b/code/modules/transport/tram/tram_floors.dm @@ -186,6 +186,7 @@ plane = GAME_PLANE obj_flags = BLOCK_Z_OUT_DOWN | BLOCK_Z_OUT_UP appearance_flags = PIXEL_SCALE|KEEP_TOGETHER + custom_materials = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT / 2) var/secured = TRUE var/floor_tile = /obj/item/stack/thermoplastic var/mutable_appearance/damage_overlay @@ -294,6 +295,7 @@ max_amount = 60 novariants = TRUE merge_type = /obj/item/stack/thermoplastic + mats_per_unit = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT / 2) var/tile_type = /obj/structure/thermoplastic /obj/item/stack/thermoplastic/light diff --git a/code/modules/unit_tests/crafting.dm b/code/modules/unit_tests/crafting.dm index ed4ee4f631c..1d4b8bf25b7 100644 --- a/code/modules/unit_tests/crafting.dm +++ b/code/modules/unit_tests/crafting.dm @@ -1,34 +1,37 @@ /** * Check if a generic atom (because both mobs and the crafter machinery can do it) can potentially craft all recipes, - * with the exact same types required in the recipe, and also compare the materials of crafted result with one of the same type - * to ansure they match if the recipe has the CRAFT_ENFORCE_MATERIALS_PARITY flag. + * with the exact same types required in the recipe. + * Then, unless the recipe has the CRAFT_SKIP_MATERIALS_PARITY flag, compare the materials of the + * crafted result with a spawned instance of the same type to ensure that they match. */ /datum/unit_test/crafting + //The object responsible for using the crafting component + var/atom/movable/crafter + //The reagent holder responsible for holding reagents that may be used in a recipe. + var/obj/item/reagent_containers/cup/bottomless_cup + ///The tools that have been spawned so far, to be reused in other recipes as well. + var/list/tools = list() /datum/unit_test/crafting/Run() - var/atom/movable/crafter = allocate(__IMPLIED_TYPE__) + crafter = allocate(__IMPLIED_TYPE__) - ///Clear the area around our crafting movable of objects that may mess with the unit test - for(var/atom/movable/trash in (range(1, crafter) - crafter)) - qdel(trash) + clear_trash() var/turf/turf = crafter.loc var/old_turf_type = turf.type var/datum/component/personal_crafting/unit_test/craft_comp = crafter.AddComponent(__IMPLIED_TYPE__) - var/obj/item/reagent_containers/cup/bottomless_cup = allocate_bottomless_cup() - - var/list/tools = list() + bottomless_cup = allocate_bottomless_cup() var/list/all_recipes = GLOB.crafting_recipes + GLOB.cooking_recipes for(var/datum/crafting_recipe/recipe as anything in all_recipes) if(recipe.non_craftable) continue //split into a different proc, so if something fails it's both easier to track and doesn't halt the loop. - process_recipe(crafter, craft_comp, recipe, bottomless_cup, tools) + process_recipe(craft_comp, recipe) if(QDELETED(bottomless_cup) || bottomless_cup.loc != turf) //The cup itself was used in a recipe, rather than its contents. bottomless_cup = allocate_bottomless_cup() - // We have one or two recipes that generate turf (from stacks, like snow walls), which shouldn't be carried between tests + // We have one or two recipes that generate turfs (from stacks, like snow walls), which shouldn't be carried between tests if(turf.type != old_turf_type) turf.ChangeTurf(old_turf_type) @@ -39,16 +42,8 @@ bottomless_cup.reagents.maximum_volume = INFINITY return bottomless_cup -/datum/unit_test/crafting/proc/process_recipe( - atom/crafter, - datum/component/personal_crafting/unit_test/craft_comp, - datum/crafting_recipe/recipe, - obj/item/reagent_containers/bottomless_cup, - list/tools -) +/datum/unit_test/crafting/proc/process_recipe(datum/component/personal_crafting/unit_test/craft_comp, datum/crafting_recipe/recipe) var/turf/turf = crafter.loc - //Components that have to be deleted later so they don't mess up with other recipes - var/list/spawned_components = list() //Warn if uncreatables were found in the recipe if it fails //If it doesn't fail, then it was already handled, maybe through `unit_test_spawn_extras` var/list/uncreatables_found @@ -56,10 +51,10 @@ for(var/spawn_path in recipe.unit_test_spawn_extras) var/amount = recipe.unit_test_spawn_extras[spawn_path] if(ispath(spawn_path, /obj/item/stack)) - spawned_components += new spawn_path(turf, /*new_amount =*/ amount, /*merge =*/ FALSE) + new spawn_path(turf, /*new_amount =*/ amount, /*merge =*/ FALSE) continue for(var/index in 1 to amount) - spawned_components += new spawn_path(turf) + new spawn_path(turf) for(var/req_path in recipe.reqs) //spawn items and reagents var/amount = recipe.reqs[req_path] @@ -74,12 +69,12 @@ continue if(ispath(req_path, /obj/item/stack)) //it's a stack - spawned_components += new req_path(turf, /*new_amount =*/ amount, /*merge =*/ FALSE) + new req_path(turf, /*new_amount =*/ amount, /*merge =*/ FALSE) continue //it's any other item for(var/iteration in 1 to amount) - spawned_components += new req_path(turf) + new req_path(turf) for(var/req_path in recipe.chem_catalysts) // spawn catalysts var/amount = recipe.chem_catalysts[req_path] @@ -93,7 +88,7 @@ if(req_path in uncreatables) LAZYADD(uncreatables_found, req_path) continue - spawned_components += new req_path(turf) + new req_path(turf) var/list/needed_tools = list() needed_tools += recipe.tool_behaviors + recipe.tool_paths //either tool_behaviors and tool_paths could be null @@ -124,48 +119,63 @@ if(istext(result) || isnull(result)) //construct_item() returned a text string telling us why it failed. TEST_FAIL("[recipe.type] couldn't be crafted during unit test[result || ", result is null for some reason!"]") if(uncreatables_found) - TEST_FAIL("The following objects that shouldn't initialize during unit tests were found in [recipe]: [english_list(uncreatables_found)]") - delete_components(spawned_components) + TEST_FAIL("The following objects that shouldn't be instantiated during unit tests were found in [recipe]: [english_list(uncreatables_found)]") + clear_trash() return - //enforcing materials parity between crafted and spawned for turfs would be more trouble than worth right now - if(isturf(result)) - delete_components(spawned_components) + //enforcing materials parity between crafted and spawned for turfs would be more trouble than worth here + if((recipe.crafting_flags & (CRAFT_NO_MATERIALS|CRAFT_SKIP_MATERIALS_PARITY)) || isturf(result)) + clear_trash() return - spawned_components += result + var/atom/copycat + if(isstack(result)) + var/obj/item/stack/stack_result = result + copycat = new result.type(turf, /*new_amount =*/ stack_result.amount, /*merge =*/ FALSE) + else + copycat = new result.type(turf) - if(!(recipe.crafting_flags & CRAFT_ENFORCE_MATERIALS_PARITY)) - delete_components(spawned_components) - return - - var/atom/copycat = new result.type(turf) - spawned_components += copycat - - // SSmaterials caches the combinations so we don't have to run more complex checks - if(result.custom_materials == copycat.custom_materials) - delete_components(spawned_components) - return if(!result.compare_materials(copycat)) - var/warning = "custom_materials of [result.type] when crafted compared to just spawned don't match" - var/what_it_should_be = result.get_materials_english_list() + var/mats_varname = NAMEOF(result, custom_materials) + + var/warning = "[mats_varname] of [result.type] when crafted compared to only spawned don't match" + + ///Added right between the first half of the warning and the second half. + var/other_info = "" + + var/target_var = mats_varname + var/list/result_mats = result.custom_materials + var/list/copycat_mats = copycat.custom_materials + if(isstack(result)) + var/obj/item/stack/stack_result = result + var/obj/item/stack/stack_copy = copycat + target_var = NAMEOF(stack_result, mats_per_unit) + result_mats = stack_result.mats_per_unit + copycat_mats = stack_copy.mats_per_unit + other_info = " (size of resulting stack: [stack_result.amount])" + var/what_it_should_be = result.transcribe_materials_list(result_mats) + var/what_it_is = copycat.transcribe_materials_list(copycat_mats) //compose a text string containing the syntax and paths to use for editing the custom_materials var if(result.custom_materials) - what_it_should_be += " (you can round values a bit)" - TEST_FAIL("[warning]. custom_materials should be [what_it_should_be]. \ - Otherwise set the requirements_mats_blacklist variable for [recipe] \ - or remove the CRAFT_ENFORCE_MATERIALS_PARITY crafting flag from it") + what_it_should_be += " (you can round a bit for values above 100)" - delete_components(spawned_components) + ///This tells you about other ways to deal with the issue, if you can't just change the materials of the object. For example, if there are two different recipes for it. + var/add_info = "" -/** - * Clear the area of the components that have been spawned as either the requirements of a recipe or its result - * so they don't mess up with recipes that come after it. - */ -/datum/unit_test/crafting/proc/delete_components(list/comps) - for(var/atom/movable/used as anything in comps) - if(!QDELETED(used)) - qdel(used) + if(istype(recipe, /datum/crafting_recipe/stack)) + add_info = "add the CRAFT_SKIP_MATERIALS_PARITY crafting flag to its stack_recipe datum" + else + add_info = "set the [NAMEOF(recipe, requirements_mats_blacklist)] or [NAMEOF(recipe, removed_mats)] var of [recipe.type], or add the CRAFT_SKIP_MATERIALS_PARITY crafting flag to it" + + TEST_FAIL("[warning]. [target_var] should be [what_it_should_be] (current value: [what_it_is])[other_info]. \ + Fix that. Otherwise, [add_info]") + + clear_trash() + +///Clear the area around our crafting movable of objects that may mess with the unit test +/datum/unit_test/crafting/proc/clear_trash() + for(var/atom/movable/trash in (range(1, crafter) - list(crafter, bottomless_cup))) + qdel(trash) /datum/component/personal_crafting/unit_test ignored_flags = CRAFT_MUST_BE_LEARNED|CRAFT_ONE_PER_TURF|CRAFT_CHECK_DIRECTION|CRAFT_CHECK_DENSITY|CRAFT_ON_SOLID_GROUND|CRAFT_IGNORE_DO_AFTER diff --git a/code/modules/vehicles/cars/vim.dm b/code/modules/vehicles/cars/vim.dm index 7ae87590d0e..9bfa5c323ab 100644 --- a/code/modules/vehicles/cars/vim.dm +++ b/code/modules/vehicles/cars/vim.dm @@ -19,6 +19,7 @@ light_on = FALSE engine_sound = 'sound/effects/servostep.ogg' interaction_flags_mouse_drop = NONE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.55, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7) ///Maximum size of a mob trying to enter the mech var/maximum_mob_size = MOB_SIZE_SMALL COOLDOWN_DECLARE(sound_cooldown) diff --git a/code/modules/vehicles/lavaboat.dm b/code/modules/vehicles/lavaboat.dm index 3a8d86879bc..f1a6333c8d5 100644 --- a/code/modules/vehicles/lavaboat.dm +++ b/code/modules/vehicles/lavaboat.dm @@ -28,6 +28,7 @@ force = 12 w_class = WEIGHT_CLASS_NORMAL resistance_flags = LAVA_PROOF | FIRE_PROOF + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2) /datum/crafting_recipe/oar name = "Goliath Bone Oar" diff --git a/code/modules/vehicles/motorized_wheelchair.dm b/code/modules/vehicles/motorized_wheelchair.dm index ac8afa1a79a..3e85b2263ca 100644 --- a/code/modules/vehicles/motorized_wheelchair.dm +++ b/code/modules/vehicles/motorized_wheelchair.dm @@ -6,6 +6,7 @@ foldabletype = null max_integrity = 150 ttv_icon = "motor_chair_ttv" + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 14.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT) ///How "fast" the wheelchair goes only affects ramming var/speed = 2 ///Self explanatory, ratio of how much power we use diff --git a/code/modules/vehicles/scooter.dm b/code/modules/vehicles/scooter.dm index 9c15c7382dc..d3f1ff5ba10 100644 --- a/code/modules/vehicles/scooter.dm +++ b/code/modules/vehicles/scooter.dm @@ -3,6 +3,7 @@ desc = "A fun way to get around." icon_state = "scooter" are_legs_exposed = TRUE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 11) /obj/vehicle/ridden/scooter/Initialize(mapload) . = ..() @@ -39,6 +40,7 @@ desc = "An old, battered skateboard. It's still rideable, but probably unsafe." icon_state = "skateboard" density = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10) ///Sparks datum for when we grind on tables var/datum/effect_system/spark_spread/sparks ///Whether the board is currently grinding @@ -240,6 +242,7 @@ icon = 'icons/mob/rideables/vehicles.dmi' icon_state = "scooter_frame" w_class = WEIGHT_CLASS_NORMAL + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) /obj/item/scooter_frame/attackby(obj/item/I, mob/user, list/modifiers, list/attack_modifiers) if(!istype(I, /obj/item/stack/sheet/iron)) diff --git a/code/modules/vehicles/vehicle_key.dm b/code/modules/vehicles/vehicle_key.dm index 69097acc256..4f9085a2cb8 100644 --- a/code/modules/vehicles/vehicle_key.dm +++ b/code/modules/vehicles/vehicle_key.dm @@ -93,3 +93,4 @@ attack_verb_simple = list("flog", "whip", "lash", "discipline") hitsound = 'sound/items/weapons/whip.ogg' slot_flags = ITEM_SLOT_BELT + custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT) diff --git a/code/modules/vehicles/wheelchair.dm b/code/modules/vehicles/wheelchair.dm index 423baf8627a..3495d95a87a 100644 --- a/code/modules/vehicles/wheelchair.dm +++ b/code/modules/vehicles/wheelchair.dm @@ -8,6 +8,7 @@ armor_type = /datum/armor/ridden_wheelchair density = FALSE interaction_flags_mouse_drop = ALLOW_RESTING + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) /// Run speed delay is multiplied with this for vehicle move delay. var/delay_multiplier = 6.7 @@ -154,7 +155,7 @@ overlay_icon = "gold_wheelchair_overlay" max_integrity = 200 armor_type = /datum/armor/wheelchair_gold - custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT*5) + custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 5) foldabletype = /obj/item/wheelchair/gold /// Handheld wheelchair item @@ -168,7 +169,7 @@ righthand_file = 'icons/mob/inhands/items_righthand.dmi' w_class = WEIGHT_CLASS_NORMAL force = 8 //Force is same as a chair - custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT*5) + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5) /// The wheelchair vehicle type we create when we unfold this chair var/unfolded_type = /obj/vehicle/ridden/wheelchair @@ -197,7 +198,7 @@ lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' righthand_file = 'icons/mob/inhands/items_righthand.dmi' force = 10 - custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT*5) + custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 5) unfolded_type = /obj/vehicle/ridden/wheelchair/gold /datum/armor/wheelchair_gold diff --git a/tgstation.dme b/tgstation.dme index e14e3913392..2af372c8a77 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2567,7 +2567,7 @@ #include "code\game\objects\items\pinpointer.dm" #include "code\game\objects\items\pitchfork.dm" #include "code\game\objects\items\plushes.dm" -#include "code\game\objects\items\pneumaticCannon.dm" +#include "code\game\objects\items\pneumatic_cannon.dm" #include "code\game\objects\items\powerfist.dm" #include "code\game\objects\items\puzzle_pieces.dm" #include "code\game\objects\items\reflex_hammer.dm"