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