From 9ca5affb10adee12f6b3467e89850aadc218f1db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:56:03 +0000 Subject: [PATCH] chore(codegen): update bevy bindings --- .../src/bevy_bindings/bevy_core.rs | 20 +- .../src/bevy_bindings/bevy_ecs.rs | 120 ++-- .../src/bevy_bindings/bevy_hierarchy.rs | 44 +- .../src/bevy_bindings/bevy_input.rs | 590 +++++++++--------- .../src/bevy_bindings/bevy_time.rs | 54 +- .../src/bevy_bindings/bevy_transform.rs | 84 +-- 6 files changed, 456 insertions(+), 456 deletions(-) diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs index 40d8b763..d63e5304 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs @@ -20,6 +20,16 @@ impl ::bevy::app::Plugin for BevyCoreScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); NamespaceBuilder::<::bevy::core::prelude::Name>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -32,16 +42,6 @@ impl ::bevy::app::Plugin for BevyCoreScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs index 61876850..1d6a83a7 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs @@ -19,6 +19,16 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); NamespaceBuilder::<::bevy::ecs::entity::Entity>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "from_raw", |index: u32| { @@ -69,16 +79,6 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -107,29 +107,6 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { output }, ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "new", |index: usize| { @@ -149,12 +126,11 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::ecs::component::Tick>::new(world) + ) .register( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + "clone", + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); @@ -164,16 +140,17 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { .register( "eq", | - _self: Ref, - other: Ref| + _self: Ref, + other: Ref| { - let output: bool = >::eq(&_self, &other) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::ecs::component::Tick>::new(world) .register( "new", |tick: u32| { @@ -217,26 +194,39 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { }, ) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::ecs::component::ComponentTicks>::new(world) + ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::ecs::component::ComponentTicks>::new(world) .register( "is_added", | @@ -292,6 +282,16 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::ecs::identifier::Identifier>::new(world) .register( @@ -307,16 +307,6 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "low", |_self: Val| { @@ -356,6 +346,16 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::ecs::entity::EntityHash>::new(world) .register( diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs index a47dda82..d3795e58 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs @@ -38,6 +38,16 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { }, ); NamespaceBuilder::<::bevy::hierarchy::prelude::Parent>::new(world) + .register( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -50,30 +60,17 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::hierarchy::HierarchyEvent>::new(world) .register( "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::hierarchy::HierarchyEvent>::new(world) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, ) .register( "clone", @@ -86,11 +83,14 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs index f26675ec..94ca40bb 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs @@ -86,11 +86,14 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { ); NamespaceBuilder::<::bevy::input::gamepad::GamepadAxis>::new(world) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, @@ -106,19 +109,26 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) .into(); output }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadButton>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -141,16 +151,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadSettings>::new(world) .register( @@ -198,16 +198,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ); NamespaceBuilder::<::bevy::input::mouse::MouseButton>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "assert_receiver_is_total_eq", |_self: Ref| { @@ -230,18 +220,18 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::input::touch::TouchInput>::new(world) + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::touch::TouchInput>::new(world) .register( "eq", | @@ -254,27 +244,24 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::input::keyboard::KeyboardFocusLost>::new(world) + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::keyboard::KeyboardFocusLost>::new(world) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) .into(); output }, @@ -288,21 +275,21 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::input::keyboard::KeyboardInput>::new(world) + ) .register( "eq", | - _self: Ref, - other: Ref| + _self: Ref, + other: Ref| { - let output: bool = >::eq(&_self, &other) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::keyboard::KeyboardInput>::new(world) .register( "assert_receiver_is_total_eq", |_self: Ref| { @@ -322,6 +309,19 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, ); NamespaceBuilder::<::bevy::input::mouse::AccumulatedMouseMotion>::new(world) .register( @@ -348,6 +348,16 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ); NamespaceBuilder::<::bevy::input::mouse::AccumulatedMouseScroll>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -360,16 +370,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::mouse::MouseButtonInput>::new(world) .register( @@ -382,6 +382,19 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { output }, ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "assert_receiver_is_total_eq", |_self: Ref| { @@ -391,29 +404,40 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ); + NamespaceBuilder::<::bevy::input::mouse::MouseMotion>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ) .register( "eq", | - _self: Ref, - other: Ref| + _self: Ref, + other: Ref| { - let output: bool = >::eq(&_self, &other) .into(); output }, ); - NamespaceBuilder::<::bevy::input::mouse::MouseMotion>::new(world) + NamespaceBuilder::<::bevy::input::mouse::MouseWheel>::new(world) .register( "eq", | - _self: Ref, - other: Ref| + _self: Ref, + other: Ref| { - let output: bool = >::eq(&_self, &other) .into(); output @@ -421,39 +445,25 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, ); - NamespaceBuilder::<::bevy::input::mouse::MouseWheel>::new(world) + NamespaceBuilder::<::bevy::input::gamepad::GamepadAxisChangedEvent>::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ); - NamespaceBuilder::<::bevy::input::gamepad::GamepadAxisChangedEvent>::new(world) .register( "eq", | @@ -466,16 +476,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadButtonChangedEvent>::new(world) .register( @@ -516,6 +516,16 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { output }, ) + .register( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -528,16 +538,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadConnection>::new(world) .register( @@ -565,9 +565,19 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { ); NamespaceBuilder::<::bevy::input::gamepad::GamepadConnectionEvent>::new(world) .register( - "clone", + "connected", |_self: Ref| { - let output: Val = ::clone( + let output: bool = bevy::input::gamepad::GamepadConnectionEvent::connected( + &_self, + ) + .into(); + output + }, + ) + .register( + "disconnected", + |_self: Ref| { + let output: bool = bevy::input::gamepad::GamepadConnectionEvent::disconnected( &_self, ) .into(); @@ -588,26 +598,26 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "connected", + "clone", |_self: Ref| { - let output: bool = bevy::input::gamepad::GamepadConnectionEvent::connected( + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::GamepadEvent>::new(world) .register( - "disconnected", - |_self: Ref| { - let output: bool = bevy::input::gamepad::GamepadConnectionEvent::disconnected( + "clone", + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::gamepad::GamepadEvent>::new(world) + ) .register( "eq", | @@ -620,18 +630,18 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::GamepadInput>::new(world) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::gamepad::GamepadInput>::new(world) + ) .register( "eq", | @@ -654,16 +664,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadRumbleRequest>::new(world) .register( @@ -679,6 +679,16 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { NamespaceBuilder::< ::bevy::input::gamepad::RawGamepadAxisChangedEvent, >::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -691,20 +701,22 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::< + ::bevy::input::gamepad::RawGamepadButtonChangedEvent, + >::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val< + bevy::input::gamepad::RawGamepadButtonChangedEvent, + > = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::< - ::bevy::input::gamepad::RawGamepadButtonChangedEvent, - >::new(world) + ) .register( "eq", | @@ -717,20 +729,18 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::RawGamepadEvent>::new(world) .register( "clone", - |_self: Ref| { - let output: Val< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - > = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::gamepad::RawGamepadEvent>::new(world) + ) .register( "eq", | @@ -738,18 +748,8 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { other: Ref| { let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) + bevy::input::gamepad::RawGamepadEvent, + >>::eq(&_self, &other) .into(); output }, @@ -803,16 +803,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ); NamespaceBuilder::<::bevy::input::gestures::DoubleTapGesture>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -825,8 +815,28 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::input::gestures::PanGesture>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -839,18 +849,26 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::ButtonState>::new(world) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::ButtonState>::new(world) + ) + .register( + "is_pressed", + |_self: Ref| { + let output: bool = bevy::input::ButtonState::is_pressed(&_self) + .into(); + output + }, + ) .register( "eq", | @@ -873,26 +891,21 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::ButtonSettings>::new(world) .register( - "is_pressed", - |_self: Ref| { - let output: bool = bevy::input::ButtonState::is_pressed(&_self) + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, ) - .register( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - }, - ); - NamespaceBuilder::<::bevy::input::gamepad::ButtonSettings>::new(world) .register( "clone", |_self: Ref| { @@ -966,21 +979,21 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::AxisSettings>::new(world) .register( "eq", | - _self: Ref, - other: Ref| + _self: Ref, + other: Ref| { - let output: bool = >::eq(&_self, &other) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::gamepad::AxisSettings>::new(world) + ) .register( "livezone_upperbound", |_self: Ref| { @@ -1113,19 +1126,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { output }, ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) .register( "clone", |_self: Ref| { @@ -1137,16 +1137,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ); NamespaceBuilder::<::bevy::input::gamepad::ButtonAxisSettings>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "filter", | @@ -1162,8 +1152,31 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadRumbleIntensity>::new(world) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "clone", |_self: Ref| { @@ -1193,31 +1206,8 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::keyboard::Key>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -1240,8 +1230,28 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::input::keyboard::NativeKeyCode>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -1264,16 +1274,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::keyboard::NativeKey>::new(world) .register( @@ -1311,11 +1311,14 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { ); NamespaceBuilder::<::bevy::input::mouse::MouseScrollUnit>::new(world) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, @@ -1331,32 +1334,16 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) .into(); output }, ); NamespaceBuilder::<::bevy::input::touch::TouchPhase>::new(world) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) .register( "clone", |_self: Ref| { @@ -1376,21 +1363,21 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::input::touch::ForceTouch>::new(world) + ) .register( "eq", | - _self: Ref, - other: Ref| + _self: Ref, + other: Ref| { - let output: bool = >::eq(&_self, &other) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::touch::ForceTouch>::new(world) .register( "clone", |_self: Ref| { @@ -1400,6 +1387,19 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, ); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs index a74d5cac..fff76203 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs @@ -52,19 +52,6 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { output }, ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) .register( "from_seconds", |duration: f32, mode: Val| { @@ -201,6 +188,19 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { output }, ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "clone", |_self: Ref| { @@ -258,9 +258,19 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { ); NamespaceBuilder::<::bevy::time::Stopwatch>::new(world) .register( - "clone", + "eq", + |_self: Ref, other: Ref| { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) + .register( + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -319,24 +329,14 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); output }, - ) - .register( - "eq", - |_self: Ref, other: Ref| { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, ); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs index cab4d331..a95c8938 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs @@ -73,6 +73,16 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { output }, ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -99,10 +109,24 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { output }, ) + .register( + "mul", + | + _self: Val, + global_transform: Val| + { + let output: Val = >::mul(_self.into_inner(), global_transform.into_inner()) + .into(); + output + }, + ); + NamespaceBuilder::<::bevy::transform::components::Transform>::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); @@ -112,17 +136,16 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { .register( "mul", | - _self: Val, + _self: Val, global_transform: Val| { - let output: Val = = >::mul(_self.into_inner(), global_transform.into_inner()) .into(); output }, - ); - NamespaceBuilder::<::bevy::transform::components::Transform>::new(world) + ) .register( "eq", | @@ -136,6 +159,19 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { output }, ) + .register( + "mul", + | + _self: Val, + transform: Val| + { + let output: Val = >::mul(_self.into_inner(), transform.into_inner()) + .into(); + output + }, + ) .register( "from_xyz", |x: f32, y: f32, z: f32| { @@ -237,42 +273,6 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) - .register( - "mul", - | - _self: Val, - transform: Val| - { - let output: Val = >::mul(_self.into_inner(), transform.into_inner()) - .into(); - output - }, - ) - .register( - "mul", - | - _self: Val, - global_transform: Val| - { - let output: Val = >::mul(_self.into_inner(), global_transform.into_inner()) - .into(); - output - }, ); } }