use std::rc::Rc; use crate::{state::Action, world::{Town, Structure}, state::GameState, entity::Location}; pub struct FoundTown{ pub loc: Location, pub town: Rc, } impl Action for FoundTown { fn apply(&self, state: &mut GameState) { state.world.add_structure(self.loc, Structure::Town(self.town.clone())); } fn description(&self) -> String { format!("{} was founded", self.town.name) } fn notable(&self) -> bool { true } }