pub struct Dynasty {
name: Option<Rc<str>>,
prestige_tot: f32,
prestige: f32,
perks: HashMap<Rc<str>, u8>,
leader: Option<Shared<GameObjectEntity<Character>>>,
houses: Vec<Shared<GameObjectEntity<House>>>,
}
Fields§
§name: Option<Rc<str>>
§prestige_tot: f32
§prestige: f32
§perks: HashMap<Rc<str>, u8>
§leader: Option<Shared<GameObjectEntity<Character>>>
§houses: Vec<Shared<GameObjectEntity<House>>>
Implementations§
Source§impl Dynasty
impl Dynasty
pub fn register_house(&mut self, house: Shared<GameObjectEntity<House>>)
pub fn get_founder(&self) -> Shared<GameObjectEntity<Character>>
pub fn get_leader(&self) -> Option<Shared<GameObjectEntity<Character>>>
Trait Implementations§
Source§impl FromGameObject for Dynasty
impl FromGameObject for Dynasty
fn from_game_object( base: &HashMap<String, SaveFileValue>, game_state: &mut GameState, ) -> Result<Self, ParsingError>
fn finalize(&mut self, _reference: &Shared<GameObjectEntity<Self>>)
Source§impl GameObjectDerived for Dynasty
impl GameObjectDerived for Dynasty
Source§impl Localizable for Dynasty
impl Localizable for Dynasty
Source§impl ProceduralPath for Dynasty
impl ProceduralPath for Dynasty
fn get_subdir() -> &'static str
Auto Trait Implementations§
impl Freeze for Dynasty
impl !RefUnwindSafe for Dynasty
impl !Send for Dynasty
impl !Sync for Dynasty
impl Unpin for Dynasty
impl !UnwindSafe for Dynasty
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more