pub struct Tile { /* private fields */ }Expand description
A single terrain tile definition.
Contains all properties for a terrain tile including dimensions, textures, rendering flags, and connection rules.
Implementations§
Source§impl Tile
impl Tile
Sourcepub fn serialise_version(&self) -> &u16
pub fn serialise_version(&self) -> &u16
Serialisation format version.
Sourcepub fn requires_infield_lodding(&self) -> &bool
pub fn requires_infield_lodding(&self) -> &bool
Whether tile requires in-field LOD processing.
Sourcepub fn random_rotatable(&self) -> &bool
pub fn random_rotatable(&self) -> &bool
Whether tile can be randomly rotated during placement.
Sourcepub fn custom_alpha_blend_texture(&self) -> &String
pub fn custom_alpha_blend_texture(&self) -> &String
Custom alpha blend texture path.
Sourcepub fn encampable(&self) -> &bool
pub fn encampable(&self) -> &bool
Whether units can encamp on this tile.
Sourcepub fn custom_blend_tile(&self) -> &String
pub fn custom_blend_tile(&self) -> &String
Custom blend tile reference.
Sourcepub fn texture_red(&self) -> &String
pub fn texture_red(&self) -> &String
Red channel texture path.
Sourcepub fn texture_green(&self) -> &String
pub fn texture_green(&self) -> &String
Green channel texture path.
Sourcepub fn texture_blue(&self) -> &String
pub fn texture_blue(&self) -> &String
Blue channel texture path.
Sourcepub fn texture_alpha(&self) -> &String
pub fn texture_alpha(&self) -> &String
Alpha channel texture path.
Sourcepub fn variations(&self) -> &Vec<TileVariation>
pub fn variations(&self) -> &Vec<TileVariation>
Visual variations of this tile.
Sourcepub fn link_targets(&self) -> &Vec<TileLinkTarget>
pub fn link_targets(&self) -> &Vec<TileLinkTarget>
Targets for tile linking.
Source§impl Tile
impl Tile
Sourcepub fn serialise_version_mut(&mut self) -> &mut u16
pub fn serialise_version_mut(&mut self) -> &mut u16
Serialisation format version.
Sourcepub fn location_mut(&mut self) -> &mut String
pub fn location_mut(&mut self) -> &mut String
File path or location identifier.
Sourcepub fn tile_set_mut(&mut self) -> &mut String
pub fn tile_set_mut(&mut self) -> &mut String
Parent tile set name.
Sourcepub fn height_mut(&mut self) -> &mut u32
pub fn height_mut(&mut self) -> &mut u32
Tile height in units.
Sourcepub fn requires_infield_lodding_mut(&mut self) -> &mut bool
pub fn requires_infield_lodding_mut(&mut self) -> &mut bool
Whether tile requires in-field LOD processing.
Sourcepub fn random_rotatable_mut(&mut self) -> &mut bool
pub fn random_rotatable_mut(&mut self) -> &mut bool
Whether tile can be randomly rotated during placement.
Sourcepub fn custom_alpha_blend_texture_mut(&mut self) -> &mut String
pub fn custom_alpha_blend_texture_mut(&mut self) -> &mut String
Custom alpha blend texture path.
Sourcepub fn scalable_mut(&mut self) -> &mut bool
pub fn scalable_mut(&mut self) -> &mut bool
Whether tile can be scaled.
Sourcepub fn encampable_mut(&mut self) -> &mut bool
pub fn encampable_mut(&mut self) -> &mut bool
Whether units can encamp on this tile.
Sourcepub fn custom_blend_tile_mut(&mut self) -> &mut String
pub fn custom_blend_tile_mut(&mut self) -> &mut String
Custom blend tile reference.
Sourcepub fn texture_red_mut(&mut self) -> &mut String
pub fn texture_red_mut(&mut self) -> &mut String
Red channel texture path.
Sourcepub fn texture_green_mut(&mut self) -> &mut String
pub fn texture_green_mut(&mut self) -> &mut String
Green channel texture path.
Sourcepub fn texture_blue_mut(&mut self) -> &mut String
pub fn texture_blue_mut(&mut self) -> &mut String
Blue channel texture path.
Sourcepub fn texture_alpha_mut(&mut self) -> &mut String
pub fn texture_alpha_mut(&mut self) -> &mut String
Alpha channel texture path.
Sourcepub fn variations_mut(&mut self) -> &mut Vec<TileVariation>
pub fn variations_mut(&mut self) -> &mut Vec<TileVariation>
Visual variations of this tile.
Sourcepub fn link_targets_mut(&mut self) -> &mut Vec<TileLinkTarget>
pub fn link_targets_mut(&mut self) -> &mut Vec<TileLinkTarget>
Targets for tile linking.
Source§impl Tile
impl Tile
Sourcepub fn set_serialise_version(&mut self, val: u16) -> &mut Self
pub fn set_serialise_version(&mut self, val: u16) -> &mut Self
Serialisation format version.
Sourcepub fn set_location(&mut self, val: String) -> &mut Self
pub fn set_location(&mut self, val: String) -> &mut Self
File path or location identifier.
Sourcepub fn set_tile_set(&mut self, val: String) -> &mut Self
pub fn set_tile_set(&mut self, val: String) -> &mut Self
Parent tile set name.
Sourcepub fn set_height(&mut self, val: u32) -> &mut Self
pub fn set_height(&mut self, val: u32) -> &mut Self
Tile height in units.
Sourcepub fn set_requires_infield_lodding(&mut self, val: bool) -> &mut Self
pub fn set_requires_infield_lodding(&mut self, val: bool) -> &mut Self
Whether tile requires in-field LOD processing.
Sourcepub fn set_random_rotatable(&mut self, val: bool) -> &mut Self
pub fn set_random_rotatable(&mut self, val: bool) -> &mut Self
Whether tile can be randomly rotated during placement.
Sourcepub fn set_custom_alpha_blend_texture(&mut self, val: String) -> &mut Self
pub fn set_custom_alpha_blend_texture(&mut self, val: String) -> &mut Self
Custom alpha blend texture path.
Sourcepub fn set_scalable(&mut self, val: bool) -> &mut Self
pub fn set_scalable(&mut self, val: bool) -> &mut Self
Whether tile can be scaled.
Sourcepub fn set_encampable(&mut self, val: bool) -> &mut Self
pub fn set_encampable(&mut self, val: bool) -> &mut Self
Whether units can encamp on this tile.
Sourcepub fn set_custom_blend_tile(&mut self, val: String) -> &mut Self
pub fn set_custom_blend_tile(&mut self, val: String) -> &mut Self
Custom blend tile reference.
Sourcepub fn set_texture_red(&mut self, val: String) -> &mut Self
pub fn set_texture_red(&mut self, val: String) -> &mut Self
Red channel texture path.
Sourcepub fn set_texture_green(&mut self, val: String) -> &mut Self
pub fn set_texture_green(&mut self, val: String) -> &mut Self
Green channel texture path.
Sourcepub fn set_texture_blue(&mut self, val: String) -> &mut Self
pub fn set_texture_blue(&mut self, val: String) -> &mut Self
Blue channel texture path.
Sourcepub fn set_texture_alpha(&mut self, val: String) -> &mut Self
pub fn set_texture_alpha(&mut self, val: String) -> &mut Self
Alpha channel texture path.
Sourcepub fn set_variations(&mut self, val: Vec<TileVariation>) -> &mut Self
pub fn set_variations(&mut self, val: Vec<TileVariation>) -> &mut Self
Visual variations of this tile.
Sourcepub fn set_link_targets(&mut self, val: Vec<TileLinkTarget>) -> &mut Self
pub fn set_link_targets(&mut self, val: Vec<TileLinkTarget>) -> &mut Self
Targets for tile linking.
Trait Implementations§
Source§impl Decodeable for Tile
impl Decodeable for Tile
Source§impl<'de> Deserialize<'de> for Tile
impl<'de> Deserialize<'de> for Tile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Encodeable for Tile
impl Encodeable for Tile
Source§fn encode<W: WriteBytes>(
&mut self,
buffer: &mut W,
extra_data: &Option<EncodeableExtraData<'_>>,
) -> Result<()>
fn encode<W: WriteBytes>( &mut self, buffer: &mut W, extra_data: &Option<EncodeableExtraData<'_>>, ) -> Result<()>
impl StructuralPartialEq for Tile
Auto Trait Implementations§
impl Freeze for Tile
impl RefUnwindSafe for Tile
impl Send for Tile
impl Sync for Tile
impl Unpin for Tile
impl UnsafeUnpin for Tile
impl UnwindSafe for Tile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.