ferravex_play/gameplay/
mod.rs

1//! Composable game-loop rules. Hosts provide accepted events and simulation time.
2//! No renderer, ECS, platform, or external dependencies. See `docs/GAMEPLAY_40.md`.
3pub mod buffer;
4
5/// Invalid authoring/input, capacity exhaustion, or an unavailable action.
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7pub enum LoopError {
8    Invalid,
9    Capacity,
10    Unavailable,
11}
12fn seconds(value: f32) -> Result<f64, LoopError> {
13    if value.is_finite() && (0.0..=3600.0).contains(&value) {
14        Ok(f64::from(value))
15    } else {
16        Err(LoopError::Invalid)
17    }
18}
19
20pub mod combo;
21
22pub mod progression;
23
24pub mod loot;
25
26pub mod pity;
27
28pub mod pickup;
29
30pub mod inventory;
31
32pub mod crafting;
33
34pub mod upgrades;
35
36pub mod magazine;
37
38pub mod charge;
39
40pub mod homing;
41
42pub mod projectile;
43
44pub mod spawn;
45
46pub mod waves;
47
48pub mod interaction;
49
50pub mod stagger;
51
52pub mod shield;
53
54pub mod checkpoint;
55
56pub mod trial;
57
58pub mod platforms;
59
60pub mod skill;