public override void Filter(List <int> inputList) { base.Filter(inputList); if (!IsFilterActive) { return; } foreach (var tileId in inputList) { var tile = Find.WorldGrid[tileId]; if (tile.biome.foragedFood != null && tile.biome.foragedFood == UserData.ForagedFood) { FilteredTiles.Add(tileId); } } }
public override void Filter(List <int> inputList) { base.Filter(inputList); if (!IsFilterActive) { return; } foreach (var tileId in inputList) { var difficulty = WorldPathGrid.CalculatedMovementDifficultyAt(tileId, false) * Find.WorldGrid.GetRoadMovementDifficultyMultiplier(tileId, -1); if (UserData.MovementDifficulty.InRange(difficulty)) { FilteredTiles.Add(tileId); } } }
public override void Filter(List <int> inputList) { //Log.Message($"[PrepareLanding] Filtering TileFilterForageability ({inputList.Count} tiles in input)"); //Log.Message($"[PrepareLanding] Min: {UserData.Forageability.Min}; Max: {UserData.Forageability.Max}"); foreach (var tileId in inputList) { var tile = Find.WorldGrid[tileId]; if (tile.biome.foragedFood == null) { continue; } //Log.Message($"[PL] Tile: {tileId}; forageability: {tile.biome.forageability}"); // forageability is a %age, so 25% is 0.25, we have to multiply by 100. if (UserData.Forageability.InRange(tile.biome.forageability * 100f)) { FilteredTiles.Add(tileId); } } }