Skip to main content

Crate openstranded_common

Crate openstranded_common 

Source
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

ModulePrimary types
openstranded_common_itemsItemDef, ItemStack, ItemGroup, Material
openstranded_common_craftingRecipeDef, RecipeRequirement, RecipeResult
openstranded_common_buildingBuildingDef, BuildingGroup, BuildSpace, BuildingRequirement
openstranded_common_survivalSurvivalParams, HealthSystem, ExhaustRate, DiveParams, JumpParams
openstranded_common_objectsObjectDef, CollisionMode, SpawnDef, HarvestDef, ObjectScale
openstranded_common_unitsUnitDef, AnimFrame, LootEntry, VehicleParams, UnitAnimations

§Dependency

Only serde (transitively). This is a pure data crate set with no engine or WASM runtime dependencies.

Structs§

AnimFrame
A single animation frame range.
BuildingDef
A single building recipe definition.
BuildingRequirement
A single material requirement for a building recipe.
DiveParams
Underwater / diving parameters.
ExhaustParams
Exhaustion rates for all player actions.
ExhaustRate
A triple rate affecting health, hunger, and thirst respectively.
HarvestDef
Item-harvest / search configuration.
ItemDef
Full definition of a single item type.
ItemStack
A stack of identical items in an inventory.
JumpParams
Jump parameters.
LootEntry
A single loot-drop entry.
ObjectDef
Full definition of a single world-object type.
ObjectScale
Per-axis scale factors for the object’s 3D model.
RecipeDef
A single crafting recipe definition.
RecipeRequirement
A single ingredient required by a crafting recipe.
RecipeResult
An item produced by a crafting recipe.
SpawnDef
Periodic item-spawn configuration.
SurvivalParams
All survival-related parameters extracted from game.inf.
UnitAnimations
All animation slots for a unit type.
UnitDef
Full definition of a single unit type (creature, NPC, player, vehicle).
VehicleParams
Vehicle-specific physics parameters.

Enums§

BuildSpace
Where a building can be placed.
BuildingGroup
Category of a building recipe.
CollisionMode
Collision mode for a world object.
HealthSystem
Complexity level of the health/survival system.
ItemGroup
Category of an item.
Material
Material type of an item.
ObjectState
How the object’s state (animation/growth offset) is determined.