pub struct Culture {
name: Rc<str>,
ethos: Option<Rc<str>>,
heritage: Rc<str>,
martial: Rc<str>,
date: Option<Date>,
children: Vec<Shared<GameObjectEntity<Culture>>>,
parents: Vec<Shared<GameObjectEntity<Culture>>>,
traditions: Vec<Rc<str>>,
language: Rc<str>,
eras: Vec<(Rc<str>, Option<u16>, Option<u16>)>,
}
Expand description
A struct representing a culture in the game
Fields§
§name: Rc<str>
§ethos: Option<Rc<str>>
§heritage: Rc<str>
§martial: Rc<str>
§date: Option<Date>
§children: Vec<Shared<GameObjectEntity<Culture>>>
§parents: Vec<Shared<GameObjectEntity<Culture>>>
§traditions: Vec<Rc<str>>
§language: Rc<str>
§eras: Vec<(Rc<str>, Option<u16>, Option<u16>)>
Implementations§
Source§impl Culture
impl Culture
pub fn register_child(&mut self, child: Shared<GameObjectEntity<Culture>>)
Trait Implementations§
Source§impl FromGameObject for Culture
impl FromGameObject for Culture
fn from_game_object( base: &HashMap<String, SaveFileValue>, game_state: &mut GameState, ) -> Result<Self, ParsingError>
fn finalize(&mut self, reference: &Shared<GameObjectEntity<Culture>>)
Source§impl GameObjectDerived for Culture
impl GameObjectDerived for Culture
Source§impl Localizable for Culture
impl Localizable for Culture
Source§impl ProceduralPath for Culture
impl ProceduralPath for Culture
fn get_subdir() -> &'static str
Source§fn get_children(&self) -> Option<Vec<Shared<GameObjectEntity<Culture>>>>
fn get_children(&self) -> Option<Vec<Shared<GameObjectEntity<Culture>>>>
Returns an iterator over the children of the node
Source§fn get_parent(&self) -> Option<Vec<Shared<GameObjectEntity<Culture>>>>
fn get_parent(&self) -> Option<Vec<Shared<GameObjectEntity<Culture>>>>
Returns an iterator over the parent of the node
Auto Trait Implementations§
impl Freeze for Culture
impl !RefUnwindSafe for Culture
impl !Send for Culture
impl !Sync for Culture
impl Unpin for Culture
impl !UnwindSafe for Culture
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