Remove World.TileSet.

This commit is contained in:
Paul Chote
2016-02-18 18:54:30 +00:00
parent 7993068c8f
commit 602acabe47
34 changed files with 59 additions and 65 deletions

View File

@@ -308,9 +308,10 @@ namespace OpenRA.Mods.Common.AI
attackForceTicks = Random.Next(0, Info.AttackForceInterval);
minAttackForceDelayTicks = Random.Next(0, Info.MinimumAttackForceDelay);
resourceTypeIndices = new BitArray(World.TileSet.TerrainInfo.Length); // Big enough
var tileset = World.Map.Rules.TileSet;
resourceTypeIndices = new BitArray(tileset.TerrainInfo.Length); // Big enough
foreach (var t in Map.Rules.Actors["world"].TraitInfos<ResourceTypeInfo>())
resourceTypeIndices.Set(World.TileSet.GetTerrainIndex(t.TerrainType), true);
resourceTypeIndices.Set(tileset.GetTerrainIndex(t.TerrainType), true);
}
// TODO: Possibly give this a more generic name when terrain type is unhardcoded
@@ -672,7 +673,7 @@ namespace OpenRA.Mods.Common.AI
{
var harvInfo = harvester.Info.TraitInfo<HarvesterInfo>();
var mobileInfo = harvester.Info.TraitInfo<MobileInfo>();
var passable = (uint)mobileInfo.GetMovementClass(World.TileSet);
var passable = (uint)mobileInfo.GetMovementClass(World.Map.Rules.TileSet);
var path = pathfinder.FindPath(
PathSearch.Search(World, mobileInfo, harvester, true,