openstranded_common_building/lib.rs
1//! # openstranded-common-building
2//!
3//! Shared data types for the OpenStranded building system.
4//!
5//! This crate defines the canonical structures that represent building
6//! recipes — what gets built, what materials are required, and where it
7//! can be placed.
8//!
9//! ## Types
10//!
11//! | Type | Purpose |
12//! |------|---------|
13//! | [`BuildingDef`] | A single building recipe (from `buildings.inf`) |
14//! | [`BuildingGroup`] | Category enum (building, storage, production, …) |
15//! | [`BuildSpace`] | Placement requirement (land, water, at object, …) |
16//! | [`BuildingRequirement`] | Material required: `item_id + count` |
17//!
18//! ## Relationship to `.inf` files
19//!
20//! Each `id=N` entry inside a `buildings*.inf` file corresponds to one
21//! [`BuildingDef`]. `req=item_id,count` lines become
22//! [`BuildingRequirement`]s. The `buildspace=` field maps to
23//! [`BuildSpace`].
24//!
25//! ## Dependency
26//!
27//! Only `serde` — this is a pure data crate with no engine or plugin API
28//! dependencies.
29
30mod building_def;
31
32pub use building_def::{BuildingDef, BuildingGroup, BuildingRequirement, BuildSpace};