Skip to main content

Crate openstranded_common_objects

Crate openstranded_common_objects 

Source
Expand description

§openstranded-common-objects

Shared data types for the OpenStranded world object system.

This crate defines the canonical structures that represent world objects — static and interactive entities like trees, rocks, buildings, grass, flowers, and stuff.

§Types

TypePurpose
ObjectDefFull definition of one object type
CollisionModeCollision mode enum
ObjectScalePer-axis scale factors
ObjectStateState offset mode (random / fixed)
SpawnDefPeriodic item-spawn configuration
HarvestDefItem-find / search configuration

§Relationship to .inf files

Each id=N entry in an objects*.inf file corresponds to one ObjectDef. All fields are mapped from their .inf names to Rust struct fields by ObjectDef::from_inf_fields.

§Dependency

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

Structs§

HarvestDef
Item-harvest / search configuration.
ObjectDef
Full definition of a single world-object type.
ObjectScale
Per-axis scale factors for the object’s 3D model.
SpawnDef
Periodic item-spawn configuration.

Enums§

CollisionMode
Collision mode for a world object.
ObjectState
How the object’s state (animation/growth offset) is determined.