-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
condition_changed
and condition_became_true
to `common_condit…
…ions` (#14917) # Objective - I needed to run a system whenever a specific condition became true after being previously false. - Other users might also need to run a system when a condition changes, regardless of if it became true or false. ## Solution - This adds two systems to common_conditions: - `condition_changed` that changes whenever the inner condition changes - `condition_became_true` that returns true whenever the inner condition becomes true after previously being false ## Testing - I added a doctest for each function --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
- Loading branch information
1 parent
23979b8
commit 12f005a
Showing
1 changed file
with
118 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters