diff --git a/CHANGELOG.md b/CHANGELOG.md index 48badb9df2..0444ed08f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Plugin can now retrieve data from ECS - Added chat commands for inviting, kicking, leaving, and promoting in groups - Aura system - Campfire resting heal diff --git a/assets/plugins/hello.wasm b/assets/plugins/hello.wasm deleted file mode 100644 index 86ca77d284..0000000000 Binary files a/assets/plugins/hello.wasm and /dev/null differ diff --git a/assets/plugins/plugin1.plugin.tar b/assets/plugins/plugin1.plugin.tar deleted file mode 100644 index 51cb41424c..0000000000 Binary files a/assets/plugins/plugin1.plugin.tar and /dev/null differ diff --git a/common/src/comp/mod.rs b/common/src/comp/mod.rs index 7347999cf3..7435de6a55 100644 --- a/common/src/comp/mod.rs +++ b/common/src/comp/mod.rs @@ -76,8 +76,8 @@ pub use self::{ misc::Object, ori::Ori, phys::{ - Collider, ForceUpdate, Gravity, Mass, PhysicsState, Pos, PreviousVelDtCache, Scale, - Sticky, Vel, + Collider, ForceUpdate, Gravity, Mass, PhysicsState, Pos, PreviousVelDtCache, Scale, Sticky, + Vel, }, player::Player, poise::{Poise, PoiseChange, PoiseSource, PoiseState}, diff --git a/common/sys/src/plugin/working.rs b/common/sys/src/plugin/working.rs deleted file mode 100644 index 73f8817c3d..0000000000 --- a/common/sys/src/plugin/working.rs +++ /dev/null @@ -1,28 +0,0 @@ - - fn raw_retreive_action(env: &EmitActionEnv, ptr: u32, len: u32) -> (u32, i32) { - let memory: &Memory = if let Some(e) = env.memory.get_ref() { - e - } else { - // This should not be possible but I prefer be safer! - tracing::error!("Can't get memory from: `{}` plugin", env.name); - return (); - }; - let memory: MemoryView = memory.view(); - - let str_slice = &memory[ptr as usize..(ptr + len) as usize]; - - let bytes: Vec = str_slice.iter().map(|x| x.get()).collect(); - - let r = env.ecs.load(std::sync::atomic::Ordering::SeqCst); - if r == i32::MAX { - println!("No ECS availible 1"); - return; - } - unsafe { - if let Some(t) = (r as *const World).as_ref() { - println!("We have a pointer there"); - } else { - println!("No ECS availible 2"); - } - } - } \ No newline at end of file diff --git a/plugin/rt/examples/hello.rs b/plugin/rt/examples/hello.rs index f2894b5083..bd4ad051db 100644 --- a/plugin/rt/examples/hello.rs +++ b/plugin/rt/examples/hello.rs @@ -24,7 +24,7 @@ pub fn on_command_testplugin(command: ChatCommandEvent) -> Result, S command .player .get_entity_health() - .expect("Can't get player name"), + .expect("Can't get player health"), command.command_args )]) }