diff options
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() |