use crate::event::Event;
use crate::modding::{ModHandle, PluginControl};
use std::path::PathBuf;
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct DynamicEvent {
pub event_type: String,
pub data: serde_json::Value,
}
impl Event for DynamicEvent {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ModLoadRequested {
pub path: PathBuf,
}
impl Event for ModLoadRequested {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ModLoadedEvent {
pub handle: ModHandle,
}
impl Event for ModLoadedEvent {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ModLoadFailedEvent {
pub path: PathBuf,
pub error: String,
}
impl Event for ModLoadFailedEvent {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ModUnloadRequested {
pub mod_id: String,
}
impl Event for ModUnloadRequested {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ModUnloadedEvent {
pub mod_id: String,
}
impl Event for ModUnloadedEvent {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PluginControlRequested {
pub control: PluginControl,
pub source_mod: Option<String>,
}
impl Event for PluginControlRequested {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PluginEnabledEvent {
pub plugin_name: String,
}
impl Event for PluginEnabledEvent {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PluginDisabledEvent {
pub plugin_name: String,
}
impl Event for PluginDisabledEvent {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PluginParameterChangedEvent {
pub plugin_name: String,
pub key: String,
pub value: serde_json::Value,
}
impl Event for PluginParameterChangedEvent {}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PluginHookTriggeredEvent {
pub plugin_name: String,
pub hook_name: String,
pub data: serde_json::Value,
}
impl Event for PluginHookTriggeredEvent {}