Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(codegen): update bevy bindings #184

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bevy::core::prelude::Name>| {
let output: Val<bevy::core::prelude::Name> = <bevy::core::prelude::Name as std::clone::Clone>::clone(
&_self,
)
.into();
output
},
)
.register(
"eq",
|
Expand All @@ -26,16 +36,6 @@ impl ::bevy::app::Plugin for BevyCoreScriptingPlugin {
.into();
output
},
)
.register(
"clone",
|_self: Ref<bevy::core::prelude::Name>| {
let output: Val<bevy::core::prelude::Name> = <bevy::core::prelude::Name as std::clone::Clone>::clone(
&_self,
)
.into();
output
},
);
}
}
74 changes: 37 additions & 37 deletions crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bevy::ecs::entity::Entity>| {
let output: Val<bevy::ecs::entity::Entity> = <bevy::ecs::entity::Entity as std::clone::Clone>::clone(
&_self,
)
.into();
output
},
)
.register(
"eq",
|
Expand Down Expand Up @@ -85,12 +75,32 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
.into();
output
},
)
.register(
"clone",
|_self: Ref<bevy::ecs::entity::Entity>| {
let output: Val<bevy::ecs::entity::Entity> = <bevy::ecs::entity::Entity as std::clone::Clone>::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<bevy::ecs::component::ComponentId>| {
let output: () = <bevy::ecs::component::ComponentId as std::cmp::Eq>::assert_receiver_is_total_eq(
&_self,
)
.into();
output
},
)
.register(
"eq",
|
Expand All @@ -114,16 +124,6 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.register(
"assert_receiver_is_total_eq",
|_self: Ref<bevy::ecs::component::ComponentId>| {
let output: () = <bevy::ecs::component::ComponentId as std::cmp::Eq>::assert_receiver_is_total_eq(
&_self,
)
.into();
output
},
)
.register(
"new",
|index: usize| {
Expand All @@ -145,6 +145,19 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
},
);
NamespaceBuilder::<::bevy::ecs::component::Tick>::new(world)
.register(
"eq",
|
_self: Ref<bevy::ecs::component::Tick>,
other: Ref<bevy::ecs::component::Tick>|
{
let output: bool = <bevy::ecs::component::Tick as std::cmp::PartialEq<
bevy::ecs::component::Tick,
>>::eq(&_self, &other)
.into();
output
},
)
.register(
"new",
|tick: u32| {
Expand Down Expand Up @@ -188,32 +201,19 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
},
)
.register(
"eq",
|
_self: Ref<bevy::ecs::component::Tick>,
other: Ref<bevy::ecs::component::Tick>|
{
let output: bool = <bevy::ecs::component::Tick as std::cmp::PartialEq<
bevy::ecs::component::Tick,
>>::eq(&_self, &other)
.into();
output
},
)
.register(
"assert_receiver_is_total_eq",
"clone",
|_self: Ref<bevy::ecs::component::Tick>| {
let output: () = <bevy::ecs::component::Tick as std::cmp::Eq>::assert_receiver_is_total_eq(
let output: Val<bevy::ecs::component::Tick> = <bevy::ecs::component::Tick as std::clone::Clone>::clone(
&_self,
)
.into();
output
},
)
.register(
"clone",
"assert_receiver_is_total_eq",
|_self: Ref<bevy::ecs::component::Tick>| {
let output: Val<bevy::ecs::component::Tick> = <bevy::ecs::component::Tick as std::clone::Clone>::clone(
let output: () = <bevy::ecs::component::Tick as std::cmp::Eq>::assert_receiver_is_total_eq(
&_self,
)
.into();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<bevy::hierarchy::prelude::Parent>| {
let output: () = <bevy::hierarchy::prelude::Parent as std::cmp::Eq>::assert_receiver_is_total_eq(
&_self,
)
.into();
output
},
)
.register(
"eq",
|
Expand All @@ -54,21 +44,18 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
.into();
output
},
);
NamespaceBuilder::<::bevy::hierarchy::HierarchyEvent>::new(world)
)
.register(
"eq",
|
_self: Ref<bevy::hierarchy::HierarchyEvent>,
other: Ref<bevy::hierarchy::HierarchyEvent>|
{
let output: bool = <bevy::hierarchy::HierarchyEvent as std::cmp::PartialEq<
bevy::hierarchy::HierarchyEvent,
>>::eq(&_self, &other)
"assert_receiver_is_total_eq",
|_self: Ref<bevy::hierarchy::prelude::Parent>| {
let output: () = <bevy::hierarchy::prelude::Parent as std::cmp::Eq>::assert_receiver_is_total_eq(
&_self,
)
.into();
output
},
)
);
NamespaceBuilder::<::bevy::hierarchy::HierarchyEvent>::new(world)
.register(
"clone",
|_self: Ref<bevy::hierarchy::HierarchyEvent>| {
Expand All @@ -88,6 +75,19 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
.into();
output
},
)
.register(
"eq",
|
_self: Ref<bevy::hierarchy::HierarchyEvent>,
other: Ref<bevy::hierarchy::HierarchyEvent>|
{
let output: bool = <bevy::hierarchy::HierarchyEvent as std::cmp::PartialEq<
bevy::hierarchy::HierarchyEvent,
>>::eq(&_self, &other)
.into();
output
},
);
}
}
Loading