[−][src]Struct genie::DatFile
A data file.
Fields
terrain_tables: Vec<TerrainRestriction>
Terrain restriction tables.
tile_sizes: Vec<TileSize>
Tile size data.
terrains: Vec<Terrain>
Terrains.
terrain_borders: Vec<TerrainBorder>
Terrain border data, specifying how different terrains blend.
color_tables: Vec<ColorTable>
Data about player colours.
sounds: Vec<Sound>
The available sounds.
sprites: Vec<Option<Sprite>>
The available sprites.
effects: Vec<TechEffect>
Tech effect data.
task_lists: Vec<Option<TaskList>>
Task lists for unit types.
civilizations: Vec<Civilization>
The available civilizations.
techs: Vec<Tech>
Techs or researches.
tech_tree: TechTree
Tech tree data.
Implementations
impl DatFile
[src]
pub fn read_from(input: impl Read) -> Result<DatFile, Error>
[src]
Read a data file from a compressed byte stream.
pub fn write_to<W>(&self, output: &mut W) -> Result<(), Error> where
W: Write,
[src]
W: Write,
Serialize this data file to an output stream. Compression is applied by this function.
pub fn get_tech(&self, id: impl Into<TechID>) -> Option<&Tech>
[src]
Get a tech by its ID.
pub fn get_terrain(&self, id: impl Into<TerrainID>) -> Option<&Terrain>
[src]
Get a terrain type by its ID.
pub fn get_gaia(&self) -> Option<&Civilization>
[src]
Get the GAIA civilization.
pub fn get_civilization(
&self,
id: impl Into<CivilizationID>
) -> Option<&Civilization>
[src]
&self,
id: impl Into<CivilizationID>
) -> Option<&Civilization>
Get a civilization by its ID.
pub fn get_sound(&self, id: impl Into<SoundID>) -> Option<&Sound>
[src]
Get a sound by its ID.
pub fn get_sprite(&self, id: impl Into<SpriteID>) -> Option<&Sprite>
[src]
Get a sprite by its ID.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DatFile
impl Send for DatFile
impl Sync for DatFile
impl Unpin for DatFile
impl UnwindSafe for DatFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,