Replace CellTag with CellStructure and embed BaseBuilding

The refactor removes the `Buildings` enum and the `building` module,
replacing
`CellTag` with a new `CellStructure` enum that directly holds a
`BaseBuilding`.
A `get_owner` method is added to `BaseBuilding` to support the new
structure.
All related imports, constructors, and rendering logic are updated to
use
`CellStructure` instead of the old tag and building fields.
This commit is contained in:
2026-04-16 21:56:06 +02:00
parent 268e6d98bf
commit 6dc5f8605c
7 changed files with 38 additions and 58 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
use crate::app::states::skirmish_states::BoardState;
use crate::app::{buildings::BaseBuilding, states::skirmish_states::BoardState};
use clap::ValueEnum;
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -22,8 +22,8 @@ pub enum ZoomLevel {
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum CellTag {
Base(Players),
pub enum CellStructure {
Base(BaseBuilding),
Tunel,
Stone,
}