From e85e47971f1b07a39350e705a288675535be31bf Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 15 Dec 2025 03:41:56 +0100 Subject: [PATCH] Slop cleanup --- bin_efo/src/commands/entity_generic.rs | 20 +++++++++---------- .../entity_generic/helper_functions.rs | 8 ++++---- bin_efo/src/commands/epoch.rs | 14 ++++++------- bin_efo/src/commands/generate.rs | 18 ++++++++--------- bin_efo/src/commands/init.rs | 8 ++++---- bin_efo/src/main.rs | 8 ++++---- 6 files changed, 38 insertions(+), 38 deletions(-) diff --git a/bin_efo/src/commands/entity_generic.rs b/bin_efo/src/commands/entity_generic.rs index ce7cad0..41de79a 100644 --- a/bin_efo/src/commands/entity_generic.rs +++ b/bin_efo/src/commands/entity_generic.rs @@ -6,9 +6,9 @@ //! //! ## Summary //! -//! | Sub‑command | Usage | What it changes | +//! | Sub-command | Usage | What it changes | //! |-------------|-------|-----------------| -//! | **add** | ` add [OPTIONS] [IDENTIFIER]` | Creates a new ``, pushes it to the epoch’s list, and writes the epoch. | +//! | **add** | ` add [OPTIONS] [IDENTIFIER]` | Creates a new ``, pushes it to the epoch's list, and writes the epoch. | //! | **del** | ` del ` | Removes the matching `` from the list and writes the epoch. | //! | **edit** | ` edit [OPTIONS]` | Modifies the stats/position/duration/effect/bounds of the chosen `` and writes the epoch. | //! | **find** | ` find ` | Prints full details of a single ``. | @@ -26,11 +26,11 @@ //! instead of an absolute overwrite. | //! | `-v, --verbose…` | *global* | Increases the amount of diagnostic output. | //! | `--rng ` | *add/edit* | How to initialise *missing* stats. Possible values: `zero`, `low`, `med`, `high`, `legendary`, `mixed`, `flawed`. Default: `zero`. | -//! | `--pos-exact ` / `--pos ` | *add/edit* | Set the entity’s coordinates. `--pos-exact` forces the coordinates to be used verbatim; `--pos` applies the map’s current position transformation (if any). | -//! | `--duration ` | *add/edit* | Lifespan of the entity – e.g. `Permanent`, `Temporary` or `Duration(1)` for a one‑turn event. | +//! | `--pos-exact ` / `--pos ` | *add/edit* | Set the entity's coordinates. `--pos-exact` forces the coordinates to be used verbatim; `--pos` applies the map's current position transformation (if any). | +//! | `--duration ` | *add/edit* | Lifespan of the entity - e.g. `Permanent`, `Temporary` or `Duration(1)` for a one-turn event. | //! | `--bounds ` | *add/edit* | Effect limits in the form `min,max` (e.g. `10,80`). | //! | `--effect ` | *add/edit* | How the effect is applied: `recurring`, `when-present`, `permanent-effect-to-apply`, `permanent-effect-applied`. | -//! | `-s, --stats ` | *add/edit* | One or more `key:value` pairs – e.g. `fod:10 military:8`. | +//! | `-s, --stats ` | *add/edit* | One or more `key:value` pairs - e.g. `fod:10 military:8`. | //! | `--rng-name` | *add* | If set, the tool generates a random name instead of using the supplied identifier. | //! //! All changes are **persisted immediately** to the epoch file after the @@ -62,7 +62,7 @@ //! chr diff Aria //! ``` //! -//! > **Tip** – ` diff` automatically loads the current epoch and the previous one, so you don’t need to specify epoch numbers. +//! > **Tip** - ` diff` automatically loads the current epoch and the previous one, so you don't need to specify epoch numbers. //! //! *All changes are persisted immediately to the epoch file after the command finishes.* #![warn(unused_attributes)] @@ -91,7 +91,7 @@ mod helper_functions; /// /// Each variant contains the arguments that are common to that /// operation. The enum itself is used by `clap` to dispatch -/// the user‑provided sub‑command. +/// the user-provided sub-command. #[derive(Subcommand, Debug)] pub(crate) enum EntitySubCommands { // /// Find an entity by its identifier @@ -108,7 +108,7 @@ pub(crate) enum EntitySubCommands { Diff(DiffArgs), } -/// Arguments used only for the `diff` sub‑command. +/// Arguments used only for the `diff` sub-command. #[derive(Args, Debug)] pub(crate) struct DiffArgs { /// Identifier (name or `@tag`) of the entity to diff @@ -130,7 +130,7 @@ pub(crate) struct DelArgs { /// Arguments for showing entities. #[derive(Args, Debug)] pub(crate) struct ShowArgs { - /// Optional identifier – when omitted all entities are listed. + /// Optional identifier - when omitted all entities are listed. pub identifier: Option, /// Filter by faction id (used only when an identifier is supplied) @@ -198,7 +198,7 @@ pub struct CommonArgs { #[arg(short = 'e', long)] pub effect: Option, - /// One or more `key:value` pairs that modify the entity’s stats. + /// One or more `key:value` pairs that modify the entity's stats. #[arg(short = 's', long, num_args = 1..)] pub stats: Vec, diff --git a/bin_efo/src/commands/entity_generic/helper_functions.rs b/bin_efo/src/commands/entity_generic/helper_functions.rs index 512d708..8336721 100644 --- a/bin_efo/src/commands/entity_generic/helper_functions.rs +++ b/bin_efo/src/commands/entity_generic/helper_functions.rs @@ -90,12 +90,12 @@ pub(crate) fn update_defaults(entity_args: &AddArgs, e: &mut Entity) { /// Apply a `CommonArgs` bundle to an existing entity. /// /// # Parameters -/// * `entity_args` – A set of common arguments that may specify +/// * `entity_args` - A set of common arguments that may specify /// duration, effect application, bounds, position, and faction. -/// * `position` – An optional `stats::Position`. If `Some`, it +/// * `position` - An optional `stats::Position`. If `Some`, it /// overrides the position supplied in `entity_args`. Passing -/// `None` leaves the entity’s position untouched. -/// * `entity` – The mutable entity to update. +/// `None` leaves the entity's position untouched. +/// * `entity` - The mutable entity to update. pub fn update_common_values( entity_args: &CommonArgs, position: Option, diff --git a/bin_efo/src/commands/epoch.rs b/bin_efo/src/commands/epoch.rs index 4305b22..36cde8d 100644 --- a/bin_efo/src/commands/epoch.rs +++ b/bin_efo/src/commands/epoch.rs @@ -1,9 +1,9 @@ //! # `epoch` sub-command //! -//! The `epoch` sub‑command is the single entry point for all epoch‑related +//! The `epoch` sub-command is the single entry point for all epoch-related //! operations in **efo**. -//! An *epoch* represents a point in the simulated world’s history. -//! The command lets you inspect, advance, modify and sanity‑check the epoch +//! An *epoch* represents a point in the simulated world's history. +//! The command lets you inspect, advance, modify and sanity-check the epoch //! timeline. //! //! ### Usage @@ -24,7 +24,7 @@ //! # Add a unique tag to the current epoch //! efo epoch tag milestone1 //! -//! # Replace the current epoch’s summary +//! # Replace the current epoch's summary //! efo epoch summary "Reached the new frontier" //! //! # (Future) Check consistency @@ -33,15 +33,15 @@ //! //! ### Summary //! -//! | Sub‑command | Usage | What it changes | +//! | Sub-command | Usage | What it changes | //! |-------------|-------|-----------------| //! | `log` | `efo epoch log [--limit N]` | Prints the chronological list of epochs up to the current one. | //! | `switch` | `efo epoch switch ` | Sets the current epoch to the specified `` (must already exist). | //! | `next` | `efo epoch next` | Generates the next scheduled epoch and inserts it. | //! | `reset` | `efo epoch reset` | Deletes all epochs with an identifier greater than the current one. | -//! | `diff` | `efo epoch diff ` | *Unimplemented* – placeholder for future diffing logic. | +//! | `diff` | `efo epoch diff ` | *Unimplemented* - placeholder for future diffing logic. | //! | `tag` | `efo epoch tag ` | Adds a unique tag to the current epoch, updating the global tag map. | -//! | `fsck` | `efo epoch fsck` | *Unimplemented* – intended to run a consistency check. | +//! | `fsck` | `efo epoch fsck` | *Unimplemented* - intended to run a consistency check. | //! | `summary` | `efo epoch summary ` | Replaces the `summary` field of the current epoch with ``. | //! diff --git a/bin_efo/src/commands/generate.rs b/bin_efo/src/commands/generate.rs index f715a31..b004803 100644 --- a/bin_efo/src/commands/generate.rs +++ b/bin_efo/src/commands/generate.rs @@ -7,21 +7,21 @@ //! //! ## Available sub-commands //! -//! | Sub‑command | What it prints | Typical output | +//! | Sub-command | What it prints | Typical output | //! |-------------|----------------|----------------| //! | `character` | Character names (short or long) | `Eldric the Bold` | //! | `event` | Random event ideas | `A mysterious fog descends over the town` | //! | `town` | Town names | `Glimmerdale` | -//! | `exotic` | Exotic character names | `Zar‑nith the Wanderer` | +//! | `exotic` | Exotic character names | `Zar-nith the Wanderer` | //! | `calamity` | Calamity names | `Great Plague of 1743` | //! | `blocker` | Blocker names | `Stone Wall of the North` | //! -//! All sub‑commands share the same options: +//! All sub-commands share the same options: //! -//! * `-n / --number` – how many items to generate (default = 1) -//! * `--short` – print the short form when applicable (ignored for `event`, `exotic`, +//! * `-n / --number` - how many items to generate (default = 1) +//! * `--short` - print the short form when applicable (ignored for `event`, `exotic`, //! `calamity`, `blocker`) -//! * `--name` – output only the name string, no extra formatting (good for scripting) +//! * `--name` - output only the name string, no extra formatting (good for scripting) //! //! # Usage //! ```bash @@ -44,13 +44,13 @@ //! gen blocker -n 4 --short //! ``` //! -//! > **Tip** – redirect or pipe the output: +//! > **Tip** - redirect or pipe the output: //! > `gen character -n 10 > chars.txt` //! //! --- //! //! # Summary -//! | Sub‑command | Usage example | What it does | +//! | Sub-command | Usage example | What it does | //! |-------------|---------------|-----------------| //! | `character` | `gen character -n 5 --short` | Prints 5 short (or long if `--short` omitted) character names | //! | `event` | `gen event -n 3 --name` | Prints 3 event names only | @@ -59,7 +59,7 @@ //! | `calamity` | `gen calamity -n 2` | Prints 2 calamity names | //! | `blocker` | `gen blocker -n 4 --short` | Prints 4 blocker names (short form) | //! -//! *All sub‑commands simply output the generated data; they do not alter any files or state.* +//! *All sub-commands simply output the generated data; they do not alter any files or state.* use clap::{Args, Subcommand}; use lib_efo::{Displayable, error::EpochError, naming::NAMING}; diff --git a/bin_efo/src/commands/init.rs b/bin_efo/src/commands/init.rs index 17c4539..bcc4134 100644 --- a/bin_efo/src/commands/init.rs +++ b/bin_efo/src/commands/init.rs @@ -11,7 +11,7 @@ //! //! ## Guide //! -//! The `init` sub‑command bootstraps a new epoch repository: +//! The `init` sub-command bootstraps a new epoch repository: //! //! * It creates the default `.epoch` configuration file in the current directory. //! * It creates an empty **epoch 0** folder (with its metadata file). @@ -20,13 +20,13 @@ //! ### How to use //! //! ```bash -//! epoch init # normal init – directory must be empty -//! epoch init --force # skip the empty‑folder check +//! epoch init # normal init - directory must be empty +//! epoch init --force # skip the empty-folder check //! ``` //! //! ### Table Entry //! -//! | Sub‑command | Usage | What it changes | +//! | Sub-command | Usage | What it changes | //! |-------------|-------|-----------------| //! | `init` | `epoch init [--force]` | Initialize the current folder as an epoch folder | diff --git a/bin_efo/src/main.rs b/bin_efo/src/main.rs index 90958c4..1e97ced 100644 --- a/bin_efo/src/main.rs +++ b/bin_efo/src/main.rs @@ -1,9 +1,9 @@ //! # `epoch_forge` CLI //! -//! The **command‑line interface** for `epoch_forge`. It exposes a single -//! binary `efo` that supports the following sub‑commands: +//! The **command-line interface** for `epoch_forge`. It exposes a single +//! binary `efo` that supports the following sub-commands: //! -//! ## Sub‑modules +//! ## Sub-modules //! //! * [`epoch`](crate::commands::epoch) - switch / advance time //! * [`event`](crate::commands::entity_generic) - add / remove events @@ -13,7 +13,7 @@ //! * [`calamity`](crate::commands::entity_generic) - add / remove calamities //! * [`link`](crate::commands::link) - add / remove links (alliances, wars, roads, etc.) //! -//! Each sub‑command is implemented in its own module under `commands/`. +//! Each sub-command is implemented in its own module under `commands/`. //! The `main.rs` file simply parses arguments with `clap` and dispatches //! to the appropriate handler. The handlers share a common `World` //! instance that they load from / persist to disk.