openstranded_common_units/lib.rs
1//! # openstranded-common-units
2//!
3//! Shared data types for the OpenStranded unit / AI system.
4//!
5//! This crate defines the canonical structures that represent unit
6//! types — creatures, NPCs, vehicles, and the player — parsed from
7//! `units*.inf` files.
8//!
9//! ## Types
10//!
11//! | Type | Purpose |
12//! |------|---------|
13//! | [`UnitDef`] | Full definition of a unit type |
14//! | [`AnimFrame`] | Start/end frames + speed for an animation |
15//! | [`UnitAnimations`] | All animation slots |
16//! | [`LootEntry`] | Loot drop: item_id + max count |
17//! | [`VehicleParams`] | Vehicle physics (acceleration, steering, …) |
18//!
19//! ## Relationship to `.inf` files
20//!
21//! Each `id=N` entry in a `units*.inf` file corresponds to one
22//! [`UnitDef`]. Most fields map directly from their `.inf` names.
23//!
24//! ## Dependency
25//!
26//! Only `serde` — this is a pure data crate with no engine or plugin API
27//! dependencies.
28
29mod unit_def;
30
31pub use unit_def::{AnimFrame, LootEntry, UnitAnimations, UnitDef, VehicleParams};