Skip to content

Commit

Permalink
Tameable filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
jamckee authored and Rottenbeer committed Aug 4, 2019
1 parent 4bafb5f commit bf999ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
8 changes: 1 addition & 7 deletions LarkatorGUI/ArkReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,11 @@ private Dino ConvertCreature(GameObject obj)
Id = (ulong)obj.GetDinoId(),
BaseLevel = obj.GetBaseLevel(),
Name = obj.GetPropertyValue("TamedName", defaultValue: ""),
IsTameable = obj.GetPropertyValue("bForceDisabledTaming",defaultValue: true),
IsTameable = !obj.GetPropertyValue("bForceDisablingTaming",defaultValue: false),
Location = ConvertCoordsToLatLong(obj.Location),
WildLevels = new StatPoints(),
};

if (dino.Type.Contains("Polar"))
{
//stuff
int x = 1;
}

var status = obj.CharacterStatusComponent();
if (status != null)
{
Expand Down
16 changes: 8 additions & 8 deletions LarkatorGUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,17 +545,17 @@ private void SaveSearch_Click(object sender, RoutedEventArgs e)

try
{
NewSearch.Order = ListSearches.Where(sc => sc.Group == NewSearch.Group).Max(sc => sc.Order) + 100;
foreach (String newDino in NewSearchList)
{
tempSearch = new SearchCriteria(NewSearch);
tempSearch.Species = newDino;
tempSearch.Order = ListSearches.Where(sc => sc.Group == NewSearch.Group).Max(sc => sc.Order) + 100;
ListSearches.Add(tempSearch);
}
}
catch (InvalidOperationException) // no entries for .Max - ignore
{ }

foreach (String newDino in NewSearchList)
{
tempSearch = new SearchCriteria(NewSearch);
tempSearch.Species = newDino;
ListSearches.Add(tempSearch);
}

NewSearch = null;
tempSearch = null;
Expand Down Expand Up @@ -757,7 +757,7 @@ private void UpdateSearchResults(IList<SearchCriteria> searches)

ListResults.Clear();
foreach (var result in found)
if (!Properties.Settings.Default.hideUntameable || (Properties.Settings.Default.hideUntameable && result.IsTameable == true))
if (!Properties.Settings.Default.hideUntameable || (Properties.Settings.Default.hideUntameable && result.IsTameable))
ListResults.Add(result);

ShowCounts = true;
Expand Down

0 comments on commit bf999ef

Please sign in to comment.