exec .zenshell files + shell extensions

Co-authored-by: Tristan Poland (Trident_For_U) <tristanpoland@users.noreply.github.com>
This commit is contained in:
Chance 2024-12-06 15:54:31 -05:00 committed by BitSyndicate
parent 1fc704c729
commit 252527ebc0
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 443E4198D6BBA6DE
16 changed files with 494 additions and 37 deletions

View file

@ -0,0 +1,11 @@
[package]
name = "player_lib"
version = "0.1.0"
edition = "2021"
[dependencies]
PebbleVault = "0.6.1"
horizon-plugin-api = "0.1.13"
horizon_data_types = "0.4.0"
socketioxide = "0.15.1"
parking_lot = "0.12.3"

View file

@ -0,0 +1,36 @@
use std::collections::HashMap;
pub use horizon_plugin_api::{LoadedPlugin, Plugin, Pluginstate};
// Define the trait properly
pub trait PluginAPI {
fn test(&self);
}
pub trait PluginConstruct {
fn get_structs(&self) -> Vec<&str>;
// If you want default implementations, mark them with 'default'
fn new(plugins: HashMap<String, (Pluginstate, Plugin)>) -> Plugin;
}
// Implement constructor separately
impl PluginConstruct for Plugin {
fn new(plugins: HashMap<String, (Pluginstate, Plugin)>) -> Plugin {
Plugin {}
}
fn get_structs(&self) -> Vec<&str> {
vec!["MyPlayer"]
}
}
// Implement the trait for Plugin
impl PluginAPI for Plugin {
fn test(&self) {
println!("test");
}
}
//-----------------------------------------------------------------------------
// Plugin Implementation
//-----------------------------------------------------------------------------