@@ -12,6 +12,23 @@ use bevy_script_api::{
12
12
derive( clone) ,
13
13
remote = "bevy::ecs::entity::Entity" ,
14
14
functions[ r#"
15
+
16
+ #[lua(
17
+ as_trait = "std::cmp::PartialEq",
18
+ kind = "MetaFunction",
19
+ composite = "eq",
20
+ metamethod = "Eq",
21
+ )]
22
+ fn eq(&self, #[proxy] other: &entity::Entity) -> bool;
23
+
24
+ "# ,
25
+ r#"
26
+
27
+ #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
28
+ fn clone(&self) -> bevy::ecs::entity::Entity;
29
+
30
+ "# ,
31
+ r#"
15
32
/// Creates a new entity ID with the specified `index` and a generation of 1.
16
33
/// # Note
17
34
/// Spawning a specific `entity` value is __rarely the right choice__. Most apps should favor
@@ -64,23 +81,6 @@ use bevy_script_api::{
64
81
#[lua(kind = "Method")]
65
82
fn generation(self) -> u32;
66
83
67
- "# ,
68
- r#"
69
-
70
- #[lua(
71
- as_trait = "std::cmp::PartialEq",
72
- kind = "MetaFunction",
73
- composite = "eq",
74
- metamethod = "Eq",
75
- )]
76
- fn eq(&self, #[proxy] other: &entity::Entity) -> bool;
77
-
78
- "# ,
79
- r#"
80
-
81
- #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
82
- fn clone(&self) -> bevy::ecs::entity::Entity;
83
-
84
84
"# ,
85
85
r#"
86
86
#[lua(kind="MetaMethod", metamethod="ToString")]
@@ -89,18 +89,12 @@ fn index(&self) -> String {
89
89
}
90
90
"# ]
91
91
) ]
92
- pub struct Entity { }
92
+ struct Entity { }
93
93
#[ derive( bevy_mod_scripting_lua_derive:: LuaProxy ) ]
94
94
#[ proxy(
95
95
derive( clone) ,
96
96
remote = "bevy::ecs::component::ComponentId" ,
97
97
functions[ r#"
98
-
99
- #[lua(as_trait = "std::cmp::Eq", kind = "Method")]
100
- fn assert_receiver_is_total_eq(&self) -> ();
101
-
102
- "# ,
103
- r#"
104
98
/// Creates a new [`ComponentId`].
105
99
/// The `index` is a unique value associated with each type of component in a given world.
106
100
/// Usually, this value is taken from a counter incremented for each type of component registered with the world.
@@ -118,8 +112,8 @@ pub struct Entity {}
118
112
"# ,
119
113
r#"
120
114
121
- #[lua(as_trait = "std::clone::Clone ", kind = "Method", output(proxy) )]
122
- fn clone (&self) -> bevy::ecs::component::ComponentId ;
115
+ #[lua(as_trait = "std::cmp::Eq ", kind = "Method")]
116
+ fn assert_receiver_is_total_eq (&self) -> () ;
123
117
124
118
"# ,
125
119
r#"
@@ -132,6 +126,12 @@ pub struct Entity {}
132
126
)]
133
127
fn eq(&self, #[proxy] other: &component::ComponentId) -> bool;
134
128
129
+ "# ,
130
+ r#"
131
+
132
+ #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
133
+ fn clone(&self) -> bevy::ecs::component::ComponentId;
134
+
135
135
"# ,
136
136
r#"
137
137
#[lua(kind="MetaMethod", metamethod="ToString")]
@@ -140,20 +140,21 @@ fn index(&self) -> String {
140
140
}
141
141
"# ]
142
142
) ]
143
- pub struct ComponentId ( ) ;
143
+ struct ComponentId ( ) ;
144
144
#[ derive( bevy_mod_scripting_lua_derive:: LuaProxy ) ]
145
145
#[ proxy(
146
146
derive( clone) ,
147
147
remote = "bevy::ecs::component::Tick" ,
148
148
functions[ r#"
149
149
150
- #[lua(
151
- as_trait = "std::cmp::PartialEq",
152
- kind = "MetaFunction",
153
- composite = "eq",
154
- metamethod = "Eq",
155
- )]
156
- fn eq(&self, #[proxy] other: &component::Tick) -> bool;
150
+ #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
151
+ fn clone(&self) -> bevy::ecs::component::Tick;
152
+
153
+ "# ,
154
+ r#"
155
+
156
+ #[lua(as_trait = "std::cmp::Eq", kind = "Method")]
157
+ fn assert_receiver_is_total_eq(&self) -> ();
157
158
158
159
"# ,
159
160
r#"
@@ -193,14 +194,13 @@ pub struct ComponentId();
193
194
"# ,
194
195
r#"
195
196
196
- #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
197
- fn clone(&self) -> bevy::ecs::component::Tick;
198
-
199
- "# ,
200
- r#"
201
-
202
- #[lua(as_trait = "std::cmp::Eq", kind = "Method")]
203
- fn assert_receiver_is_total_eq(&self) -> ();
197
+ #[lua(
198
+ as_trait = "std::cmp::PartialEq",
199
+ kind = "MetaFunction",
200
+ composite = "eq",
201
+ metamethod = "Eq",
202
+ )]
203
+ fn eq(&self, #[proxy] other: &component::Tick) -> bool;
204
204
205
205
"# ,
206
206
r#"
@@ -210,12 +210,18 @@ fn index(&self) -> String {
210
210
}
211
211
"# ]
212
212
) ]
213
- pub struct Tick { }
213
+ struct Tick { }
214
214
#[ derive( bevy_mod_scripting_lua_derive:: LuaProxy ) ]
215
215
#[ proxy(
216
216
derive( clone) ,
217
217
remote = "bevy::ecs::component::ComponentTicks" ,
218
218
functions[ r#"
219
+
220
+ #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
221
+ fn clone(&self) -> bevy::ecs::component::ComponentTicks;
222
+
223
+ "# ,
224
+ r#"
219
225
/// Returns `true` if the component or resource was added after the system last ran.
220
226
221
227
#[lua(kind = "Method")]
@@ -271,12 +277,6 @@ pub struct Tick {}
271
277
#[lua(kind = "MutatingMethod")]
272
278
fn set_changed(&mut self, #[proxy] change_tick: bevy::ecs::component::Tick) -> ();
273
279
274
- "# ,
275
- r#"
276
-
277
- #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
278
- fn clone(&self) -> bevy::ecs::component::ComponentTicks;
279
-
280
280
"# ,
281
281
r#"
282
282
#[lua(kind="MetaMethod", metamethod="ToString")]
@@ -285,7 +285,7 @@ fn index(&self) -> String {
285
285
}
286
286
"# ]
287
287
) ]
288
- pub struct ComponentTicks { }
288
+ struct ComponentTicks { }
289
289
#[ derive( bevy_mod_scripting_lua_derive:: LuaProxy ) ]
290
290
#[ proxy(
291
291
derive( clone) ,
@@ -297,7 +297,7 @@ pub struct ComponentTicks {}
297
297
298
298
"# ]
299
299
) ]
300
- pub struct EntityHash { }
300
+ struct EntityHash { }
301
301
#[ derive( Default ) ]
302
302
pub ( crate ) struct Globals ;
303
303
impl bevy_mod_scripting_lua:: tealr:: mlu:: ExportInstances for Globals {
0 commit comments