diff --git a/README.md b/README.md index f1958e1..7c98289 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # Immediate Stats Game stats that reset every frame. Inspired by immediate mode rendering. - -== Todo Info about derive macro. +Includes a derive macro which propagates stat resets to any stat fields. ```rust #[derive(StatContainer)] diff --git a/immediate_stats/Cargo.toml b/immediate_stats/Cargo.toml index 056806c..e972a0f 100644 --- a/immediate_stats/Cargo.toml +++ b/immediate_stats/Cargo.toml @@ -2,7 +2,7 @@ name = "immediate_stats" version = "0.1.0" edition = "2024" -description = "A crate for making immediate-mode stats." +description = "Game stats that reset every frame. Inspired by immediate mode rendering." categories = ["game-development", "data-structures"] keywords = ["game", "gamedev", "bevy", "stats", "proc-macro"] repository = "https://github.com/AlephCubed/immediate_stats" diff --git a/immediate_stats/README.md b/immediate_stats/README.md index f1958e1..7c98289 100644 --- a/immediate_stats/README.md +++ b/immediate_stats/README.md @@ -1,8 +1,7 @@ # Immediate Stats Game stats that reset every frame. Inspired by immediate mode rendering. - -== Todo Info about derive macro. +Includes a derive macro which propagates stat resets to any stat fields. ```rust #[derive(StatContainer)] diff --git a/immediate_stats/src/lib.rs b/immediate_stats/src/lib.rs index 0a8d1e2..452da30 100644 --- a/immediate_stats/src/lib.rs +++ b/immediate_stats/src/lib.rs @@ -1,7 +1,8 @@ //! Game stats that reset every frame. //! Inspired by immediate mode rendering. //! -//! == Todo Info about derive macro. +//! Includes a [derive macro](macro@StatContainer) which propagates stat resets to any stat fields. +//! //! ```rust no_run //! # use immediate_stats::*; //! #[derive(StatContainer)] @@ -16,7 +17,7 @@ //! // The order does not matter. Bonuses are always applied before multipliers. //! assert_eq!(speed.0.total(), 30); // (10 + 5) * 2 = 30 //! -//! speed.reset_modifiers(); // Reset bonus and multiplier, so speed is back to 10. +//! speed.reset_modifiers(); // Reset speed back to 10. //! } //! } //! ``` @@ -25,7 +26,7 @@ //! //! There is build-in integration with the [Bevy Engine](https://bevyengine.org) //! via the `bevy` feature flag. -//! This adds systems for resetting `StatContainer` components and resources. +//! This adds systems for resetting [`StatContainer`] components and resources. //! #![cfg_attr(not(feature = "bevy"), doc = "```rust ignore")] #![cfg_attr(feature = "bevy", doc = "```rust")] @@ -77,7 +78,7 @@ pub mod modifier; pub mod stat; /// Implements [`reset_modifiers`](StatContainer::reset_modifiers) -/// by passing on the call to any sub-stats. +/// by propagating the call down to any `StatContainer` fields. /// ```rust /// # use immediate_stats::*; /// #[derive(StatContainer, Default, Debug, PartialEq)] @@ -110,9 +111,9 @@ pub mod stat; /// #[derive(StatContainer)] /// struct PartialReset { /// #[stat] -/// custom: Health, +/// custom: Health, // Will get reset. /// #[stat_ignore] -/// ignored: Stat, +/// ignored: Stat, // Will not get reset. /// } /// /// fn main () { diff --git a/immediate_stats_macros/Cargo.toml b/immediate_stats_macros/Cargo.toml index 86be4dd..6b6015d 100644 --- a/immediate_stats_macros/Cargo.toml +++ b/immediate_stats_macros/Cargo.toml @@ -2,7 +2,7 @@ name = "immediate_stats_macros" version = "0.1.0" edition = "2024" -description = "A crate for making immediate-mode stats." +description = "Game stats that reset every frame. Inspired by immediate mode rendering." categories = ["game-development", "data-structures"] keywords = ["game", "gamedev", "bevy", "stats", "proc-macro"] repository = "https://github.com/AlephCubed/immediate_stats"