mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
0b0c5ea91e
## 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. /🆑
84 lines
3.5 KiB
Plaintext
84 lines
3.5 KiB
Plaintext
///If the machine is used/deleted in the crafting process
|
|
#define CRAFTING_MACHINERY_CONSUME 1
|
|
///If the structure is used/deleted in the crafting process
|
|
#define CRAFTING_STRUCTURE_CONSUME 1
|
|
///If the machine is only "used" i.e. it checks to see if it's nearby and allows crafting, but doesn't delete it
|
|
#define CRAFTING_MACHINERY_USE 0
|
|
///If the structure is only "used" i.e. it checks to see if it's nearby and allows crafting, but doesn't delete it
|
|
#define CRAFTING_STRUCTURE_USE 0
|
|
|
|
//stack recipe placement check types
|
|
/// Checks if there is an object of the result type in any of the cardinal directions
|
|
#define STACK_CHECK_CARDINALS (1<<0)
|
|
/// Checks if there is an object of the result type within one tile
|
|
#define STACK_CHECK_ADJACENT (1<<1)
|
|
|
|
//---- Defines for var/crafting_flags
|
|
///If this craft must be learned before it becomes available
|
|
#define CRAFT_MUST_BE_LEARNED (1<<0)
|
|
///Should only one object exist on the same turf?
|
|
#define CRAFT_ONE_PER_TURF (1<<1)
|
|
/// Setting this to true will effectively set check_direction to true.
|
|
#define CRAFT_IS_FULLTILE (1<<2)
|
|
/// If this craft should run the direction check, for use when building things like directional windows where you can have more than one per turf
|
|
#define CRAFT_CHECK_DIRECTION (1<<3)
|
|
/// If the craft requires a floor below
|
|
#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)
|
|
/// Crafting passes reagents of components to the finished product
|
|
#define CRAFT_TRANSFERS_REAGENTS (1<<6)
|
|
/// Crafting clears all reagents present in the finished product
|
|
#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<<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
|
|
#define CAT_FOOD "Foods"
|
|
#define CAT_BREAD "Breads"
|
|
#define CAT_BURGER "Burgers"
|
|
#define CAT_CAKE "Cakes"
|
|
#define CAT_EGG "Egg-Based Food"
|
|
#define CAT_LIZARD "Lizard Food"
|
|
#define CAT_MEAT "Meats"
|
|
#define CAT_SEAFOOD "Seafood"
|
|
#define CAT_MARTIAN "Martian Food"
|
|
#define CAT_MISCFOOD "Misc. Food"
|
|
#define CAT_MEXICAN "Mexican Food"
|
|
#define CAT_MOTH "Mothic Food"
|
|
#define CAT_PASTRY "Pastries"
|
|
#define CAT_PIE "Pies"
|
|
#define CAT_PIZZA "Pizzas"
|
|
#define CAT_SALAD "Salads"
|
|
#define CAT_SANDWICH "Sandwiches"
|
|
#define CAT_SOUP "Soups"
|
|
#define CAT_SPAGHETTI "Spaghettis"
|
|
#define CAT_ICE "Frozen"
|
|
#define CAT_DRINK "Drinks"
|
|
|
|
//crafting defines
|
|
//When adding new defines, please make sure to also add them to the encompassing list
|
|
#define CAT_WEAPON_RANGED "Weapons Ranged"
|
|
#define CAT_WEAPON_MELEE "Weapons Melee"
|
|
#define CAT_WEAPON_AMMO "Weapon Ammo"
|
|
#define CAT_ROBOT "Robotics"
|
|
#define CAT_MISC "Misc"
|
|
#define CAT_CLOTHING "Clothing"
|
|
#define CAT_CHEMISTRY "Chemistry"
|
|
#define CAT_ATMOSPHERIC "Atmospherics"
|
|
#define CAT_STRUCTURE "Structures"
|
|
#define CAT_TILES "Tiles"
|
|
#define CAT_WINDOWS "Windows"
|
|
#define CAT_DOORS "Doors"
|
|
#define CAT_FURNITURE "Furniture"
|
|
#define CAT_EQUIPMENT "Equipment"
|
|
#define CAT_CONTAINERS "Containers"
|
|
#define CAT_ENTERTAINMENT "Entertainment"
|
|
#define CAT_TOOLS "Tools"
|
|
#define CAT_CULT "Blood Cult"
|