public bool InFilter(string filterText) { return(ModuleName.Contains(filterText) || PageName.Contains(filterText) || PageID.Contains(filterText) || ActionName.Contains(filterText) || ActionTitle.Contains(filterText) || SqlGroupName.Contains(filterText) || SqlTableName.Contains(filterText) || SqlName.Contains(filterText) || SqlDescription.Contains(filterText)); }
void GoalLocation() { //Goal column int ColumnNumber = BombInfo.GetSolvableModuleNames().Count(); foreach (string Module in BombInfo.GetSolvableModuleNames()) { if (Module == "Lockpick Maze") { ColumnNumber--; } } bool SpecialCase = false; foreach (string ModuleName in BombInfo.GetSolvableModuleNames()) { if (!ModuleName.Contains("Lockpick")) { if (ModuleName.ToLowerInvariant().Contains("color".ToLowerInvariant())) { ColumnNumber += 5; } else if (ModuleName.ToLowerInvariant().Contains("maze".ToLowerInvariant())) { ColumnNumber += 3; } else if (ModuleName.ToLowerInvariant().Contains("button".ToLowerInvariant())) { ColumnNumber += 1; } } } foreach (string ModuleName in BombInfo.GetSolvableModuleNames()) { if (ModuleName.Contains("Combination Lock") || ModuleName.Contains("Safety Safe")) { SpecialCase = true; ColumnNumber -= 3; } } if (BombInfo.GetSolvableModuleNames().Contains("Retirement")) { SpecialCase = true; ColumnNumber -= 4; } if (BombInfo.IsIndicatorOn(Indicator.BOB) && SpecialCase == false) { ColumnNumber = BombInfo.GetSerialNumberNumbers().Last(); } //Goal row int RowNumber; RowNumber = BombInfo.GetSerialNumberNumbers().First() + BombInfo.GetOffIndicators().Count(); foreach (string Indicator in BombInfo.GetOnIndicators()) { RowNumber += 2; } if (BombInfo.GetBatteryCount() < 4) { RowNumber += BombInfo.GetBatteryCount(); } Debug.LogFormat("<Lockpick Maze #{0}> Batteries: {1} (Less than 4?: {2}), Indicators ON: {3} (Add {4} to RowNumber), Indicators OFF: {5}, Serial 1st digit: {6}. RowNumber before addition/subtration: {7}", ModuleID, BombInfo.GetBatteryCount(), (BombInfo.GetBatteryCount() < 4), BombInfo.GetOnIndicators().Count(), (BombInfo.GetOnIndicators().Count() * 2), BombInfo.GetOffIndicators().Count(), BombInfo.GetSerialNumberNumbers().First(), RowNumber); while (ColumnNumber > 8) { ColumnNumber -= 8; } while (ColumnNumber <= 0) { ColumnNumber += 8; } while (RowNumber > 8) { RowNumber -= 8; } while (RowNumber <= 0) { RowNumber += 8; } GoalColumn = ColumnNumber - 1; GoalRow = RowNumber - 1; DebugGoalColumn = Number2String(GoalColumn + 1, true); Debug.LogFormat("[Lockpick Maze #{0}] Your goal location is {1}", ModuleID, DebugGoalColumn + (GoalRow + 1)); }