use serde::{Deserialize, Serialize}; use uuid::Uuid; /// Payload components pub mod components; /// Payload steganographically embedded into asset files #[derive(Serialize, Deserialize, Default, Clone, Debug)] pub struct DirworldEntityPayload { /// Unique identifier for this entity, used by conditional system pub id: Uuid, /// Transform of this entity pub transform: components::Transform, /// Name for this entity pub name: Option, /// Actor information for this entity pub actor: Option, /// Voice information for this entity pub voice: Option, /// Rigidbody for this entity pub rigidbody: Option, /// Mesh collider information for this entity pub mesh_collider: Option, /// Lua scripts for this entity pub scripts: Option>, /// Relationships for this entity pub relationships: Option, /// Pickup information for this entity pub pickup: Option, /// Door destination pub door_destination: Option, } impl DirworldEntityPayload { /// Create a new default payload with a randomized UUID pub fn new() -> Self { Self { id: Uuid::new_v4(), ..Default::default() } } }