Introduce Ore structure and simplify durability fields

Add a new Ore structure with ownership, amount, and durability, and
extend the
Structures enum to include it. Update board generation to place ore
cells next
to player and enemy bases and adjust base coordinates accordingly.
Remove the
redundant `max_durability` field from BaseBuilding, Stone, and Tunnel,
fixing
their `get_max_durability` implementations to return constant values.
Rename the
tick handling parameter from `interval_ms` to `tick_ms`. Minor clean‑ups
include
re‑exporting the Ore module, adding TODO comments in the side panel
widget, and
simplifying the audio thread spawn in `main.rs`.
This commit is contained in:
2026-05-04 16:14:54 +02:00
parent 1daa9802ed
commit 766b65b2fc
10 changed files with 92 additions and 19 deletions
@@ -1,6 +1,6 @@
use crate::app::states::skirmish_states::{
Players,
structures::{BaseBuilding, Stone, Structure, Tunnel},
structures::{BaseBuilding, Ore, Stone, Structure, Tunnel},
};
use ratatui::style::Color;
@@ -9,6 +9,7 @@ pub enum Structures {
Base(BaseBuilding),
Tunnel(Tunnel),
Stone(Stone),
Ore(Ore),
}
impl Structures {
@@ -18,6 +19,7 @@ impl Structures {
Self::Base(b) => b,
Self::Tunnel(t) => t,
Self::Stone(s) => s,
Self::Ore(o) => o,
}
}
}