Skip to content

Commit 5ae0341

Browse files
committed
Fix preset selection warning when user loads a graph.
When a user loads a preset, Foreman would look for matching presets but fail to find a match because it did not load in the `water_resources` which resulted in it failing to notice things like water. We now do this by concatenating it onto the `resources` enumerable. Fixes #108
1 parent 25bfa87 commit 5ae0341

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foreman/DataCache/PresetProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ private static async Task<PresetErrorPackage> TestPresetStreamlined(Preset prese
251251
}
252252

253253
//have to process mining, generators and boilers (since we convert them to recipes as well)
254-
foreach (var objJToken in jsonData["resources"])
254+
foreach (var objJToken in jsonData["resources"].Concat(jsonData["water_resources"]))
255255
{
256256
if (objJToken["products"].Count() == 0)
257257
continue;

0 commit comments

Comments
 (0)