Expand description
§openstranded-common
Meta-crate for all openstranded-common-* data types.
Re-exports every public type from every openstranded-common-{domain}
crate, so that consumers can add a single dependency and get everything.
§Usage
[dependencies]
openstranded-common = "0.1"ⓘ
use openstranded_common::*;
let item = ItemDef::from_inf_fields(&fields);
let recipe = RecipeDef::from_combi_fields(1, &combi_fields);
let building = BuildingDef::from_inf_fields(&fields);
let survival = SurvivalParams::from_inf_fields(&fields);
let object = ObjectDef::from_inf_fields(&fields);
let unit = UnitDef::from_inf_fields(&fields);§Included domains
| Module | Primary types |
|---|---|
openstranded_common_items | ItemDef, ItemStack, ItemGroup, Material |
openstranded_common_crafting | RecipeDef, RecipeRequirement, RecipeResult |
openstranded_common_building | BuildingDef, BuildingGroup, BuildSpace, BuildingRequirement |
openstranded_common_survival | SurvivalParams, HealthSystem, ExhaustRate, DiveParams, JumpParams |
openstranded_common_objects | ObjectDef, CollisionMode, SpawnDef, HarvestDef, ObjectScale |
openstranded_common_units | UnitDef, AnimFrame, LootEntry, VehicleParams, UnitAnimations |
§Dependency
Only serde (transitively). This is a pure data crate set with no
engine or WASM runtime dependencies.
Structs§
- Anim
Frame - A single animation frame range.
- Building
Def - A single building recipe definition.
- Building
Requirement - A single material requirement for a building recipe.
- Dive
Params - Underwater / diving parameters.
- Exhaust
Params - Exhaustion rates for all player actions.
- Exhaust
Rate - A triple rate affecting health, hunger, and thirst respectively.
- Harvest
Def - Item-harvest / search configuration.
- ItemDef
- Full definition of a single item type.
- Item
Stack - A stack of identical items in an inventory.
- Jump
Params - Jump parameters.
- Loot
Entry - A single loot-drop entry.
- Object
Def - Full definition of a single world-object type.
- Object
Scale - Per-axis scale factors for the object’s 3D model.
- Recipe
Def - A single crafting recipe definition.
- Recipe
Requirement - A single ingredient required by a crafting recipe.
- Recipe
Result - An item produced by a crafting recipe.
- Spawn
Def - Periodic item-spawn configuration.
- Survival
Params - All survival-related parameters extracted from
game.inf. - Unit
Animations - All animation slots for a unit type.
- UnitDef
- Full definition of a single unit type (creature, NPC, player, vehicle).
- Vehicle
Params - Vehicle-specific physics parameters.
Enums§
- Build
Space - Where a building can be placed.
- Building
Group - Category of a building recipe.
- Collision
Mode - Collision mode for a world object.
- Health
System - Complexity level of the health/survival system.
- Item
Group - Category of an item.
- Material
- Material type of an item.
- Object
State - How the object’s state (animation/growth offset) is determined.