Skip to content

chore(codegen): update bevy bindings #181

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

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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)
.overwrite_script_function(
.register(
"eq",
|
_self: Ref<bevy::core::prelude::Name>,
Expand All @@ -27,7 +27,7 @@ impl ::bevy::app::Plugin for BevyCoreScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::core::prelude::Name>| {
let output: Val<bevy::core::prelude::Name> = <bevy::core::prelude::Name as std::clone::Clone>::clone(
Expand Down
64 changes: 32 additions & 32 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,7 +13,7 @@ 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)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::ecs::entity::Entity>| {
let output: Val<bevy::ecs::entity::Entity> = <bevy::ecs::entity::Entity as std::clone::Clone>::clone(
Expand All @@ -23,7 +23,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"eq",
|
_self: Ref<bevy::ecs::entity::Entity>,
Expand All @@ -36,7 +36,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"from_raw",
|index: u32| {
let output: Val<bevy::ecs::entity::Entity> = bevy::ecs::entity::Entity::from_raw(
Expand All @@ -46,7 +46,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"to_bits",
|_self: Val<bevy::ecs::entity::Entity>| {
let output: u64 = bevy::ecs::entity::Entity::to_bits(
Expand All @@ -56,7 +56,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"from_bits",
|bits: u64| {
let output: Val<bevy::ecs::entity::Entity> = bevy::ecs::entity::Entity::from_bits(
Expand All @@ -66,7 +66,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"index",
|_self: Val<bevy::ecs::entity::Entity>| {
let output: u32 = bevy::ecs::entity::Entity::index(
Expand All @@ -76,7 +76,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"generation",
|_self: Val<bevy::ecs::entity::Entity>| {
let output: u32 = bevy::ecs::entity::Entity::generation(
Expand All @@ -91,7 +91,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
NamespaceBuilder::<::bevy::ecs::world::OnRemove>::new(world);
NamespaceBuilder::<::bevy::ecs::world::OnReplace>::new(world);
NamespaceBuilder::<::bevy::ecs::component::ComponentId>::new(world)
.overwrite_script_function(
.register(
"eq",
|
_self: Ref<bevy::ecs::component::ComponentId>,
Expand All @@ -104,7 +104,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::ecs::component::ComponentId>| {
let output: Val<bevy::ecs::component::ComponentId> = <bevy::ecs::component::ComponentId as std::clone::Clone>::clone(
Expand All @@ -114,7 +114,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.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(
Expand All @@ -124,7 +124,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"new",
|index: usize| {
let output: Val<bevy::ecs::component::ComponentId> = bevy::ecs::component::ComponentId::new(
Expand All @@ -134,7 +134,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"index",
|_self: Val<bevy::ecs::component::ComponentId>| {
let output: usize = bevy::ecs::component::ComponentId::index(
Expand All @@ -145,7 +145,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
},
);
NamespaceBuilder::<::bevy::ecs::component::Tick>::new(world)
.overwrite_script_function(
.register(
"new",
|tick: u32| {
let output: Val<bevy::ecs::component::Tick> = bevy::ecs::component::Tick::new(
Expand All @@ -155,23 +155,23 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"get",
|_self: Val<bevy::ecs::component::Tick>| {
let output: u32 = bevy::ecs::component::Tick::get(_self.into_inner())
.into();
output
},
)
.overwrite_script_function(
.register(
"set",
|mut _self: Mut<bevy::ecs::component::Tick>, tick: u32| {
let output: () = bevy::ecs::component::Tick::set(&mut _self, tick)
.into();
output
},
)
.overwrite_script_function(
.register(
"is_newer_than",
|
_self: Val<bevy::ecs::component::Tick>,
Expand All @@ -187,7 +187,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"eq",
|
_self: Ref<bevy::ecs::component::Tick>,
Expand All @@ -200,7 +200,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"assert_receiver_is_total_eq",
|_self: Ref<bevy::ecs::component::Tick>| {
let output: () = <bevy::ecs::component::Tick as std::cmp::Eq>::assert_receiver_is_total_eq(
Expand All @@ -210,7 +210,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::ecs::component::Tick>| {
let output: Val<bevy::ecs::component::Tick> = <bevy::ecs::component::Tick as std::clone::Clone>::clone(
Expand All @@ -221,7 +221,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
},
);
NamespaceBuilder::<::bevy::ecs::component::ComponentTicks>::new(world)
.overwrite_script_function(
.register(
"is_added",
|
_self: Ref<bevy::ecs::component::ComponentTicks>,
Expand All @@ -237,7 +237,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"is_changed",
|
_self: Ref<bevy::ecs::component::ComponentTicks>,
Expand All @@ -253,7 +253,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"new",
|change_tick: Val<bevy::ecs::component::Tick>| {
let output: Val<bevy::ecs::component::ComponentTicks> = bevy::ecs::component::ComponentTicks::new(
Expand All @@ -263,7 +263,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"set_changed",
|
mut _self: Mut<bevy::ecs::component::ComponentTicks>,
Expand All @@ -277,7 +277,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::ecs::component::ComponentTicks>| {
let output: Val<bevy::ecs::component::ComponentTicks> = <bevy::ecs::component::ComponentTicks as std::clone::Clone>::clone(
Expand All @@ -288,7 +288,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
},
);
NamespaceBuilder::<::bevy::ecs::identifier::Identifier>::new(world)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::ecs::identifier::Identifier>| {
let output: Val<bevy::ecs::identifier::Identifier> = <bevy::ecs::identifier::Identifier as std::clone::Clone>::clone(
Expand All @@ -298,7 +298,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"low",
|_self: Val<bevy::ecs::identifier::Identifier>| {
let output: u32 = bevy::ecs::identifier::Identifier::low(
Expand All @@ -308,7 +308,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"masked_high",
|_self: Val<bevy::ecs::identifier::Identifier>| {
let output: u32 = bevy::ecs::identifier::Identifier::masked_high(
Expand All @@ -318,7 +318,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"to_bits",
|_self: Val<bevy::ecs::identifier::Identifier>| {
let output: u64 = bevy::ecs::identifier::Identifier::to_bits(
Expand All @@ -328,7 +328,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"from_bits",
|value: u64| {
let output: Val<bevy::ecs::identifier::Identifier> = bevy::ecs::identifier::Identifier::from_bits(
Expand All @@ -338,7 +338,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"eq",
|
_self: Ref<bevy::ecs::identifier::Identifier>,
Expand All @@ -352,7 +352,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
},
);
NamespaceBuilder::<::bevy::ecs::entity::EntityHash>::new(world)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::ecs::entity::EntityHash>| {
let output: Val<bevy::ecs::entity::EntityHash> = <bevy::ecs::entity::EntityHash as std::clone::Clone>::clone(
Expand All @@ -365,7 +365,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
NamespaceBuilder::<
::bevy::ecs::removal_detection::RemovedComponentEntity,
>::new(world)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::ecs::removal_detection::RemovedComponentEntity>| {
let output: Val<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
let mut world = app.world_mut();
NamespaceBuilder::<::bevy::hierarchy::prelude::Children>::new(world)
.overwrite_script_function(
.register(
"swap",
|
mut _self: Mut<bevy::hierarchy::prelude::Children>,
Expand All @@ -32,7 +32,7 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
},
);
NamespaceBuilder::<::bevy::hierarchy::prelude::Parent>::new(world)
.overwrite_script_function(
.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(
Expand All @@ -42,7 +42,7 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"eq",
|
_self: Ref<bevy::hierarchy::prelude::Parent>,
Expand All @@ -56,7 +56,7 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
},
);
NamespaceBuilder::<::bevy::hierarchy::HierarchyEvent>::new(world)
.overwrite_script_function(
.register(
"eq",
|
_self: Ref<bevy::hierarchy::HierarchyEvent>,
Expand All @@ -69,7 +69,7 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"clone",
|_self: Ref<bevy::hierarchy::HierarchyEvent>| {
let output: Val<bevy::hierarchy::HierarchyEvent> = <bevy::hierarchy::HierarchyEvent as std::clone::Clone>::clone(
Expand All @@ -79,7 +79,7 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
output
},
)
.overwrite_script_function(
.register(
"assert_receiver_is_total_eq",
|_self: Ref<bevy::hierarchy::HierarchyEvent>| {
let output: () = <bevy::hierarchy::HierarchyEvent as std::cmp::Eq>::assert_receiver_is_total_eq(
Expand Down
Loading