Skip to main content

Crate openstranded_common_crafting

Crate openstranded_common_crafting 

Source
Expand description

§openstranded-common-crafting

Shared data types for the OpenStranded crafting system.

This crate defines the canonical structures that represent crafting recipes, their requirements, and their results. Used by both the engine (Bevy ECS resources) and WASM game plugins (parsing .ron registry data, defining service contracts).

§Types

TypePurpose
RecipeDefA single crafting recipe (combi block)
RecipeRequirementAn ingredient with optional stay flag
RecipeResultA generated item

§Relationship to .inf files

In the original game, each combi=startcombi=end block inside a combinations*.inf file corresponds to one RecipeDef. Each req=N[,count[,stay]] line inside becomes a RecipeRequirement, and each gen=N[,count] line becomes a RecipeResult.

§Dependency

Only serde — this is a pure data crate with no engine or plugin API dependencies.

Structs§

RecipeDef
A single crafting recipe definition.
RecipeRequirement
A single ingredient required by a crafting recipe.
RecipeResult
An item produced by a crafting recipe.