Skip to content

Commit 704adfe

Browse files
committed
bump rest of bevy
1 parent ac82bcc commit 704adfe

File tree

16 files changed

+4062
-5957
lines changed

16 files changed

+4062
-5957
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bevy_script_api = { path = "crates/bevy_script_api", version = "0.8.0-alpha.1",
7070

7171

7272
[workspace.dependencies]
73-
bevy = { version = "0.15.0-rc.3", default-features = false }
73+
bevy = { version = "0.15.0", default-features = false }
7474
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.8.0-alpha.1" }
7575
bevy_mod_scripting_common = { path = "crates/bevy_mod_scripting_common", version = "0.8.0-alpha.1" }
7676

crates/bevy_script_api/src/providers/bevy_a11y.rs

Lines changed: 0 additions & 69 deletions
This file was deleted.

crates/bevy_script_api/src/providers/bevy_core.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ use bevy_script_api::{
1414
remote = "bevy::core::prelude::Name",
1515
functions[r#"
1616
17-
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
18-
fn clone(&self) -> bevy::core::prelude::Name;
19-
20-
"#,
21-
r#"
22-
2317
#[lua(
2418
as_trait = "std::cmp::PartialEq",
2519
kind = "MetaFunction",
@@ -28,6 +22,12 @@ use bevy_script_api::{
2822
)]
2923
fn eq(&self, #[proxy] other: &name::Name) -> bool;
3024
25+
"#,
26+
r#"
27+
28+
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
29+
fn clone(&self) -> bevy::core::prelude::Name;
30+
3131
"#,
3232
r#"
3333
#[lua(kind="MetaMethod", metamethod="ToString")]

crates/bevy_script_api/src/providers/bevy_ecs.rs

Lines changed: 60 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ use bevy_script_api::{
1313
remote = "bevy::ecs::entity::Entity",
1414
functions[r#"
1515
16-
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
17-
fn clone(&self) -> bevy::ecs::entity::Entity;
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;
1823
1924
"#,
2025
r#"
@@ -73,13 +78,8 @@ use bevy_script_api::{
7378
"#,
7479
r#"
7580
76-
#[lua(
77-
as_trait = "std::cmp::PartialEq",
78-
kind = "MetaFunction",
79-
composite = "eq",
80-
metamethod = "Eq",
81-
)]
82-
fn eq(&self, #[proxy] other: &entity::Entity) -> bool;
81+
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
82+
fn clone(&self) -> bevy::ecs::entity::Entity;
8383
8484
"#,
8585
r#"
@@ -143,17 +143,6 @@ struct OnReplace {}
143143
derive(clone),
144144
remote = "bevy::ecs::component::ComponentId",
145145
functions[r#"
146-
147-
#[lua(
148-
as_trait = "std::cmp::PartialEq",
149-
kind = "MetaFunction",
150-
composite = "eq",
151-
metamethod = "Eq",
152-
)]
153-
fn eq(&self, #[proxy] other: &component::ComponentId) -> bool;
154-
155-
"#,
156-
r#"
157146
/// Creates a new [`ComponentId`].
158147
/// The `index` is a unique value associated with each type of component in a given world.
159148
/// Usually, this value is taken from a counter incremented for each type of component registered with the world.
@@ -174,6 +163,17 @@ struct OnReplace {}
174163
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
175164
fn clone(&self) -> bevy::ecs::component::ComponentId;
176165
166+
"#,
167+
r#"
168+
169+
#[lua(
170+
as_trait = "std::cmp::PartialEq",
171+
kind = "MetaFunction",
172+
composite = "eq",
173+
metamethod = "Eq",
174+
)]
175+
fn eq(&self, #[proxy] other: &component::ComponentId) -> bool;
176+
177177
"#,
178178
r#"
179179
@@ -195,8 +195,8 @@ struct ComponentId();
195195
remote = "bevy::ecs::component::Tick",
196196
functions[r#"
197197
198-
#[lua(as_trait = "std::cmp::Eq", kind = "Method")]
199-
fn assert_receiver_is_total_eq(&self) -> ();
198+
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
199+
fn clone(&self) -> bevy::ecs::component::Tick;
200200
201201
"#,
202202
r#"
@@ -212,8 +212,8 @@ struct ComponentId();
212212
"#,
213213
r#"
214214
215-
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
216-
fn clone(&self) -> bevy::ecs::component::Tick;
215+
#[lua(as_trait = "std::cmp::Eq", kind = "Method")]
216+
fn assert_receiver_is_total_eq(&self) -> ();
217217
218218
"#,
219219
r#"
@@ -264,12 +264,6 @@ struct Tick {}
264264
derive(clone),
265265
remote = "bevy::ecs::component::ComponentTicks",
266266
functions[r#"
267-
268-
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
269-
fn clone(&self) -> bevy::ecs::component::ComponentTicks;
270-
271-
"#,
272-
r#"
273267
/// Returns `true` if the component or resource was added after the system last ran
274268
/// (or the system is running for the first time).
275269
@@ -298,17 +292,13 @@ struct Tick {}
298292
299293
"#,
300294
r#"
301-
/// Returns the tick recording the time this component or resource was most recently changed.
295+
/// Creates a new instance with the same change tick for `added` and `changed`.
302296
303-
#[lua(kind = "Method", output(proxy))]
304-
fn last_changed_tick(&self) -> bevy::ecs::component::Tick;
305-
306-
"#,
307-
r#"
308-
/// Returns the tick recording the time this component or resource was added.
309-
310-
#[lua(kind = "Method", output(proxy))]
311-
fn added_tick(&self) -> bevy::ecs::component::Tick;
297+
#[lua(kind = "Function", output(proxy))]
298+
fn new(
299+
#[proxy]
300+
change_tick: bevy::ecs::component::Tick,
301+
) -> bevy::ecs::component::ComponentTicks;
312302
313303
"#,
314304
r#"
@@ -327,6 +317,12 @@ struct Tick {}
327317
#[lua(kind = "MutatingMethod")]
328318
fn set_changed(&mut self, #[proxy] change_tick: bevy::ecs::component::Tick) -> ();
329319
320+
"#,
321+
r#"
322+
323+
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
324+
fn clone(&self) -> bevy::ecs::component::ComponentTicks;
325+
330326
"#,
331327
r#"
332328
#[lua(kind="MetaMethod", metamethod="ToString")]
@@ -335,19 +331,18 @@ fn index(&self) -> String {
335331
}
336332
"#]
337333
)]
338-
struct ComponentTicks {}
334+
struct ComponentTicks {
335+
#[lua(output(proxy))]
336+
added: bevy::ecs::component::Tick,
337+
#[lua(output(proxy))]
338+
changed: bevy::ecs::component::Tick,
339+
}
339340
#[derive(bevy_mod_scripting_lua_derive::LuaProxy)]
340341
#[proxy(
341342
derive(clone),
342343
remote = "bevy::ecs::identifier::Identifier",
343344
functions[r#"
344345
345-
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
346-
fn clone(&self) -> bevy::ecs::identifier::Identifier;
347-
348-
"#,
349-
r#"
350-
351346
#[lua(
352347
as_trait = "std::cmp::PartialEq",
353348
kind = "MetaFunction",
@@ -387,6 +382,12 @@ struct ComponentTicks {}
387382
#[lua(kind = "Function", output(proxy))]
388383
fn from_bits(value: u64) -> bevy::ecs::identifier::Identifier;
389384
385+
"#,
386+
r#"
387+
388+
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
389+
fn clone(&self) -> bevy::ecs::identifier::Identifier;
390+
390391
"#,
391392
r#"
392393
#[lua(kind="MetaMethod", metamethod="ToString")]
@@ -451,6 +452,13 @@ impl bevy_mod_scripting_lua::tealr::mlu::ExportInstances for Globals {
451452
"Tick",
452453
bevy_mod_scripting_lua::tealr::mlu::UserDataProxy::<LuaTick>::new,
453454
)?;
455+
instances
456+
.add_instance(
457+
"ComponentTicks",
458+
bevy_mod_scripting_lua::tealr::mlu::UserDataProxy::<
459+
LuaComponentTicks,
460+
>::new,
461+
)?;
454462
instances
455463
.add_instance(
456464
"Identifier",
@@ -500,6 +508,11 @@ impl bevy_mod_scripting_core::hosts::APIProvider for BevyEcsAPIProvider {
500508
bevy_mod_scripting_lua::tealr::mlu::UserDataProxy<LuaTick>,
501509
>()
502510
.process_type::<LuaComponentTicks>()
511+
.process_type::<
512+
bevy_mod_scripting_lua::tealr::mlu::UserDataProxy<
513+
LuaComponentTicks,
514+
>,
515+
>()
503516
.process_type::<LuaIdentifier>()
504517
.process_type::<
505518
bevy_mod_scripting_lua::tealr::mlu::UserDataProxy<

crates/bevy_script_api/src/providers/bevy_hierarchy.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ struct Parent();
7070
remote = "bevy::hierarchy::HierarchyEvent",
7171
functions[r#"
7272
73-
#[lua(as_trait = "std::cmp::Eq", kind = "Method")]
74-
fn assert_receiver_is_total_eq(&self) -> ();
73+
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
74+
fn clone(&self) -> bevy::hierarchy::HierarchyEvent;
7575
7676
"#,
7777
r#"
@@ -87,8 +87,8 @@ struct Parent();
8787
"#,
8888
r#"
8989
90-
#[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
91-
fn clone(&self) -> bevy::hierarchy::HierarchyEvent;
90+
#[lua(as_trait = "std::cmp::Eq", kind = "Method")]
91+
fn assert_receiver_is_total_eq(&self) -> ();
9292
9393
"#,
9494
r#"

0 commit comments

Comments
 (0)