generated from GarandPLG/rust-flake-template
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:
@@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user