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 e66a541e86..6dbacc3496 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 @@ -14,6 +14,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", | @@ -26,16 +36,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 6dfeb8d0a1..9b0f52d6ff 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 @@ -13,16 +13,6 @@ 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( "eq", | @@ -85,12 +75,32 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::ecs::world::OnAdd>::new(world); NamespaceBuilder::<::bevy::ecs::world::OnInsert>::new(world); NamespaceBuilder::<::bevy::ecs::world::OnRemove>::new(world); NamespaceBuilder::<::bevy::ecs::world::OnReplace>::new(world); NamespaceBuilder::<::bevy::ecs::component::ComponentId>::new(world) + .register( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -114,16 +124,6 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { output }, ) - .register( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - }, - ) .register( "new", |index: usize| { @@ -145,6 +145,19 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { }, ); NamespaceBuilder::<::bevy::ecs::component::Tick>::new(world) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "new", |tick: u32| { @@ -188,22 +201,9 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { }, ) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) - .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); @@ -211,9 +211,9 @@ 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(); 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 efb3bc53a7..fa6a0eed28 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 @@ -32,16 +32,6 @@ 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", | @@ -54,21 +44,18 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::hierarchy::HierarchyEvent>::new(world) + ) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::hierarchy::HierarchyEvent>::new(world) .register( "clone", |_self: Ref| { @@ -88,6 +75,19 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { .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_input.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs index 85c1f1ba6b..b24ed9da8a 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 @@ -79,16 +79,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadAxis>::new(world) - .register( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -111,6 +101,16 @@ 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::GamepadButton>::new(world) .register( @@ -127,9 +127,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); @@ -137,9 +137,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -159,9 +159,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { ); NamespaceBuilder::<::bevy::input::keyboard::KeyCode>::new(world) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); @@ -182,9 +182,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -202,16 +202,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -224,18 +214,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", | @@ -248,12 +238,22 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::input::keyboard::KeyboardFocusLost>::new(world) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -261,9 +261,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); @@ -294,6 +294,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", | @@ -306,28 +316,8 @@ 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::mouse::AccumulatedMouseMotion>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -340,18 +330,18 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::input::mouse::AccumulatedMouseScroll>::new(world) + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::mouse::AccumulatedMouseScroll>::new(world) .register( "eq", | @@ -364,6 +354,16 @@ 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( @@ -400,6 +400,16 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ); NamespaceBuilder::<::bevy::input::mouse::MouseMotion>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -412,16 +422,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::mouse::MouseWheel>::new(world) .register( @@ -448,16 +448,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadAxisChangedEvent>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -470,6 +460,16 @@ 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( @@ -498,6 +498,16 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { NamespaceBuilder::< ::bevy::input::gamepad::GamepadButtonStateChangedEvent, >::new(world) + .register( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -512,28 +522,28 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val< + bevy::input::gamepad::GamepadButtonStateChangedEvent, + > = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::GamepadConnection>::new(world) .register( "clone", - |_self: Ref| { - let output: Val< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - > = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::gamepad::GamepadConnection>::new(world) + ) .register( "eq", | @@ -546,32 +556,25 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::gamepad::GamepadConnectionEvent>::new(world) .register( - "connected", - |_self: Ref| { - let output: bool = bevy::input::gamepad::GamepadConnectionEvent::connected( - &_self, - ) + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, ) .register( - "disconnected", + "clone", |_self: Ref| { - let output: bool = bevy::input::gamepad::GamepadConnectionEvent::disconnected( + let output: Val = ::clone( &_self, ) .into(); @@ -579,22 +582,19 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) + "connected", + |_self: Ref| { + let output: bool = bevy::input::gamepad::GamepadConnectionEvent::connected( + &_self, + ) .into(); output }, ) .register( - "clone", + "disconnected", |_self: Ref| { - let output: Val = ::clone( + let output: bool = bevy::input::gamepad::GamepadConnectionEvent::disconnected( &_self, ) .into(); @@ -636,6 +636,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", | @@ -648,16 +658,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( @@ -673,6 +673,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", | @@ -685,20 +695,23 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::< ::bevy::input::gamepad::RawGamepadButtonChangedEvent, >::new(world) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "clone", |_self: Ref| { @@ -710,21 +723,18 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::RawGamepadEvent>::new(world) .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::RawGamepadEvent>::new(world) + ) .register( "eq", | @@ -737,18 +747,18 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gestures::PinchGesture>::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::gestures::PinchGesture>::new(world) + ) .register( "eq", | @@ -761,28 +771,8 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::gestures::RotationGesture>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -795,6 +785,16 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::input::gestures::DoubleTapGesture>::new(world) .register( @@ -846,9 +846,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { ); NamespaceBuilder::<::bevy::input::ButtonState>::new(world) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -856,9 +856,17 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", + "is_pressed", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: bool = bevy::input::ButtonState::is_pressed(&_self) + .into(); + output + }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); @@ -877,16 +885,31 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, + ); + NamespaceBuilder::<::bevy::input::gamepad::ButtonSettings>::new(world) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, ) .register( - "is_pressed", - |_self: Ref| { - let output: bool = bevy::input::ButtonState::is_pressed(&_self) + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) .into(); output }, - ); - NamespaceBuilder::<::bevy::input::gamepad::ButtonSettings>::new(world) + ) .register( "is_pressed", |_self: Ref, value: f32| { @@ -950,31 +973,18 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::gamepad::AxisSettings>::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::AxisSettings>::new(world) .register( "livezone_upperbound", |_self: Ref| { @@ -1107,16 +1117,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -1168,19 +1168,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { output }, ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) .register( "weak_motor", |intensity: f32| { @@ -1200,22 +1187,25 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::input::keyboard::Key>::new(world) + ) .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 }, - ) + ); + NamespaceBuilder::<::bevy::input::keyboard::Key>::new(world) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1234,22 +1224,22 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::input::keyboard::NativeKeyCode>::new(world) + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::input::keyboard::NativeKeyCode>::new(world) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); @@ -1268,8 +1258,28 @@ 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::keyboard::NativeKey>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -1292,16 +1302,6 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::input::mouse::MouseScrollUnit>::new(world) .register( @@ -1339,9 +1339,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { ); NamespaceBuilder::<::bevy::input::touch::TouchPhase>::new(world) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1349,9 +1349,9 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs index 2d1c322ff1..9a53d610a3 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs @@ -13,16 +13,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); NamespaceBuilder::<::bevy::math::AspectRatio>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -75,12 +65,22 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { let output: bool = bevy::math::AspectRatio::is_square(&_self).into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::math::CompassOctant>::new(world) .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -101,9 +101,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "assert_receiver_is_total_eq", + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); @@ -145,6 +145,39 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::Isometry2d>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) + .register( + "mul", + | + _self: Val, + rhs: Val| + { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + }, + ) + .register( + "mul", + |_self: Val, rhs: Val| { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + }, + ) .register( "from_rotation", |rotation: Val| { @@ -187,39 +220,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) - .register( - "mul", - | - _self: Val, - rhs: Val| - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - }, - ) - .register( - "mul", - |_self: Val, rhs: Val| { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - }, - ) .register( "eq", |_self: Ref, other: Ref| { @@ -233,12 +233,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { NamespaceBuilder::<::bevy::math::Isometry3d>::new(world) .register( "mul", - | - _self: Val, - rhs: Val| - { - let output: Val = , rhs: Val| { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -278,31 +275,34 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) + "eq", + |_self: Ref, other: Ref| { + let output: bool = >::eq(&_self, &other) .into(); output }, ) .register( "mul", - |_self: Val, rhs: Val| { - let output: Val = , + rhs: Val| + { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output }, ) .register( - "eq", - |_self: Ref, other: Ref| { - let output: bool = >::eq(&_self, &other) + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) .into(); output }, @@ -350,16 +350,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::Rot2>::new(world) - .register( - "eq", - |_self: Ref, other: Ref| { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) .register( "mul", | @@ -373,16 +363,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "mul", - |_self: Val, rhs: Val| { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - }, - ) .register( "radians", |radians: f32| { @@ -598,6 +578,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "mul", + |_self: Val, rhs: Val| { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + }, + ) .register( "clone", |_self: Ref| { @@ -607,18 +597,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::math::prelude::Dir2>::new(world) + ) .register( - "neg", - |_self: Val| { - let output: Val = ::neg( - _self.into_inner(), - ) + "eq", + |_self: Ref, other: Ref| { + let output: bool = >::eq(&_self, &other) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::prelude::Dir2>::new(world) .register( "clone", |_self: Ref| { @@ -746,41 +736,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::math::prelude::Dir3>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ) .register( "neg", - |_self: Val| { - let output: Val = ::neg( + |_self: Val| { + let output: Val = ::neg( _self.into_inner(), ) .into(); output }, - ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) + ); + NamespaceBuilder::<::bevy::math::prelude::Dir3>::new(world) .register( "from_xyz_unchecked", |x: f32, y: f32, z: f32| { @@ -818,6 +785,39 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, + ) + .register( + "neg", + |_self: Val| { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + }, + ) + .register( + "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::math::prelude::Dir3A>::new(world) .register( @@ -892,29 +892,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::prelude::IRect>::new(world) - .register( - "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 - }, - ) .register( "new", |x0: i32, y0: i32, x1: i32, y1: i32| { @@ -1009,6 +986,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + }, + ) .register( "clone", |_self: Ref| { @@ -1018,8 +1005,31 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, + ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, ); NamespaceBuilder::<::bevy::math::prelude::Rect>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "new", |x0: f32, y0: f32, x1: f32, y1: f32| { @@ -1128,16 +1138,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -1152,6 +1152,29 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::prelude::URect>::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, + ) + .into(); + output + }, + ) .register( "new", |x0: u32, y0: u32, x1: u32, y1: u32| { @@ -1255,29 +1278,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); 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 - }, ); NamespaceBuilder::<::bevy::math::Affine3>::new(world); NamespaceBuilder::<::bevy::math::bounding::Aabb2d>::new(world) @@ -1303,9 +1303,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { ); NamespaceBuilder::<::bevy::math::bounding::BoundingCircle>::new(world) .register( - "clone", + "radius", |_self: Ref| { - let output: Val = ::clone( + let output: f32 = bevy::math::bounding::BoundingCircle::radius( &_self, ) .into(); @@ -1313,9 +1313,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "radius", + "aabb_2d", |_self: Ref| { - let output: f32 = bevy::math::bounding::BoundingCircle::radius( + let output: Val = bevy::math::bounding::BoundingCircle::aabb_2d( &_self, ) .into(); @@ -1323,9 +1323,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "aabb_2d", + "clone", |_self: Ref| { - let output: Val = bevy::math::bounding::BoundingCircle::aabb_2d( + let output: Val = ::clone( &_self, ) .into(); @@ -1402,16 +1402,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -1424,6 +1414,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::math::primitives::Arc2d>::new(world) .register( @@ -1536,6 +1536,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -1548,33 +1558,12 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::math::primitives::Capsule2d>::new(world) .register( - "new", - |radius: f32, length: f32| { - let output: Val = bevy::math::primitives::Capsule2d::new( - radius, - length, - ) - .into(); - output - }, - ) - .register( - "to_inner_rectangle", + "clone", |_self: Ref| { - let output: Val = bevy::math::primitives::Capsule2d::to_inner_rectangle( + let output: Val = ::clone( &_self, ) .into(); @@ -1595,26 +1584,27 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, + "new", + |radius: f32, length: f32| { + let output: Val = bevy::math::primitives::Capsule2d::new( + radius, + length, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::CircularSector>::new(world) + ) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( + "to_inner_rectangle", + |_self: Ref| { + let output: Val = bevy::math::primitives::Capsule2d::to_inner_rectangle( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::CircularSector>::new(world) .register( "eq", | @@ -1628,6 +1618,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "new", |radius: f32, angle: f32| { @@ -1754,11 +1754,14 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { ); NamespaceBuilder::<::bevy::math::primitives::CircularSegment>::new(world) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, @@ -1887,43 +1890,17 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ); - NamespaceBuilder::<::bevy::math::primitives::Ellipse>::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::math::primitives::Ellipse>::new(world) .register( "new", |half_width: f32, half_height: f32| { @@ -1970,6 +1947,29 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, + ) + .register( + "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::math::primitives::Line2d>::new(world) .register( @@ -1996,6 +1996,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::primitives::Plane2d>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -2008,18 +2018,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::Rectangle>::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::Rectangle>::new(world) + ) .register( "eq", | @@ -2053,18 +2063,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::RegularPolygon>::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::RegularPolygon>::new(world) + ) .register( "eq", | @@ -2158,18 +2168,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::Rhombus>::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::Rhombus>::new(world) + ) .register( "eq", | @@ -2183,16 +2193,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "new", |horizontal_diagonal: f32, vertical_diagonal: f32| { @@ -2252,14 +2252,12 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { ); NamespaceBuilder::<::bevy::math::primitives::Segment2d>::new(world) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) + "new", + |direction: Val, length: f32| { + let output: Val = bevy::math::primitives::Segment2d::new( + direction.into_inner(), + length, + ) .into(); output }, @@ -2275,12 +2273,14 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "new", - |direction: Val, length: f32| { - let output: Val = bevy::math::primitives::Segment2d::new( - direction.into_inner(), - length, - ) + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, @@ -2299,16 +2299,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "is_degenerate", |_self: Ref| { @@ -2358,6 +2348,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::math::bounding::Aabb3d>::new(world) .register( @@ -2382,9 +2382,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { ); NamespaceBuilder::<::bevy::math::bounding::BoundingSphere>::new(world) .register( - "radius", + "clone", |_self: Ref| { - let output: f32 = bevy::math::bounding::BoundingSphere::radius( + let output: Val = ::clone( &_self, ) .into(); @@ -2392,9 +2392,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "aabb_3d", + "radius", |_self: Ref| { - let output: Val = bevy::math::bounding::BoundingSphere::aabb_3d( + let output: f32 = bevy::math::bounding::BoundingSphere::radius( &_self, ) .into(); @@ -2402,9 +2402,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "clone", + "aabb_3d", |_self: Ref| { - let output: Val = ::clone( + let output: Val = bevy::math::bounding::BoundingSphere::aabb_3d( &_self, ) .into(); @@ -2425,6 +2425,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "new", |radius: f32| { @@ -2442,16 +2452,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::math::primitives::Cuboid>::new(world) .register( @@ -2476,6 +2476,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -2488,16 +2498,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::math::primitives::Cylinder>::new(world) .register( @@ -2653,16 +2653,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "eq", | @@ -2675,18 +2665,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::ConicalFrustum>::new(world) + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::ConicalFrustum>::new(world) .register( "eq", | @@ -2699,18 +2689,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::InfinitePlane3d>::new(world) + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::InfinitePlane3d>::new(world) .register( "eq", | @@ -2723,6 +2713,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, + ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, ); NamespaceBuilder::<::bevy::math::primitives::Line3d>::new(world) .register( @@ -2749,17 +2749,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::primitives::Segment3d>::new(world) - .register( - "new", - |direction: Val, length: f32| { - let output: Val = bevy::math::primitives::Segment3d::new( - direction.into_inner(), - length, - ) - .into(); - output - }, - ) .register( "eq", | @@ -2774,26 +2763,27 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, + "new", + |direction: Val, length: f32| { + let output: Val = bevy::math::primitives::Segment3d::new( + direction.into_inner(), + length, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::Torus>::new(world) + ) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::Torus>::new(world) .register( "new", |inner_radius: f32, outer_radius: f32| { @@ -2821,6 +2811,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -2835,6 +2835,29 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::primitives::Triangle3d>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "is_degenerate", |_self: Ref| { @@ -2884,31 +2907,18 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) + ); + NamespaceBuilder::<::bevy::math::bounding::RayCast2d>::new(world) .register( "clone", - |_self: Ref| { - let output: Val = ::clone( + |_self: Ref| { + let output: Val = ::clone( &_self, ) .into(); output }, - ); - NamespaceBuilder::<::bevy::math::bounding::RayCast2d>::new(world) + ) .register( "from_ray", |ray: Val, max: f32| { @@ -2947,16 +2957,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::math::bounding::AabbCast2d>::new(world) .register( @@ -3041,6 +3041,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::bounding::RayCast3d>::new(world) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "from_ray", |ray: Val, max: f32| { @@ -3079,16 +3089,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, ); NamespaceBuilder::<::bevy::math::bounding::AabbCast3d>::new(world) .register( @@ -3173,16 +3173,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ); NamespaceBuilder::<::bevy::math::curve::interval::Interval>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) .register( "start", |_self: Val| { @@ -3279,6 +3269,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "clone", + |_self: Ref| { + let output: Val = ::clone( + &_self, + ) + .into(); + output + }, + ) .register( "eq", | @@ -3303,6 +3303,16 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { output }, ) + .register( + "eq", + |_self: Ref, other: Ref| { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) .register( "lt", |_self: Ref, other: Ref| { @@ -3352,18 +3362,21 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) + ); + NamespaceBuilder::<::bevy::math::primitives::Plane3d>::new(world) .register( "eq", - |_self: Ref, other: Ref| { - let output: bool = , + other: Ref| + { + let output: bool = >::eq(&_self, &other) .into(); output }, - ); - NamespaceBuilder::<::bevy::math::primitives::Plane3d>::new(world) + ) .register( "clone", |_self: Ref| { @@ -3373,25 +3386,12 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { .into(); output }, - ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, ); NamespaceBuilder::<::bevy::math::primitives::Tetrahedron>::new(world) .register( - "signed_volume", + "clone", |_self: Ref| { - let output: f32 = bevy::math::primitives::Tetrahedron::signed_volume( + let output: Val = ::clone( &_self, ) .into(); @@ -3412,9 +3412,9 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { }, ) .register( - "clone", + "signed_volume", |_self: Ref| { - let output: Val = ::clone( + let output: f32 = bevy::math::primitives::Tetrahedron::signed_volume( &_self, ) .into(); 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 b3234e16ec..225f55b07c 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 @@ -37,11 +37,14 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { ); NamespaceBuilder::<::bevy::time::prelude::Timer>::new(world) .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 }, @@ -193,32 +196,16 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { }, ) .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) .into(); output }, ); NamespaceBuilder::<::bevy::time::prelude::TimerMode>::new(world) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) .register( "assert_receiver_is_total_eq", |_self: Ref| { @@ -238,6 +225,19 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { .into(); output }, + ) + .register( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, ); NamespaceBuilder::<::bevy::time::prelude::Virtual>::new(world) .register( @@ -252,9 +252,19 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { ); NamespaceBuilder::<::bevy::time::Stopwatch>::new(world) .register( - "assert_receiver_is_total_eq", + "eq", + |_self: Ref, other: Ref| { + let output: bool = >::eq(&_self, &other) + .into(); + output + }, + ) + .register( + "clone", |_self: Ref| { - let output: () = ::assert_receiver_is_total_eq( + let output: Val = ::clone( &_self, ) .into(); @@ -313,19 +323,9 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { }, ) .register( - "eq", - |_self: Ref, other: Ref| { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) - .register( - "clone", + "assert_receiver_is_total_eq", |_self: Ref| { - let output: Val = ::clone( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); 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 5fc7357eeb..2520ec4cd2 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 @@ -27,6 +27,19 @@ 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 + }, + ) .register( "eq", | @@ -90,19 +103,6 @@ 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 - }, - ) .register( "mul", | @@ -117,38 +117,15 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { }, ); NamespaceBuilder::<::bevy::transform::components::Transform>::new(world) - .register( - "clone", - |_self: Ref| { - let output: Val = ::clone( - &_self, - ) - .into(); - output - }, - ) - .register( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = >::eq(&_self, &other) - .into(); - output - }, - ) .register( "mul", | _self: Val, - global_transform: Val| + transform: Val| { - let output: Val = >::mul(_self.into_inner(), global_transform.into_inner()) + let output: Val = >::mul(_self.into_inner(), transform.into_inner()) .into(); output }, @@ -255,15 +232,38 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { 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( "mul", | _self: Val, - transform: Val| + global_transform: Val| { - let output: Val = >::mul(_self.into_inner(), transform.into_inner()) + let output: Val = >::mul(_self.into_inner(), global_transform.into_inner()) .into(); output },