#[repr(u32)]
pub enum Body {
Show 18 variants Humanoid(Body), QuadrupedSmall(Body), QuadrupedMedium(Body), BirdMedium(Body), FishMedium(Body), Dragon(Body), BirdLarge(Body), FishSmall(Body), BipedLarge(Body), BipedSmall(Body), Object(Body), Golem(Body), Theropod(Body), QuadrupedLow(Body), Ship(Body), Arthropod(Body), ItemDrop(Body), Crustacean(Body),
}

Variants§

§

Humanoid(Body)

§

QuadrupedSmall(Body)

§

QuadrupedMedium(Body)

§

BirdMedium(Body)

§

FishMedium(Body)

§

Dragon(Body)

§

BirdLarge(Body)

§

FishSmall(Body)

§

BipedLarge(Body)

§

BipedSmall(Body)

§

Object(Body)

§

Golem(Body)

§

Theropod(Body)

§

QuadrupedLow(Body)

§

Ship(Body)

§

Arthropod(Body)

§

ItemDrop(Body)

§

Crustacean(Body)

Implementations§

source§

impl Body

source

pub fn elim<'a, Elim, Context, S, Type>( &'a self, elim: Elim, context: Context ) -> (Type, S)
where Elim: Typed<((&'a Body,), Context), Type, S>,

source

pub fn elim_case_pure<'a, Type>(&self, cases: &'a PureCases<Type>) -> &'a Type

source

pub fn elim_case_weak<'a, 'b, Type>( &'a self, cases: &'b ElimWeak<Self, Type> ) -> &'b Type
where WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>, &'b ElimWeak<Self, Type>: Typed<((&'a Body,), ()), &'b Type, ()>,

source§

impl Body

source

pub fn is_same_species_as(&self, other: &Body) -> bool

source

pub fn is_humanoid(&self) -> bool

source

pub fn is_campfire(&self) -> bool

source

pub fn is_portal(&self) -> bool

source

pub fn bleeds(&self) -> bool

source

pub fn stride_length(&self) -> f32

The length of the stride of the body, in metres (not accounting for different legs)

source

pub fn scale(&self) -> Scale

source

pub fn density(&self) -> Density

Average density of the body

source

pub fn mass(&self) -> Mass

source

pub fn dimensions(&self) -> Vec3<f32>

The width (shoulder to shoulder), length (nose to tail) and height respectively (in metres)

source

pub fn max_radius(&self) -> f32

source

pub fn min_radius(&self) -> f32

source

pub fn sausage(&self) -> (Vec2<f32>, Vec2<f32>, f32)

Base of our Capsule Prism used for collisions. Returns line segment and radius. See this wiki page.

source

pub fn collider(&self) -> Collider

Body collider

source

pub fn spacing_radius(&self) -> f32

How far away other entities should try to be. Will be added upon the other entity’s spacing_radius. So an entity with 2.0 and an entity with 3.0 will lead to that both entities will try to keep 5.0 units away from each other.

source

pub fn height(&self) -> f32

Height from the bottom to the top (in metres)

source

pub fn base_energy(&self) -> u16

source

pub fn base_health(&self) -> u16

source

pub fn flying_height(&self) -> f32

source

pub fn immune_to(&self, buff: BuffKind) -> bool

source

pub fn combat_multiplier(&self) -> f32

Returns a multiplier representing increased difficulty not accounted for due to AI or not using an actual weapon

source

pub fn base_poise(&self) -> u16

source

pub fn eye_height(&self, scale: f32) -> f32

Returns the eye height for this creature.

source

pub fn default_light_offset(&self) -> Vec3<f32>

source

pub fn can_strafe(&self) -> bool

source

pub fn mount_offset(&self) -> Vec3<f32>

Component of the mounting offset specific to the mount

source

pub fn rider_offset(&self) -> Vec3<f32>

Component of the mounting offset specific to the rider

source

pub fn tether_offset_leader(&self) -> Vec3<f32>

source

pub fn tether_offset_follower(&self) -> Vec3<f32>

source

pub fn localize_npc(&self) -> Content

Should be only used with npc-tell_monster.

If you want to use for displaying names in HUD, add new strings. If you want to use for anything else, add new strings.

source

pub fn humanoid_gender(&self) -> Option<Gender>

Read comment on Gender for more

source§

impl Body

source

pub fn aerodynamic_forces( &self, rel_flow: &Vel, fluid_density: f32, wings: Option<&Wings>, scale: f32 ) -> Vec3<f32>

source

pub fn drag_coefficient_liquid(&self, fluid_density: f32, scale: f32) -> f32

Physically incorrect (but relatively dt-independent) way to calculate drag coefficients for liquids.

source

fn parasite_drag(&self, scale: f32) -> f32

Parasite drag is the sum of pressure drag and skin friction. Skin friction is the drag arising from the shear forces between a fluid and a surface, while pressure drag is due to flow separation. Both are viscous effects.

source§

impl Body

source

pub fn base_accel(&self) -> f32

source

pub fn air_accel(&self) -> f32

source

pub fn max_speed_approx(&self) -> f32

Attempt to determine the maximum speed of the character when moving on the ground

source

pub fn base_ori_rate(&self) -> f32

The turn rate in 180°/s (or (rotations per second)/2)

source

pub fn swim_thrust(&self) -> Option<f32>

Returns thrust force if the body type can swim, otherwise None

source

pub fn fly_thrust(&self) -> Option<f32>

Returns thrust force if the body type can fly, otherwise None

source

pub fn jump_impulse(&self) -> Option<f32>

Returns jump impulse if the body type can jump, otherwise None

source

pub fn can_climb(&self) -> bool

source

pub fn reverse_move_factor(&self) -> f32

Returns how well a body can move backwards while strafing (0.0 = not at all, 1.0 = same as forward)

source

pub fn projectile_offsets(&self, ori: Vec3<f32>, scale: f32) -> Vec3<f32>

Returns the position where a projectile should be fired relative to this body

Trait Implementations§

source§

impl Clone for Body

source§

fn clone(&self) -> Body

Returns a copy 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 Component for Body

§

type Storage = DerefFlaggedStorage<Body, VecStorage<Body>>

Associated storage type for this component.
source§

impl Debug for Body

source§

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

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

impl Default for Body

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Body

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 Display for Body

source§

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

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

impl<'a> From<&'a Body> for Psyche

source§

fn from(body: &'a Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl From<Body> for Body

source§

fn from(body: Body) -> Self

Converts to this type from the input type.
source§

impl Hash for Body

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<'a, BodyMeta, SpeciesMeta> Index<&'a Body> for AllBodies<BodyMeta, SpeciesMeta>

Can only retrieve body metadata by direct index.

§

type Output = BodyMeta

The returned type after indexing.
source§

fn index(&self, index: &Body) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Ord for Body

source§

fn cmp(&self, other: &Body) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<Target> PackedElim for WeakHead<Body, Target>
where WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>,

§

type Humanoid = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type QuadrupedSmall = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type QuadrupedMedium = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type BirdMedium = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type FishMedium = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type Dragon = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type BirdLarge = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type FishSmall = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type BipedLarge = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type BipedSmall = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type Object = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type Golem = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type Theropod = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type QuadrupedLow = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type Ship = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type Arthropod = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type ItemDrop = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

§

type Crustacean = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr

source§

impl PartialEq for Body

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Body

source§

fn partial_cmp(&self, other: &Body) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Body

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<Context, Target> SynthTyped<((Body,), Context), Target> for WeakHead<Body, Target>
where WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>, WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>,

§

type Expr = ElimCase<Cases<WeakHead<Body, Target>>>

source§

impl Copy for Body

source§

impl Eq for Body

source§

impl StructuralEq for Body

source§

impl StructuralPartialEq for Body

Auto Trait Implementations§

§

impl RefUnwindSafe for Body

§

impl Send for Body

§

impl Sync for Body

§

impl Unpin for Body

§

impl UnwindSafe for Body

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
§

impl<T> CallHasher for T
where T: Hash,

§

fn get_hash<H>(&self, hasher: H) -> u64
where H: Hasher,

§

impl<T> CallHasher for T
where T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<C, M> ConvertSaveload<M> for C

§

type Data = C

(De)Serializable data representation for data type
§

type Error = Infallible

Error may occur during serialization or deserialization of component
§

fn convert_into<F>( &self, _: F ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
where F: FnMut(Entity) -> Option<M>,

Convert this data type into serializable form (Data) using entity to marker mapping function
§

fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F ) -> Result<C, <C as ConvertSaveload<M>>::Error>
where F: FnMut(M) -> Option<Entity>,

Convert this data from a deserializable form (Data) using entity to marker mapping function
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<Context> SubContext<Context> for Context

source§

fn sub_context(self) -> Context

source§

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

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryDefault for T
where T: Default,

§

fn try_default() -> Result<T, String>

Tries to create the default.
§

fn unwrap_default() -> Self

Calls try_default and panics on an error case.
source§

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

§

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>,

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

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

§

impl<T> Event for T
where T: Send + Sync + 'static,

§

impl<T> Resource for T
where T: Any + Send + Sync,