Saturday, March 24, 2018

Tracker - non-UWP trade codes

Now you can add non-UWP trade codes (Hot, Puzzle, etc) to the worlds. Next I need to actually do the T5 trade stuff - there was just a lot of work to get the infrastructure in place (wanting to make this user-customizable as possible so you can run it with whatever rules you want).

Finally fixed the UWP-based trade code check.  Turns out the check for isManual was not working, but you can restrict the entire list at the end:

 List results = App.DB.TradeClassifications.
     Where(x => x.Sizes.Length == 0 || x.Sizes.Contains(Size)).
     Where(x => x.Atmospheres.Length == 0 || x.Atmospheres.Contains(Atmosphere)).
     Where(x => x.Hydro.Length == 0 || x.Hydro.Contains(Hydro)).
     Where(x => x.Pop.Length == 0 || x.Pop.Contains(Population)).
     Where(x => x.Gov.Length == 0 || x.Gov.Contains(Gov)).
     Where(x =>x.Law.Length == 0 || x.Law.Contains(Law)).

     Where(x => x.IsManuallyAssigned == false).ToList();


No comments: