Skip to content

Commit 7088f67

Browse files
committed
fix more errors
1 parent 0b916b9 commit 7088f67

File tree

4 files changed

+233
-233
lines changed

4 files changed

+233
-233
lines changed

crates/bevy_script_api/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ bevy = { workspace = true, default-features = false, features = [
2828
"bevy_sprite",
2929
"file_watcher",
3030
"multi_threaded",
31-
"bevy_reflect",
3231
] }
3332
uuid = "1.10"
3433
bevy_mod_scripting_core = { workspace = true }

crates/bevy_script_api/src/providers/bevy_input.rs

Lines changed: 78 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,22 @@ use bevy_script_api::{
1313
#[proxy(
1414
derive(),
1515
remote = "bevy::input::gamepad::Gamepad",
16-
functions[r#"
17-
/// Returns the USB vendor ID as assigned by the USB-IF, if available.
16+
functions[
17+
// r#"
18+
// /// Returns the USB vendor ID as assigned by the USB-IF, if available.
1819
19-
#[lua(kind = "Method")]
20-
fn vendor_id(&self) -> std::option::Option<u16>;
20+
// #[lua(kind = "Method")]
21+
// fn vendor_id(&self) -> std::option::Option<u16>;
2122
22-
"#,
23-
r#"
24-
/// Returns the USB product ID as assigned by the [vendor], if available.
25-
/// [vendor]: Self::vendor_id
23+
// "#,
24+
// r#"
25+
// /// Returns the USB product ID as assigned by the [vendor], if available.
26+
// /// [vendor]: Self::vendor_id
2627
27-
#[lua(kind = "Method")]
28-
fn product_id(&self) -> std::option::Option<u16>;
28+
// #[lua(kind = "Method")]
29+
// fn product_id(&self) -> std::option::Option<u16>;
2930
30-
"#,
31+
// "#,
3132
r#"
3233
/// Returns the left stick as a [`Vec2`]
3334
@@ -49,37 +50,37 @@ use bevy_script_api::{
4950
fn dpad(&self) -> bevy::math::Vec2;
5051
5152
"#,
52-
r#"
53-
/// Returns `true` if the [`GamepadButton`] has been pressed.
53+
// r#"
54+
// /// Returns `true` if the [`GamepadButton`] has been pressed.
5455
55-
#[lua(kind = "Method")]
56-
fn pressed(&self, #[proxy] button_type: bevy::input::gamepad::GamepadButton) -> bool;
56+
// #[lua(kind = "Method")]
57+
// fn pressed(&self, #[proxy] button_type: bevy::input::gamepad::GamepadButton) -> bool;
5758
58-
"#,
59-
r#"
60-
/// Returns `true` if the [`GamepadButton`] has been pressed during the current frame.
61-
/// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_released`].
59+
// "#,
60+
// r#"
61+
// /// Returns `true` if the [`GamepadButton`] has been pressed during the current frame.
62+
// /// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_released`].
6263
63-
#[lua(kind = "Method")]
64-
fn just_pressed(
65-
&self,
66-
#[proxy]
67-
button_type: bevy::input::gamepad::GamepadButton,
68-
) -> bool;
64+
// #[lua(kind = "Method")]
65+
// fn just_pressed(
66+
// &self,
67+
// #[proxy]
68+
// button_type: bevy::input::gamepad::GamepadButton,
69+
// ) -> bool;
6970
70-
"#,
71-
r#"
72-
/// Returns `true` if the [`GamepadButton`] has been released during the current frame.
73-
/// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_pressed`].
71+
// "#,
72+
// r#"
73+
// /// Returns `true` if the [`GamepadButton`] has been released during the current frame.
74+
// /// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_pressed`].
7475
75-
#[lua(kind = "Method")]
76-
fn just_released(
77-
&self,
78-
#[proxy]
79-
button_type: bevy::input::gamepad::GamepadButton,
80-
) -> bool;
76+
// #[lua(kind = "Method")]
77+
// fn just_released(
78+
// &self,
79+
// #[proxy]
80+
// button_type: bevy::input::gamepad::GamepadButton,
81+
// ) -> bool;
8182
82-
"#,
83+
// "#,
8384
r#"
8485
#[lua(kind="MetaMethod", metamethod="ToString")]
8586
fn index(&self) -> String {
@@ -824,45 +825,45 @@ fn index(&self) -> String {
824825
"#]
825826
)]
826827
struct GamepadEvent {}
827-
#[derive(bevy_mod_scripting_lua_derive::LuaProxy)]
828-
#[proxy(
829-
derive(clone),
830-
remote = "bevy::input::gamepad::GamepadInfo",
831-
functions[r#"
832-
833-
#[lua(
834-
as_trait = "std::cmp::PartialEq",
835-
kind = "MetaFunction",
836-
composite = "eq",
837-
metamethod = "Eq",
838-
)]
839-
fn eq(&self, #[proxy] other: &gamepad::GamepadInfo) -> bool;
840-
841-
"#,
842-
r#"
843-
844-
#[lua(as_trait = "std::cmp::Eq", kind = "Method")]
845-
fn assert_receiver_is_total_eq(&self) -> ();
846-
847-
"#,
848-
r#"
849-
850-
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
851-
fn clone(&self) -> bevy::input::gamepad::GamepadInfo;
852-
853-
"#,
854-
r#"
855-
#[lua(kind="MetaMethod", metamethod="ToString")]
856-
fn index(&self) -> String {
857-
format!("{:?}", _self)
858-
}
859-
"#]
860-
)]
861-
struct GamepadInfo {
862-
name: std::string::String,
863-
vendor_id: std::option::Option<u16>,
864-
product_id: std::option::Option<u16>,
865-
}
828+
// #[derive(bevy_mod_scripting_lua_derive::LuaProxy)]
829+
// #[proxy(
830+
// derive(clone),
831+
// remote = "bevy::input::gamepad::GamepadInfo",
832+
// functions[r#"
833+
834+
// #[lua(
835+
// as_trait = "std::cmp::PartialEq",
836+
// kind = "MetaFunction",
837+
// composite = "eq",
838+
// metamethod = "Eq",
839+
// )]
840+
// fn eq(&self, #[proxy] other: &gamepad::GamepadInfo) -> bool;
841+
842+
// "#,
843+
// r#"
844+
845+
// #[lua(as_trait = "std::cmp::Eq", kind = "Method")]
846+
// fn assert_receiver_is_total_eq(&self) -> ();
847+
848+
// "#,
849+
// r#"
850+
851+
// #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
852+
// fn clone(&self) -> bevy::input::gamepad::GamepadInfo;
853+
854+
// "#,
855+
// r#"
856+
// #[lua(kind="MetaMethod", metamethod="ToString")]
857+
// fn index(&self) -> String {
858+
// format!("{:?}", _self)
859+
// }
860+
// "#]
861+
// )]
862+
// struct GamepadInfo {
863+
// name: std::string::String,
864+
// vendor_id: std::option::Option<u16>,
865+
// product_id: std::option::Option<u16>,
866+
// }
866867
#[derive(bevy_mod_scripting_lua_derive::LuaProxy)]
867868
#[proxy(
868869
derive(clone),
@@ -1818,7 +1819,7 @@ impl bevy_mod_scripting_core::hosts::APIProvider for BevyInputAPIProvider {
18181819
>,
18191820
>()
18201821
.process_type::<LuaGamepadEvent>()
1821-
.process_type::<LuaGamepadInfo>()
1822+
// .process_type::<LuaGamepadInfo>()
18221823
.process_type::<LuaGamepadInput>()
18231824
.process_type::<LuaGamepadRumbleRequest>()
18241825
.process_type::<LuaRawGamepadAxisChangedEvent>()
@@ -1898,7 +1899,7 @@ impl bevy_mod_scripting_core::hosts::APIProvider for BevyInputAPIProvider {
18981899
app.register_foreign_lua_type::<bevy::input::gamepad::GamepadConnection>();
18991900
app.register_foreign_lua_type::<bevy::input::gamepad::GamepadConnectionEvent>();
19001901
app.register_foreign_lua_type::<bevy::input::gamepad::GamepadEvent>();
1901-
app.register_foreign_lua_type::<bevy::input::gamepad::GamepadInfo>();
1902+
// app.register_foreign_lua_type::<bevy::input::gamepad::GamepadInfo>();
19021903
app.register_foreign_lua_type::<bevy::input::gamepad::GamepadInput>();
19031904
app.register_foreign_lua_type::<bevy::input::gamepad::GamepadRumbleRequest>();
19041905
app.register_foreign_lua_type::<

crates/bevy_script_api/src/providers/bevy_math.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,13 +2829,13 @@ struct Capsule2d {
28292829
fn sagitta(&self) -> f32;
28302830
28312831
"#,
2832-
r#"
2833-
/// Returns the area of this sector
2832+
// r#"
2833+
// /// Returns the area of this sector
28342834
2835-
#[lua(kind = "Method")]
2836-
fn area(&self) -> f32;
2835+
// #[lua(kind = "Method")]
2836+
// fn area(&self) -> f32;
28372837
2838-
"#,
2838+
// "#,
28392839
r#"
28402840
#[lua(kind="MetaMethod", metamethod="ToString")]
28412841
fn index(&self) -> String {
@@ -2946,13 +2946,13 @@ struct CircularSector {
29462946
fn sagitta(&self) -> f32;
29472947
29482948
"#,
2949-
r#"
2950-
/// Returns the area of this segment
2949+
// r#"
2950+
// /// Returns the area of this segment
29512951
2952-
#[lua(kind = "Method")]
2953-
fn area(&self) -> f32;
2952+
// #[lua(kind = "Method")]
2953+
// fn area(&self) -> f32;
29542954
2955-
"#,
2955+
// "#,
29562956
r#"
29572957
29582958
#[lua(

0 commit comments

Comments
 (0)