From 6fdbdb8816b39960a2a719a241780eb6c93a4627 Mon Sep 17 00:00:00 2001 From: makspll Date: Sat, 7 Sep 2024 16:55:54 +0100 Subject: [PATCH] fix compilation errors in examples --- Cargo.toml | 2 +- examples/lua/bevy_api.rs | 2 +- examples/lua/game_of_life.rs | 2 +- examples/rhai/bevy_api.rs | 2 +- examples/rhai/game_of_life.rs | 2 +- examples/rune/event_recipients.rs | 2 +- examples/rune/minimal.rs | 2 +- examples/wrappers.rs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 900e966d..2af7bbd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ bevy_mod_scripting_common = { path = "crates/bevy_mod_scripting_common", version bevy = { workspace = true, default-features = true } clap = { version = "4.1", features = ["derive"] } rand = "0.8.5" -# bevy_console = "0.11.1" +bevy_console = "0.12" rhai-rand = "0.1" [workspace] diff --git a/examples/lua/bevy_api.rs b/examples/lua/bevy_api.rs index 259081e6..493bec50 100644 --- a/examples/lua/bevy_api.rs +++ b/examples/lua/bevy_api.rs @@ -197,7 +197,7 @@ fn main() -> std::io::Result<()> { .expect("Something went wrong in the script!"); }); - world.send_event(AppExit); + world.send_event(AppExit::Success); }, ); diff --git a/examples/lua/game_of_life.rs b/examples/lua/game_of_life.rs index ed844775..11482c2f 100644 --- a/examples/lua/game_of_life.rs +++ b/examples/lua/game_of_life.rs @@ -95,7 +95,7 @@ pub fn setup( settings.display_grid_dimensions.0 as f32, settings.display_grid_dimensions.1 as f32, )), - color: Color::TOMATO, + color: Color::srgb(1.0, 0.388, 0.278), // TOMATO ..Default::default() }, ..Default::default() diff --git a/examples/rhai/bevy_api.rs b/examples/rhai/bevy_api.rs index b101f0bb..88dcc65c 100644 --- a/examples/rhai/bevy_api.rs +++ b/examples/rhai/bevy_api.rs @@ -171,7 +171,7 @@ fn main() -> std::io::Result<()> { .expect("Something went wrong in the script!"); }); - world.send_event(AppExit); + world.send_event(AppExit::Success); }); app.run(); diff --git a/examples/rhai/game_of_life.rs b/examples/rhai/game_of_life.rs index b9a45401..aa203448 100644 --- a/examples/rhai/game_of_life.rs +++ b/examples/rhai/game_of_life.rs @@ -100,7 +100,7 @@ pub fn setup( settings.display_grid_dimensions.0 as f32, settings.display_grid_dimensions.1 as f32, )), - color: Color::TOMATO, + color: Color::srgb(1.0, 0.388, 0.278), // TOMATO ..Default::default() }, ..Default::default() diff --git a/examples/rune/event_recipients.rs b/examples/rune/event_recipients.rs index d7ec0846..8b469edf 100644 --- a/examples/rune/event_recipients.rs +++ b/examples/rune/event_recipients.rs @@ -115,5 +115,5 @@ fn main() { .add_script_handler::, 0, 0>(PostUpdate) .add_script_host::>(PostUpdate) .add_api_provider::>(Box::new(RuneAPIProvider)) - .run() + .run(); } diff --git a/examples/rune/minimal.rs b/examples/rune/minimal.rs index 3a830307..ff75fbc5 100644 --- a/examples/rune/minimal.rs +++ b/examples/rune/minimal.rs @@ -10,7 +10,7 @@ fn main() { .add_script_host::>(PostUpdate) .add_script_handler::, 0, 1>(PostUpdate) .add_api_provider::>(Box::new(MyAPIProvider)) - .run() + .run(); } struct MyAPIProvider; diff --git a/examples/wrappers.rs b/examples/wrappers.rs index 734c9f9b..fb085ea5 100644 --- a/examples/wrappers.rs +++ b/examples/wrappers.rs @@ -111,7 +111,7 @@ fn main() -> std::io::Result<()> { .expect("Could not find MyProxiedStruct Resource"); println!("After the script MyProxiedStruct resource is now: {my_thing:#?}"); // exit app - world.send_event(AppExit); + world.send_event(AppExit::Success); }); app.run();