Add digging tasks and unit coordinate support

Introduce Tasks handling for units, store coordinates in MinerUnit,
expose getters/setters for unit tasks, add logging of marked cells,
and provide cell accessors for mutable unit options.
This commit is contained in:
GarandPLG committed 2026-05-12 13:42:13 +02:00
1 parent a3bb9dc6f1
commit f554fa2efc
5 files changed
+70 -7

No files matched your search

@@ -1,4 +1,4 @@
use crate::app::states::skirmish_states::Players;
use crate::app::states::skirmish_states::{Players, tasks::Tasks};
use ratatui::{
style::Stylize,
text::{Line, Span},
@@ -23,6 +23,10 @@ pub trait Unit {
fn get_digging_power(&self) -> f32;
fn get_coords(&self) -> (usize, usize);
fn set_task(&mut self, task: Tasks);
fn base_text(&self) -> Vec<Line<'_>> {
let owner: Span<'_> = self.get_owner().get_span();
let hp: u16 = self.get_hp();