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:
GarandPLG committed 2026-05-04 16:14:54 +02:00
1 parent 1daa9802ed
commit 766b65b2fc
10 files changed
+92 -19

No files matched your search

+2 -2
View File
@@ -4,8 +4,8 @@ use std::{
time::{Duration, Instant},
};
pub fn handle_tick_event(tx: Sender<()>, interval_ms: u8) {
let interval: Duration = Duration::from_millis(interval_ms as u64);
pub fn handle_tick_event(tx: Sender<()>, tick_ms: u8) {
let interval: Duration = Duration::from_millis(tick_ms as u64);
loop {
if tx.send(()).is_err() {
break;