use super::state::EntityPosition;
use super::types::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelStartRequested {
pub entity_id: EntityId,
pub from: LocationId,
pub to: LocationId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelCancelRequested {
pub entity_id: EntityId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelPauseRequested {
pub entity_id: EntityId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelResumeRequested {
pub entity_id: EntityId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct EntityTeleportRequested {
pub entity_id: EntityId,
pub location_id: LocationId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct LocationDiscoverRequested {
pub entity_id: EntityId,
pub location_id: LocationId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelStartedEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub from: LocationId,
pub to: LocationId,
pub estimated_duration: f32,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelProgressEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub progress: f32,
pub current_position: Position,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelCompletedEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub destination: LocationId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelCancelledEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub progress: f32,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelPausedEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub progress: f32,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TravelResumedEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub progress: f32,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct EncounterTriggeredEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub encounter: Encounter,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct EncounterResolvedEvent {
pub entity_id: EntityId,
pub travel_id: TravelId,
pub encounter_id: EncounterId,
pub success: bool,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct LocationDiscoveredEvent {
pub entity_id: EntityId,
pub location_id: LocationId,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct EntityPositionChangedEvent {
pub entity_id: EntityId,
pub old_position: Option<EntityPosition>,
pub new_position: EntityPosition,
}