#[repr(u8)]pub enum UnitType {
EyeCandy = 10,
Trees = 15,
Flag = 20,
Dopl = 25,
DeadFish = 30,
Bird = 40,
Combatant = 50,
Projectile = 60,
Creatable = 70,
Building = 80,
AoeTrees = 90,
}Variants§
EyeCandy = 10
Basic units like rubble and flares.
Trees = 15
Trees, used to be 90?
Flag = 20
With Speed but mostly flags.
Dopl = 25
Only one unit has this type. AOK, DOPL (id 243) same properties as UtFlag
DeadFish = 30
Dead and fish units. It seems to be unused in SWGB as units just explode and do not leave carcasses.
Bird = 40
Only birds in aoe and ror are of this type.
Combatant = 50
Shared class inherited by combat objects.
Projectile = 60
Projectiles
Creatable = 70
Units that can be created or trained like Army, Villagers and Ships.
Building = 80
Buildings
AoeTrees = 90
Trees in aoe and ror are of this type
Trait Implementations§
Source§impl Enum for UnitType
impl Enum for UnitType
Source§type Discriminant = u8
type Discriminant = u8
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 UnitType
impl Parcel for UnitType
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 PartialOrd for UnitType
impl PartialOrd for UnitType
impl StructuralPartialEq for UnitType
Auto Trait Implementations§
impl Freeze for UnitType
impl RefUnwindSafe for UnitType
impl Send for UnitType
impl Sync for UnitType
impl Unpin for UnitType
impl UnwindSafe for UnitType
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