diff --git a/rrplug_template/src/lib.rs b/rrplug_template/src/lib.rs index 7d8a1f3..9a7e207 100644 --- a/rrplug_template/src/lib.rs +++ b/rrplug_template/src/lib.rs @@ -21,8 +21,6 @@ impl Plugin for ExamplePlugin { plugin_data.register_sq_functions(info_example); } - fn main(&self) {} - fn on_engine_load(&self, engine: &EngineLoadType) { let engine = match engine { EngineLoadType::Engine(engine) => engine, @@ -87,8 +85,6 @@ impl Plugin for BasicPlugin { fn initialize(&mut self, plugin_data: &PluginData) { log::info!("yay logging :D"); } - - fn main(&self) {} } entry!(BasicPlugin); diff --git a/src/macros/entry.rs b/src/macros/entry.rs index 52bb0ab..fb97117 100644 --- a/src/macros/entry.rs +++ b/src/macros/entry.rs @@ -15,8 +15,6 @@ /// fn new(_plugin_data: &PluginData) -> Self { /// Self {} /// } -/// -/// fn main(&self) {} /// } /// /// entry!(BasicPlugin); @@ -67,8 +65,6 @@ macro_rules! entry { } log::info!( "plugin static initialized : {}", PLUGIN.get().is_some() ); - - std::thread::spawn(move || PLUGIN.wait().main()); } #[no_mangle] @@ -250,8 +246,6 @@ mod test_entry { fn new(_plugin_data: &PluginData) -> Self { Self {} } - - fn main(&self) {} } entry!(Test); diff --git a/src/plugin.rs b/src/plugin.rs index b3c82f3..1849c8d 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -18,8 +18,6 @@ use crate::{ /// Trait for defining the callbacks and entry point of the plugin /// -/// also provides a thread to run code on (the main function) -/// /// it is unsafe to run any titanfall engine functions on it pub trait Plugin: Any + Sync { /// init function @@ -27,9 +25,6 @@ pub trait Plugin: Any + Sync { /// [`PluginData`] can be used to register sqfunctions and get the northstar version fn new(plugin_data: &PluginData) -> Self; - /// provided separate thread - fn main(&self); - /// called when a dll is loaded with winapi functions by the game (full paths are not provided) /// /// only calls once for each unique dll