Struct WeaponDef

Source
pub struct WeaponDef {
    pub ai_id: i32,
    pub weapon_def_id: i32,
}

Fields§

§ai_id: i32§weapon_def_id: i32

Implementations§

Source§

impl WeaponDef

Source

pub fn name(&self) -> Result<String, Box<dyn Error>>

Source

pub fn description(&self) -> Result<String, Box<dyn Error>>

Source

pub fn range(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn spray_angle(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn moving_accuracy(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn target_move_error(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn lead_limit(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn lead_bonus(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn predict_boost(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn paralyze_damage_time(&self) -> Result<i32, Box<dyn Error>>

Source

pub fn impulse_factor(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn impulse_boost(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn crater_multiplier(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn crater_boost(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn area_of_effect(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn self_damage(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn fire_starter(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn edge_effectivness(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn size(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn size_growth(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn collision_size(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn salvo_size(&self) -> Result<i32, Box<dyn Error>>

Source

pub fn salvo_delay(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn reload(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn beam_time(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn beam_burst(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn bounce(&self) -> WeaponBounce

Source

pub fn max_angle(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn up_time(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn flight_time(&self) -> Result<i32, Box<dyn Error>>

Source

pub fn cost(&self, resource: Resource) -> Result<f32, Box<dyn Error>>

Source

pub fn projectiles_per_shot(&self) -> Result<i32, Box<dyn Error>>

Source

pub fn turret(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn only_forward(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn fixed_launcher(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn water_weapon(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn fire_submersed(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn sub_missile(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn tracks(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn dropped(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn paralyzer(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn impact_only(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn auto_target(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn manual_fire(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn interceptor(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn targetable(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn stockpileable(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn stockpile_time(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn interceptor_coverage_range(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn intensity(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn duration(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn fall_off_rate(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn sound_trigger(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn self_explode(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn gravity_affected(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn trajectory_height(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn trajectory(&self) -> Result<Trajectory, Box<dyn Error>>

Source

pub fn gravity(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn explode(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn start_velocity(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn max_velocity(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn weapon_acceleration(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn turn_rate(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn projectile_speed(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn explosion_speed(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn wobble(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn dance(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn large_beam_laser(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn shield(&self) -> Result<Option<WeaponShield>, Box<dyn Error>>

Source

pub fn avoid_friendly(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn avoid_feature(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn avoid_neutral(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn target_border(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn cylinder_targetting(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn minimum_intensity(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn height_boost_factor(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn proximity_priority(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn sweep_fire(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn able_to_attack_ground(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn dynamic_damage_exponent(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn dynamic_damage_minimum(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn dynamic_damage_range(&self) -> Result<f32, Box<dyn Error>>

Source

pub fn dynamic_damage_inverted(&self) -> Result<bool, Box<dyn Error>>

Source

pub fn all(&self) -> Result<WeaponDefAll, Box<dyn Error>>

Trait Implementations§

Source§

impl Clone for WeaponDef

Source§

fn clone(&self) -> WeaponDef

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WeaponDef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for WeaponDef

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Hash for WeaponDef

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for WeaponDef

Source§

fn eq(&self, other: &WeaponDef) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for WeaponDef

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for WeaponDef

Source§

impl Eq for WeaponDef

Source§

impl StructuralPartialEq for WeaponDef

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,