diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-24 15:26:02 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-02-24 15:26:02 -0500 |
commit | 24b4fb4f8fa0392c8a44aefa734ff6d558f3583d (patch) | |
tree | bf05c1eddf096301b3ca412c00e8bc05daff879a /Requirements.cs | |
parent | e40dbee06a652d0b25adfa89896b18c61004373f (diff) | |
download | manifold-garden-archipelago-24b4fb4f8fa0392c8a44aefa734ff6d558f3583d.tar.gz manifold-garden-archipelago-24b4fb4f8fa0392c8a44aefa734ff6d558f3583d.tar.bz2 manifold-garden-archipelago-24b4fb4f8fa0392c8a44aefa734ff6d558f3583d.zip |
Minor fixes/safety stuff
Diffstat (limited to 'Requirements.cs')
-rw-r--r-- | Requirements.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Requirements.cs b/Requirements.cs index 1613a47..954d1fe 100644 --- a/Requirements.cs +++ b/Requirements.cs | |||
@@ -113,17 +113,23 @@ namespace ManifoldGardenArchipelago | |||
113 | 113 | ||
114 | public override Decision Check() | 114 | public override Decision Check() |
115 | { | 115 | { |
116 | bool sawMaybe = false; | ||
117 | |||
116 | foreach (var requirement in _requirements) | 118 | foreach (var requirement in _requirements) |
117 | { | 119 | { |
118 | Decision decision = requirement.Check(); | 120 | Decision decision = requirement.Check(); |
119 | 121 | ||
120 | if (decision != Decision.No) | 122 | if (decision == Decision.Yes) |
121 | { | 123 | { |
122 | return decision; | 124 | return decision; |
123 | } | 125 | } |
126 | else if (decision == Decision.Maybe) | ||
127 | { | ||
128 | sawMaybe = true; | ||
129 | } | ||
124 | } | 130 | } |
125 | 131 | ||
126 | return Decision.No; | 132 | return sawMaybe ? Decision.Maybe : Decision.No; |
127 | } | 133 | } |
128 | 134 | ||
129 | public override string ToString() | 135 | public override string ToString() |