Apply side effects for tuple args systems (#8)
* Apply side effects for tuple args systems. Deferred side effects(Commands) that were pushed in scripting exposed systems were only applied for argument-less systems. This PR fixes this by applying deferred side effects in macro that implement functions with arguments. * Bump version
This commit is contained in:
parent
8997159e2f
commit
928f5437fc
2 changed files with 4 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "bevy_scriptum"
|
name = "bevy_scriptum"
|
||||||
authors = ["Jaroslaw Konik <konikjar@gmail.com>"]
|
authors = ["Jaroslaw Konik <konikjar@gmail.com>"]
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,9 @@ macro_rules! impl_tuple {
|
||||||
let args = (
|
let args = (
|
||||||
$(args.0.get($idx).unwrap().clone_cast::<$t>(), )+
|
$(args.0.get($idx).unwrap().clone_cast::<$t>(), )+
|
||||||
);
|
);
|
||||||
Dynamic::from(inner_system.run(args, world))
|
let result = inner_system.run(args, world);
|
||||||
|
inner_system.apply_deferred(world);
|
||||||
|
Dynamic::from(result)
|
||||||
};
|
};
|
||||||
let system = IntoSystem::into_system(system_fn);
|
let system = IntoSystem::into_system(system_fn);
|
||||||
CallbackSystem {
|
CallbackSystem {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue