Implement `SystemCondition` for systems returning `Result<bool, BevyError>` and `Result<(), BevyError>`
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.
I think fallible systems as run condition shouldn't run through the error handler, but directly consider that an error means the condition is false.
I adjusted the issue a bit, for me it is not that important how it is handled, just that this is supported.
I think fallible systems as run condition shouldn't run through the error handler, but directly consider that an error means the condition is false.
Strongly agree with this :)