Skip to content

Commit 8b86ec2

Browse files
committed
some cleanup
1 parent ac8c18f commit 8b86ec2

File tree

1 file changed

+6
-18
lines changed
  • crates/languages/bevy_mod_scripting_rhai/src

1 file changed

+6
-18
lines changed

crates/languages/bevy_mod_scripting_rhai/src/lib.rs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ pub struct RhaiScriptingPlugin {
4747
pub scripting_plugin: ScriptingPlugin<RhaiScriptingPlugin>,
4848
}
4949

50+
impl AsMut<ScriptingPlugin<Self>> for RhaiScriptingPlugin {
51+
fn as_mut(&mut self) -> &mut ScriptingPlugin<Self> {
52+
&mut self.scripting_plugin
53+
}
54+
}
55+
5056
impl Default for RhaiScriptingPlugin {
5157
fn default() -> Self {
5258
RhaiScriptingPlugin {
@@ -155,24 +161,6 @@ impl Plugin for RhaiScriptingPlugin {
155161
fn build(&self, app: &mut bevy::prelude::App) {
156162
self.scripting_plugin.build(app);
157163
}
158-
159-
fn cleanup(&self, _app: &mut bevy::prelude::App) {
160-
// let mut runtime = app
161-
// .world_mut()
162-
// .get_non_send_resource_mut::<RuntimeContainer<Self>>()
163-
// .expect("Rhai runtime not found");
164-
// let engine = &mut runtime.runtime;
165-
// let function_registry = app
166-
// .world_mut()
167-
// .get_resource_or_init::<AppScriptFunctionRegistry>();
168-
169-
// let function_registry = function_registry.read();
170-
171-
// for (k, func) in function_registry.iter_all() {
172-
// let rhai_func = to_rhai_fn(func.clone());
173-
// // engine.register_fn("func", rhai_func);
174-
// }
175-
}
176164
}
177165

178166
pub fn rhai_context_load(

0 commit comments

Comments
 (0)