Files
Ghom 0b0c5ea91e 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

🆑
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.
/🆑
2025-12-02 18:29:01 -05:00

258 lines
6.9 KiB
Plaintext

/datum/crafting_recipe/stunprod
name = "Stunprod"
result = /obj/item/melee/baton/security/cattleprod
reqs = list(
/obj/item/restraints/handcuffs/cable = 1,
/obj/item/stack/rods = 1,
/obj/item/assembly/igniter = 1,
)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/teleprod
name = "Teleprod"
result = /obj/item/melee/baton/security/cattleprod/teleprod
reqs = list(
/obj/item/restraints/handcuffs/cable = 1,
/obj/item/stack/rods = 1,
/obj/item/assembly/igniter = 1,
/obj/item/stack/ore/bluespace_crystal = 1,
)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/telecrystalprod
name = "Snatcherprod"
result = /obj/item/melee/baton/security/cattleprod/telecrystalprod
reqs = list(
/obj/item/restraints/handcuffs/cable = 1,
/obj/item/stack/rods = 1,
/obj/item/assembly/igniter = 1,
/obj/item/stack/telecrystal = 1,
)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/stunsword
name = "\improper NT-20 'Excalibur' Stunsword"
result = /obj/item/melee/baton/security/stunsword
reqs = list(
/obj/item/claymore = 1,
/obj/item/melee/baton/security = 1
)
blacklist = list(
/obj/item/claymore/cutlass,
/obj/item/claymore/cutlass/old,
/obj/item/claymore/carrot,
/obj/item/claymore/shortsword,
/obj/item/claymore/highlander,
/obj/item/claymore/weak,
/obj/item/claymore/weak/ceremonial,
/obj/item/claymore/highlander/robot
)
tool_behaviors = list(TOOL_WELDER)
time = 10 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/stunswordalt
name = "\improper NT-20 'Excalibur' Stunsword"
result = /obj/item/melee/baton/security/stunsword
reqs = list(
/obj/item/katana = 1,
/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
/datum/crafting_recipe/stunswordalt2
name = "\improper NT-20 'Excalibur' Stunsword"
result = /obj/item/melee/baton/security/stunsword
reqs = list(
/obj/item/melee/sabre = 1,
/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
/datum/crafting_recipe/tailclub
name = "Tail Club"
result = /obj/item/tailclub
reqs = list(
/obj/item/organ/tail/lizard = 1,
/obj/item/stack/sheet/iron = 1,
)
blacklist = list(/obj/item/organ/tail/lizard/fake)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/balloon_mallet
name = "Balloon Mallet"
result = /obj/item/balloon_mallet
reqs = list(
/obj/item/toy/balloon/long = 18,
)
time = 10 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/balloon_mallet/check_requirements(mob/user, list/collected_requirements)
return HAS_TRAIT(user, TRAIT_BALLOON_SUTRA)
/datum/crafting_recipe/tailwhip
name = "Liz O' Nine Tails"
result = /obj/item/melee/chainofcommand/tailwhip
reqs = list(
/obj/item/organ/tail/lizard = 1,
/obj/item/stack/cable_coil = 1,
)
blacklist = list(/obj/item/organ/tail/lizard/fake)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/catwhip
name = "Cat O' Nine Tails"
result = /obj/item/melee/chainofcommand/tailwhip/kitty
reqs = list(
/obj/item/organ/tail/cat = 1,
/obj/item/stack/cable_coil = 1,
)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/chainsaw
name = "Chainsaw"
result = /obj/item/chainsaw
reqs = list(
/obj/item/circular_saw = 1,
/obj/item/stack/cable_coil = 3,
/obj/item/stack/sheet/plasteel = 5,
)
tool_behaviors = list(TOOL_WELDER)
time = 5 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/spear
name = "Spear"
result = /obj/item/spear
reqs = list(
/obj/item/restraints/handcuffs/cable = 1,
/obj/item/shard = 1,
/obj/item/stack/rods = 1,
)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/toysword
name = "Toy Sword"
reqs = list(
/obj/item/light/bulb = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/plastic = 4,
)
result = /obj/item/toy/sword
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/bonedagger
name = "Bone Dagger"
result = /obj/item/knife/combat/bone
time = 2 SECONDS
reqs = list(/obj/item/stack/sheet/bone = 2)
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/bonespear
name = "Bone Spear"
result = /obj/item/spear/bonespear
time = 3 SECONDS
reqs = list(
/obj/item/stack/sheet/bone = 4,
/obj/item/stack/sheet/sinew = 1,
)
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/boneaxe
name = "Bone Axe"
result = /obj/item/fireaxe/boneaxe
time = 5 SECONDS
reqs = list(
/obj/item/stack/sheet/bone = 6,
/obj/item/stack/sheet/sinew = 3,
)
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/house_edge
name = "House Edge"
result = /obj/item/house_edge
tool_behaviors = list(TOOL_WRENCH, TOOL_SCREWDRIVER, TOOL_WELDER)
reqs = list(
/obj/item/v8_engine = 1,
/obj/item/weaponcrafting/receiver = 1,
/obj/item/assembly/igniter = 1,
/obj/item/stack/sheet/iron = 2,
/obj/item/knife = 1,
/obj/item/weldingtool = 1,
/obj/item/roulette_wheel_beacon = 1,
)
time = 10 SECONDS
category = CAT_WEAPON_MELEE
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
/datum/crafting_recipe/giant_wrench
name = "Big Slappy"
result = /obj/item/shovel/giant_wrench
tool_behaviors = list(TOOL_CROWBAR, TOOL_SCREWDRIVER, TOOL_WELDER)
reqs = list(
/obj/item/wrench = 4,
/obj/item/weaponcrafting/giant_wrench = 1,
/obj/item/stack/sheet/plasteel = 5,
/obj/item/stack/rods = 10,
/obj/item/pickaxe/drill = 1,
)
time = 10 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/singulo_hammer
name = "Singularity Hammer"
result = /obj/item/singularityhammer
reqs = list(
/obj/item/assembly/signaler/anomaly/pyro = 1,
/obj/item/assembly/signaler/anomaly/grav = 1,
/obj/item/assembly/signaler/anomaly/flux = 1,
/obj/item/assembly/signaler/anomaly/bluespace = 1,
/obj/item/assembly/signaler/anomaly/vortex = 1,
/obj/item/assembly/signaler/anomaly/bioscrambler = 1,
/obj/item/assembly/signaler/anomaly/hallucination = 1,
/obj/item/assembly/signaler/anomaly/dimensional = 1,
/obj/item/assembly/signaler/anomaly/ectoplasm = 1,
)
machinery = list(
/obj/machinery/power/supermatter_crystal = CRAFTING_MACHINERY_CONSUME,
)
time = 10 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/bambostaff
name = "Bamboo Bo Staff"
result = /obj/item/bambostaff
reqs = list(
/obj/item/stack/sheet/mineral/bamboo = 4,
/obj/item/grown/log/steel = 2,
)
time = 8 SECONDS
category = CAT_WEAPON_MELEE
/datum/crafting_recipe/sm_sword
name = "Supermatter Sword"
result = /obj/item/melee/supermatter_sword
reqs = list(
/obj/item/assembly/signaler/anomaly/vortex = (MAX_CORES_VORTEX - 1),
)
machinery = list(
/obj/machinery/power/supermatter_crystal/small = CRAFTING_MACHINERY_CONSUME,
)
time = 120 SECONDS
category = CAT_WEAPON_MELEE