openstranded_common_survival/lib.rs
1//! # openstranded-common-survival
2//!
3//! Shared data types for the OpenStranded survival system.
4//!
5//! This crate defines the canonical structures that represent survival
6//! parameters — health system mode, exhaustion rates, diving, jumping,
7//! and other player-status mechanics.
8//!
9//! ## Types
10//!
11//! | Type | Purpose |
12//! |------|---------|
13//! | [`SurvivalParams`] | All survival parameters bundled together |
14//! | [`HealthSystem`] | Complexity level of the health model |
15//! | [`ExhaustParams`] | Exhaustion rates grouped by action |
16//! | [`ExhaustRate`] | A single triple-rate (health, hunger, thirst) |
17//! | [`DiveParams`] | Underwater time and damage |
18//! | [`JumpParams`] | Jump cooldown and height multiplier |
19//!
20//! ## Relationship to `.inf` files
21//!
22//! The original `game.inf` contains a single flat entry with all game
23//! configuration. [`SurvivalParams::from_inf_fields`] extracts only
24//! the survival-relevant subset of those fields.
25//!
26//! ## Dependency
27//!
28//! Only `serde` — this is a pure data crate with no engine or plugin API
29//! dependencies.
30
31mod survival_params;
32
33pub use survival_params::{
34 DiveParams, ExhaustParams, ExhaustRate, HealthSystem, JumpParams, SurvivalParams,
35};