pub struct NpcView {Show 15 fields
pub id: String,
pub label: String,
pub role: String,
pub x: f32,
pub y: f32,
pub building_id: Option<String>,
pub entity_id: Option<EntityId>,
pub life_state: Option<LifeState>,
pub hp_pct: Option<f32>,
pub can_trade: bool,
pub tile_id: Option<String>,
pub behavior_state: Option<String>,
pub presentation_state: Option<String>,
pub sprite_mode: Option<String>,
pub paperdoll_ref: Option<String>,
}Fields§
§id: String§label: String§role: String§x: f32§y: f32§building_id: Option<String>Postcard always serializes optional fields (no skip_serializing_if) so decode stays aligned.
entity_id: Option<EntityId>Authoritative sim entity for wildlife / combat targets.
life_state: Option<LifeState>§hp_pct: Option<f32>§can_trade: boolTrue when this NPC has buy/sell/teach offers (npc_has_market).
tile_id: Option<String>Gfx sprite sheet id (assets/gfx/sprites/). Client falls back to npc.{id} / npc.{role}.
behavior_state: Option<String>Wildlife FSM state (idle, chase, combat, …) when behavior-driven (debug).
presentation_state: Option<String>Canonical gfx presentation key (combat, pursue, walking, talking, …).
sprite_mode: Option<String>Resolved gfx sprite mode for tile_id (server-computed).
paperdoll_ref: Option<String>Paperdoll skin id (assets/paperdoll/skins/). Client prefers this over tile_id when baked.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NpcView
impl<'de> Deserialize<'de> for NpcView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for NpcView
Auto Trait Implementations§
impl Freeze for NpcView
impl RefUnwindSafe for NpcView
impl Send for NpcView
impl Sync for NpcView
impl Unpin for NpcView
impl UnsafeUnpin for NpcView
impl UnwindSafe for NpcView
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