Add ControlType, fix a bunch of numerics

This commit is contained in:
Matt Nadareski
2020-09-06 23:00:13 -07:00
parent aa414bc3cd
commit 5d5520dbdd
16 changed files with 323 additions and 248 deletions

View File

@@ -76,10 +76,7 @@ namespace SabreTools.Library.DatItems
ChipType = mappings[Field.DatItem_ChipType].AsChipType();
if (mappings.Keys.Contains(Field.DatItem_Clock))
{
if (Int64.TryParse(mappings[Field.DatItem_Clock], out long clock))
Clock = clock;
}
Clock = Sanitizer.CleanLong(mappings[Field.DatItem_Clock]);
}
#endregion
@@ -198,9 +195,11 @@ namespace SabreTools.Library.DatItems
return false;
// DatItem_Clock
if (filter.DatItem_Clock.MatchesPositive(null, Clock) == false)
if (filter.DatItem_Clock.MatchesNeutral(null, Clock) == false)
return false;
if (filter.DatItem_Clock.MatchesNegative(null, Clock) == true)
else if (filter.DatItem_Clock.MatchesPositive(null, Clock) == false)
return false;
else if (filter.DatItem_Clock.MatchesNegative(null, Clock) == false)
return false;
return true;