pub struct Variant { /* private fields */ }Expand description
A texture variant for a portrait entry.
Variants allow different portrait textures to be used based on game conditions such as season, character level, age, or faction role.
Implementations§
Source§impl Variant
impl Variant
Sourcepub fn filename(&self) -> &String
pub fn filename(&self) -> &String
Variant identifier matching the variant_filename column in variants tables.
Sourcepub fn file_diffuse(&self) -> &String
pub fn file_diffuse(&self) -> &String
Path to the diffuse (color) texture for this variant.
Sourcepub fn file_mask_1(&self) -> &String
pub fn file_mask_1(&self) -> &String
Path to first mask texture (purpose unknown).
Sourcepub fn file_mask_2(&self) -> &String
pub fn file_mask_2(&self) -> &String
Path to second mask texture (purpose unknown).
Sourcepub fn file_mask_3(&self) -> &String
pub fn file_mask_3(&self) -> &String
Path to third mask texture (purpose unknown).
Sourcepub fn politician(&self) -> &bool
pub fn politician(&self) -> &bool
Whether this variant is for politicians. Only used in version 1.
Sourcepub fn faction_leader(&self) -> &bool
pub fn faction_leader(&self) -> &bool
Whether this variant is for faction leaders. Only used in version 1.
Source§impl Variant
impl Variant
Sourcepub fn filename_mut(&mut self) -> &mut String
pub fn filename_mut(&mut self) -> &mut String
Variant identifier matching the variant_filename column in variants tables.
Sourcepub fn file_diffuse_mut(&mut self) -> &mut String
pub fn file_diffuse_mut(&mut self) -> &mut String
Path to the diffuse (color) texture for this variant.
Sourcepub fn file_mask_1_mut(&mut self) -> &mut String
pub fn file_mask_1_mut(&mut self) -> &mut String
Path to first mask texture (purpose unknown).
Sourcepub fn file_mask_2_mut(&mut self) -> &mut String
pub fn file_mask_2_mut(&mut self) -> &mut String
Path to second mask texture (purpose unknown).
Sourcepub fn file_mask_3_mut(&mut self) -> &mut String
pub fn file_mask_3_mut(&mut self) -> &mut String
Path to third mask texture (purpose unknown).
Sourcepub fn season_mut(&mut self) -> &mut String
pub fn season_mut(&mut self) -> &mut String
Season when this variant applies. Only used in version 1.
Sourcepub fn politician_mut(&mut self) -> &mut bool
pub fn politician_mut(&mut self) -> &mut bool
Whether this variant is for politicians. Only used in version 1.
Sourcepub fn faction_leader_mut(&mut self) -> &mut bool
pub fn faction_leader_mut(&mut self) -> &mut bool
Whether this variant is for faction leaders. Only used in version 1.
Source§impl Variant
impl Variant
Sourcepub fn set_filename(&mut self, val: String) -> &mut Self
pub fn set_filename(&mut self, val: String) -> &mut Self
Variant identifier matching the variant_filename column in variants tables.
Sourcepub fn set_file_diffuse(&mut self, val: String) -> &mut Self
pub fn set_file_diffuse(&mut self, val: String) -> &mut Self
Path to the diffuse (color) texture for this variant.
Sourcepub fn set_file_mask_1(&mut self, val: String) -> &mut Self
pub fn set_file_mask_1(&mut self, val: String) -> &mut Self
Path to first mask texture (purpose unknown).
Sourcepub fn set_file_mask_2(&mut self, val: String) -> &mut Self
pub fn set_file_mask_2(&mut self, val: String) -> &mut Self
Path to second mask texture (purpose unknown).
Sourcepub fn set_file_mask_3(&mut self, val: String) -> &mut Self
pub fn set_file_mask_3(&mut self, val: String) -> &mut Self
Path to third mask texture (purpose unknown).
Sourcepub fn set_season(&mut self, val: String) -> &mut Self
pub fn set_season(&mut self, val: String) -> &mut Self
Season when this variant applies. Only used in version 1.
Sourcepub fn set_level(&mut self, val: i32) -> &mut Self
pub fn set_level(&mut self, val: i32) -> &mut Self
Character level threshold. Only used in version 1.
Sourcepub fn set_age(&mut self, val: i32) -> &mut Self
pub fn set_age(&mut self, val: i32) -> &mut Self
Character age threshold. Only used in version 1.
Sourcepub fn set_politician(&mut self, val: bool) -> &mut Self
pub fn set_politician(&mut self, val: bool) -> &mut Self
Whether this variant is for politicians. Only used in version 1.
Sourcepub fn set_faction_leader(&mut self, val: bool) -> &mut Self
pub fn set_faction_leader(&mut self, val: bool) -> &mut Self
Whether this variant is for faction leaders. Only used in version 1.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Variant
impl<'de> Deserialize<'de> for Variant
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>,
impl Eq for Variant
impl StructuralPartialEq for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnsafeUnpin for Variant
impl UnwindSafe for Variant
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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<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.