#[repr(u32)]pub enum Body {
Show 19 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),
Plugin(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)
Plugin(Body)
Implementations§
§impl Body
impl Body
pub fn elim<'a, Elim, Context, S, Type>(
&'a self,
elim: Elim,
context: Context,
) -> (Type, S)where
Elim: Typed<((&'a Body,), Context), Type, S>,
pub fn elim_case_pure<'a, Type>( &self, cases: &'a ElimCase<Cases<Pure<Type>>>, ) -> &'a Type
pub fn elim_case_weak<'a, 'b, Type>(
&'a self,
cases: &'b <WeakHead<Body, Type> as SynthTyped<((Body,), ()), Type>>::Expr,
) -> &'b Typewhere
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>,
WeakHead<Body, Type>: SynthTyped<((Body,), ()), Type>,
&'b <WeakHead<Body, Type> as SynthTyped<((Body,), ()), Type>>::Expr: Typed<((&'a Body,), ()), &'b Type, ()>,
§impl Body
impl Body
pub fn is_same_species_as(&self, other: &Body) -> bool
pub fn is_humanoid(&self) -> bool
pub fn is_campfire(&self) -> bool
pub fn is_portal(&self) -> bool
pub fn bleeds(&self) -> bool
pub fn stride_length(&self) -> f32
pub fn stride_length(&self) -> f32
The length of the stride of the body, in metres (not accounting for different legs)
pub fn scale(&self) -> Scale
pub fn mass(&self) -> Mass
pub fn dimensions(&self) -> Vec3<f32>
pub fn dimensions(&self) -> Vec3<f32>
The width (shoulder to shoulder), length (nose to tail) and height respectively (in metres)
pub fn max_radius(&self) -> f32
pub fn front_radius(&self) -> f32
pub fn min_radius(&self) -> f32
pub fn sausage(&self) -> (Vec2<f32>, Vec2<f32>, f32)
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.
pub fn spacing_radius(&self) -> f32
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.
pub fn base_energy(&self) -> u16
pub fn base_health(&self) -> u16
pub fn flying_height(&self) -> f32
pub fn immune_to(&self, buff: BuffKind) -> bool
pub fn combat_multiplier(&self) -> f32
pub fn combat_multiplier(&self) -> f32
Returns a multiplier representing increased difficulty not accounted for due to AI or not using an actual weapon
pub fn base_poise(&self) -> u16
pub fn eye_height(&self, scale: f32) -> f32
pub fn eye_height(&self, scale: f32) -> f32
Returns the eye height for this creature.
pub fn default_light_offset(&self) -> Vec3<f32>
pub fn can_strafe(&self) -> bool
pub fn mount_offset(&self) -> Vec3<f32>
pub fn mount_offset(&self) -> Vec3<f32>
Component of the mounting offset specific to the mount
pub fn rider_offset(&self) -> Vec3<f32>
pub fn rider_offset(&self) -> Vec3<f32>
Component of the mounting offset specific to the rider
pub fn tether_offset_leader(&self) -> Vec3<f32>
pub fn tether_offset_follower(&self) -> Vec3<f32>
pub fn localize_npc(&self) -> Content
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.
pub fn humanoid_gender(&self) -> Option<Gender>
pub fn humanoid_gender(&self) -> Option<Gender>
Read comment on Gender
for more
§impl Body
impl Body
pub fn base_accel(&self) -> f32
pub fn air_accel(&self) -> f32
pub fn max_speed_approx(&self) -> f32
pub fn max_speed_approx(&self) -> f32
Attempt to determine the maximum speed of the character when moving on the ground
pub fn base_ori_rate(&self) -> f32
pub fn base_ori_rate(&self) -> f32
The turn rate in 180°/s (or (rotations per second)/2)
pub fn swim_thrust(&self) -> Option<f32>
pub fn swim_thrust(&self) -> Option<f32>
Returns thrust force if the body type can swim, otherwise None
pub fn fly_thrust(&self) -> Option<f32>
pub fn fly_thrust(&self) -> Option<f32>
Returns thrust force if the body type can fly, otherwise None
pub fn jump_impulse(&self) -> Option<f32>
pub fn jump_impulse(&self) -> Option<f32>
Returns jump impulse if the body type can jump, otherwise None
pub fn can_climb(&self) -> bool
pub fn reverse_move_factor(&self) -> f32
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)
Trait Implementations§
§impl<'de> Deserialize<'de> for Body
impl<'de> Deserialize<'de> for Body
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Body, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Body, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<Body> for EcsCompPacket
impl From<Body> for EcsCompPacket
source§fn from(other: Body) -> EcsCompPacket
fn from(other: Body) -> EcsCompPacket
§impl<'a, BodyMeta, SpeciesMeta> Index<&'a Body> for AllBodies<BodyMeta, SpeciesMeta>
impl<'a, BodyMeta, SpeciesMeta> Index<&'a Body> for AllBodies<BodyMeta, SpeciesMeta>
Can only retrieve body metadata by direct index.
source§impl NetSync for Body
impl NetSync for Body
source§const SYNC_FROM: SyncFrom = SyncFrom::AnyEntity
const SYNC_FROM: SyncFrom = SyncFrom::AnyEntity
source§fn pre_insert(&mut self, world: &World)
fn pre_insert(&mut self, world: &World)
source§fn pre_modify(&mut self, world: &World)
fn pre_modify(&mut self, world: &World)
§impl Ord for Body
impl Ord for Body
§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>,
WeakHead<Body, Target>: SynthTyped<((Body,), ()), Target>,
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>,
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
type Plugin = <WeakHead<Body, Target> as SynthTyped<((Body,), ()), Target>>::Expr
§impl PartialOrd for Body
impl PartialOrd for Body
§fn partial_cmp(&self, other: &Body) -> Option<Ordering>
fn partial_cmp(&self, other: &Body) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more§impl Serialize for Body
impl Serialize for Body
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl TryFrom<EcsCompPacket> for Body
impl TryFrom<EcsCompPacket> for Body
impl Copy for Body
impl Eq for Body
impl StructuralPartialEq for Body
Auto Trait Implementations§
impl Freeze for Body
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> 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
§fn convert_into<F>(
&self,
_: F,
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F, ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
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>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F, ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
try_default
and panics on an error case.