#[repr(u16)]pub enum ResourceUsageType {
Food = 0,
Wood = 1,
Stone = 2,
Gold = 3,
Pop = 4,
Free = 214,
DecreaseSharedUnitCount = 215,
TownCenter = 218,
TeamBonusCounter = 219,
None = 65_535,
}Variants§
Food = 0
Take or give an amount of food to the player
Wood = 1
Take or give an amount of wood to the player
Stone = 2
Take or give an amount of stone to the player
Gold = 3
Take or give an amount of gold to the player
Pop = 4
Take or give an amount of population to the player
Free = 214
A free unit (Elite Kipchak)
Two units in the game use this attribute : Elite Kipchak and Urus Khan (migth be creatable on some campaingn scenario)
TownCenter = 218
A town center slot either in dark age (UNKOWN RTWC1X) or in feudal age for Cumans (UNKOWN RTWC2X)
TeamBonusCounter = 219
Also for Elite Kipchak and Urus Khan, decrease the number of available unit (10 For Kipchak)
None = 65_535
This can be ignored
Trait Implementations§
Source§impl Clone for ResourceUsageType
impl Clone for ResourceUsageType
Source§fn clone(&self) -> ResourceUsageType
fn clone(&self) -> ResourceUsageType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceUsageType
impl Debug for ResourceUsageType
Source§impl Enum for ResourceUsageType
impl Enum for ResourceUsageType
Source§type Discriminant = u16
type Discriminant = u16
The type used to store the enum discriminant
Source§fn discriminator(&self) -> Self::Discriminant
fn discriminator(&self) -> Self::Discriminant
Gets the discriminator of the current variant.
Source§impl Parcel for ResourceUsageType
impl Parcel for ResourceUsageType
Source§fn read_field(
__io_reader: &mut dyn Read,
__settings: &Settings,
_: &mut Hints,
) -> Result<Self, Error>
fn read_field( __io_reader: &mut dyn Read, __settings: &Settings, _: &mut Hints, ) -> Result<Self, Error>
Reads a value from a stream. Read more
Source§fn write_field(
&self,
__io_writer: &mut dyn Write,
__settings: &Settings,
_: &mut Hints,
) -> Result<(), Error>
fn write_field( &self, __io_writer: &mut dyn Write, __settings: &Settings, _: &mut Hints, ) -> Result<(), Error>
Writes a value to a stream.
Source§fn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
fn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
Reads a new item with a fresh set of hints. Read more
Source§fn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
fn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
Writes a value to a stream.
Source§fn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
fn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
Convers the value into a byte stream that implements
std::io::Read.Source§fn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
fn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
Source§fn field_from_raw_bytes(
bytes: &[u8],
settings: &Settings,
hints: &mut Hints,
) -> Result<Self, Error>
fn field_from_raw_bytes( bytes: &[u8], settings: &Settings, hints: &mut Hints, ) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
Source§fn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
fn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
Gets the raw byte representation of the value.
Source§impl PartialEq for ResourceUsageType
impl PartialEq for ResourceUsageType
Source§impl PartialOrd for ResourceUsageType
impl PartialOrd for ResourceUsageType
impl StructuralPartialEq for ResourceUsageType
Auto Trait Implementations§
impl Freeze for ResourceUsageType
impl RefUnwindSafe for ResourceUsageType
impl Send for ResourceUsageType
impl Sync for ResourceUsageType
impl Unpin for ResourceUsageType
impl UnwindSafe for ResourceUsageType
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