Closed dmlary closed 10 months ago
The macro requires access to the bevy Time
resource in order to implement the cooldown feature (Local
s are safe as exclusive system parameters). I guess if you still want to log things, we could avoid adding the Res<Time>
when cooldown is explicitly set to 0.
In the current version, you can avoid the additional params by using the silent
log-level.
This plugin is great, but I get a compiler warning when using
#[sysfail(log)]
with an exclusive system. I've reproduced the error in the bevy_mod_sysfail example with the following changes.It looks like the generated code assumes its safe to add additional arguments to the function, but that's not the case with
fn system(world: &mut World)
. The generated function appears to befn(&'a mut bevy::prelude::World, bevy::prelude::Res<'b, bevy::prelude::Time>, Local<'c, LoggedErrors<Result<(), anyhow::Error>>>)
.