Refactor DiggingTask and embed it in Tasks enum

- Remove lifetime and path storage from DiggingTask, make it Copy.
- Add a placeholder `new` constructor that accepts a path.
- Update the Tasks enum to hold a DiggingTask value.
- Reorder module declarations and re‑export order for tasks.
- Add a commented‑out tasks field to MinerUnit as a preparation step.
This commit is contained in:
2026-05-05 17:43:50 +02:00
parent 1c0f27f115
commit 644d8648b2
4 changed files with 19 additions and 7 deletions
@@ -1,4 +1,4 @@
use crate::app::states::skirmish_states::{Players, units::Unit};
use crate::app::states::skirmish_states::{Players, tasks::Tasks, units::Unit};
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct MinerUnit {
@@ -6,6 +6,7 @@ pub struct MinerUnit {
hp: u16,
can_dig: bool,
digging_power: f32,
// tasks: Vec<Tasks>,
}
impl MinerUnit {
@@ -15,6 +16,7 @@ impl MinerUnit {
hp: 100,
can_dig: true,
digging_power: 0.55,
// tasks: Vec::new(),
}
}
}