Open
Description
What problem does this solve or what need does it fill?
So far systems that return bool
are the only ones that can be used as conditions. Fallible systems as conditions need to either panic or do their own error handling, they hardly can snap into the usual error handling.
What solution would you like?
Implement SystemCondition
for systems returning Result<bool, BevyError>
.
The exact behavior on an error must be decided on: Should it go through the error handler? Either way, only systems returning Ok(true)
should cause the condition to be evaluated as met.
Systems returning Result<(), BevyError>
could also be used as conditions where Ok(())
is considered as a met condition.