Skip to content

chore(codegen): update bevy bindings #177

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 @@ -8,7 +8,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyCoreScriptingPlugin;
impl ::bevy::app::Plugin for BevyCoreScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyEcsScriptingPlugin;
impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand Down Expand Up @@ -161,7 +161,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
.overwrite_script_function(
"set",
|_self: Mut<bevy::ecs::component::Tick>, tick: u32| {
let output: () = ::bevy::ecs::component::Tick::set(&mut_self, tick)
let output: () = ::bevy::ecs::component::Tick::set(&mut _self, tick)
.into();
output
},
Expand Down Expand Up @@ -263,7 +263,7 @@ impl ::bevy::app::Plugin for BevyEcsScriptingPlugin {
change_tick: Val<bevy::ecs::component::Tick>|
{
let output: () = ::bevy::ecs::component::ComponentTicks::set_changed(
&mut_self,
&mut _self,
change_tick.into(),
)
.into();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyHierarchyScriptingPlugin;
impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand All @@ -23,7 +23,7 @@ impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin {
b_index: usize|
{
let output: () = ::bevy::hierarchy::prelude::Children::swap(
&mut_self,
&mut _self,
a_index,
b_index,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyInputScriptingPlugin;
impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand Down Expand Up @@ -947,7 +947,7 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
"set_press_threshold",
|_self: Mut<bevy::input::gamepad::ButtonSettings>, value: f32| {
let output: f32 = ::bevy::input::gamepad::ButtonSettings::set_press_threshold(
&mut_self,
&mut _self,
value,
)
.into();
Expand All @@ -968,7 +968,7 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
"set_release_threshold",
|_self: Mut<bevy::input::gamepad::ButtonSettings>, value: f32| {
let output: f32 = ::bevy::input::gamepad::ButtonSettings::set_release_threshold(
&mut_self,
&mut _self,
value,
)
.into();
Expand Down Expand Up @@ -1014,7 +1014,7 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
"set_livezone_upperbound",
|_self: Mut<bevy::input::gamepad::AxisSettings>, value: f32| {
let output: f32 = ::bevy::input::gamepad::AxisSettings::set_livezone_upperbound(
&mut_self,
&mut _self,
value,
)
.into();
Expand All @@ -1035,7 +1035,7 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
"set_deadzone_upperbound",
|_self: Mut<bevy::input::gamepad::AxisSettings>, value: f32| {
let output: f32 = ::bevy::input::gamepad::AxisSettings::set_deadzone_upperbound(
&mut_self,
&mut _self,
value,
)
.into();
Expand All @@ -1056,7 +1056,7 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
"set_livezone_lowerbound",
|_self: Mut<bevy::input::gamepad::AxisSettings>, value: f32| {
let output: f32 = ::bevy::input::gamepad::AxisSettings::set_livezone_lowerbound(
&mut_self,
&mut _self,
value,
)
.into();
Expand All @@ -1077,7 +1077,7 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
"set_deadzone_lowerbound",
|_self: Mut<bevy::input::gamepad::AxisSettings>, value: f32| {
let output: f32 = ::bevy::input::gamepad::AxisSettings::set_deadzone_lowerbound(
&mut_self,
&mut _self,
value,
)
.into();
Expand All @@ -1098,7 +1098,7 @@ impl ::bevy::app::Plugin for BevyInputScriptingPlugin {
"set_threshold",
|_self: Mut<bevy::input::gamepad::AxisSettings>, value: f32| {
let output: f32 = ::bevy::input::gamepad::AxisSettings::set_threshold(
&mut_self,
&mut _self,
value,
)
.into();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyMathScriptingPlugin;
impl ::bevy::app::Plugin for BevyMathScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand Down Expand Up @@ -2329,7 +2329,7 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin {
"reverse",
|_self: Mut<bevy::math::primitives::Triangle2d>| {
let output: () = ::bevy::math::primitives::Triangle2d::reverse(
&mut_self,
&mut _self,
)
.into();
output
Expand Down Expand Up @@ -2872,7 +2872,7 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin {
"reverse",
|_self: Mut<bevy::math::primitives::Triangle3d>| {
let output: () = ::bevy::math::primitives::Triangle3d::reverse(
&mut_self,
&mut _self,
)
.into();
output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyReflectScriptingPlugin;
impl ::bevy::app::Plugin for BevyReflectScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand Down Expand Up @@ -13367,7 +13367,7 @@ impl ::bevy::app::Plugin for BevyReflectScriptingPlugin {
.overwrite_script_function(
"set",
|_self: Mut<bevy::math::BVec2>, index: usize, value: bool| {
let output: () = ::bevy::math::BVec2::set(&mut_self, index, value)
let output: () = ::bevy::math::BVec2::set(&mut _self, index, value)
.into();
output
},
Expand Down Expand Up @@ -13444,7 +13444,7 @@ impl ::bevy::app::Plugin for BevyReflectScriptingPlugin {
.overwrite_script_function(
"set",
|_self: Mut<bevy::math::BVec3>, index: usize, value: bool| {
let output: () = ::bevy::math::BVec3::set(&mut_self, index, value)
let output: () = ::bevy::math::BVec3::set(&mut _self, index, value)
.into();
output
},
Expand Down Expand Up @@ -13539,7 +13539,7 @@ impl ::bevy::app::Plugin for BevyReflectScriptingPlugin {
.overwrite_script_function(
"set",
|_self: Mut<bevy::math::BVec4>, index: usize, value: bool| {
let output: () = ::bevy::math::BVec4::set(&mut_self, index, value)
let output: () = ::bevy::math::BVec4::set(&mut _self, index, value)
.into();
output
},
Expand Down Expand Up @@ -21856,7 +21856,7 @@ impl ::bevy::app::Plugin for BevyReflectScriptingPlugin {
.overwrite_script_function(
"set",
|_self: Mut<bevy::math::BVec3A>, index: usize, value: bool| {
let output: () = ::bevy::math::BVec3A::set(&mut_self, index, value)
let output: () = ::bevy::math::BVec3A::set(&mut _self, index, value)
.into();
output
},
Expand Down Expand Up @@ -21951,7 +21951,7 @@ impl ::bevy::app::Plugin for BevyReflectScriptingPlugin {
.overwrite_script_function(
"set",
|_self: Mut<bevy::math::BVec4A>, index: usize, value: bool| {
let output: () = ::bevy::math::BVec4A::set(&mut_self, index, value)
let output: () = ::bevy::math::BVec4A::set(&mut _self, index, value)
.into();
output
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyTimeScriptingPlugin;
impl ::bevy::app::Plugin for BevyTimeScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand Down Expand Up @@ -110,7 +110,7 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin {
mode: Val<bevy::time::prelude::TimerMode>|
{
let output: () = ::bevy::time::prelude::Timer::set_mode(
&mut_self,
&mut _self,
mode.into(),
)
.into();
Expand All @@ -120,15 +120,15 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin {
.overwrite_script_function(
"pause",
|_self: Mut<bevy::time::prelude::Timer>| {
let output: () = ::bevy::time::prelude::Timer::pause(&mut_self)
let output: () = ::bevy::time::prelude::Timer::pause(&mut _self)
.into();
output
},
)
.overwrite_script_function(
"unpause",
|_self: Mut<bevy::time::prelude::Timer>| {
let output: () = ::bevy::time::prelude::Timer::unpause(&mut_self)
let output: () = ::bevy::time::prelude::Timer::unpause(&mut _self)
.into();
output
},
Expand All @@ -144,7 +144,7 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin {
.overwrite_script_function(
"reset",
|_self: Mut<bevy::time::prelude::Timer>| {
let output: () = ::bevy::time::prelude::Timer::reset(&mut_self)
let output: () = ::bevy::time::prelude::Timer::reset(&mut _self)
.into();
output
},
Expand Down Expand Up @@ -292,14 +292,14 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin {
.overwrite_script_function(
"pause",
|_self: Mut<bevy::time::Stopwatch>| {
let output: () = ::bevy::time::Stopwatch::pause(&mut_self).into();
let output: () = ::bevy::time::Stopwatch::pause(&mut _self).into();
output
},
)
.overwrite_script_function(
"unpause",
|_self: Mut<bevy::time::Stopwatch>| {
let output: () = ::bevy::time::Stopwatch::unpause(&mut_self).into();
let output: () = ::bevy::time::Stopwatch::unpause(&mut _self).into();
output
},
)
Expand All @@ -313,7 +313,7 @@ impl ::bevy::app::Plugin for BevyTimeScriptingPlugin {
.overwrite_script_function(
"reset",
|_self: Mut<bevy::time::Stopwatch>| {
let output: () = ::bevy::time::Stopwatch::reset(&mut_self).into();
let output: () = ::bevy::time::Stopwatch::reset(&mut _self).into();
output
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use bevy_mod_scripting_core::{
AddContextInitializer, StoreDocumentation,
bindings::{ReflectReference, function::from::{Ref, Mut, Val}},
};
use crate::{*, namespaced_register::NamespaceBuilder};
use crate::*;
pub struct BevyTransformScriptingPlugin;
impl ::bevy::app::Plugin for BevyTransformScriptingPlugin {
fn build(&self, app: &mut ::bevy::prelude::App) {
Expand Down Expand Up @@ -174,7 +174,7 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin {
"rotate_x",
|_self: Mut<bevy::transform::components::Transform>, angle: f32| {
let output: () = ::bevy::transform::components::Transform::rotate_x(
&mut_self,
&mut _self,
angle,
)
.into();
Expand All @@ -185,7 +185,7 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin {
"rotate_y",
|_self: Mut<bevy::transform::components::Transform>, angle: f32| {
let output: () = ::bevy::transform::components::Transform::rotate_y(
&mut_self,
&mut _self,
angle,
)
.into();
Expand All @@ -196,7 +196,7 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin {
"rotate_z",
|_self: Mut<bevy::transform::components::Transform>, angle: f32| {
let output: () = ::bevy::transform::components::Transform::rotate_z(
&mut_self,
&mut _self,
angle,
)
.into();
Expand All @@ -207,7 +207,7 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin {
"rotate_local_x",
|_self: Mut<bevy::transform::components::Transform>, angle: f32| {
let output: () = ::bevy::transform::components::Transform::rotate_local_x(
&mut_self,
&mut _self,
angle,
)
.into();
Expand All @@ -218,7 +218,7 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin {
"rotate_local_y",
|_self: Mut<bevy::transform::components::Transform>, angle: f32| {
let output: () = ::bevy::transform::components::Transform::rotate_local_y(
&mut_self,
&mut _self,
angle,
)
.into();
Expand All @@ -229,7 +229,7 @@ impl ::bevy::app::Plugin for BevyTransformScriptingPlugin {
"rotate_local_z",
|_self: Mut<bevy::transform::components::Transform>, angle: f32| {
let output: () = ::bevy::transform::components::Transform::rotate_local_z(
&mut_self,
&mut _self,
angle,
)
.into();
Expand Down