finished building *Infos
This commit is contained in:
@@ -6,12 +6,12 @@ namespace OpenRa.Game.GameRules
|
||||
{
|
||||
static class Footprint
|
||||
{
|
||||
public static IEnumerable<int2> Tiles( BuildingInfo buildingInfo, int2 position )
|
||||
public static IEnumerable<int2> Tiles( LegacyBuildingInfo buildingInfo, int2 position )
|
||||
{
|
||||
return Tiles(buildingInfo, position, true);
|
||||
}
|
||||
|
||||
public static IEnumerable<int2> Tiles( BuildingInfo buildingInfo, int2 position, bool adjustForPlacement )
|
||||
public static IEnumerable<int2> Tiles( LegacyBuildingInfo buildingInfo, int2 position, bool adjustForPlacement )
|
||||
{
|
||||
var dim = buildingInfo.Dimensions;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRa.Game.GameRules
|
||||
return Tiles( building.unitInfo, a.Location, false );
|
||||
}
|
||||
|
||||
public static IEnumerable<int2> UnpathableTiles( BuildingInfo buildingInfo, int2 position )
|
||||
public static IEnumerable<int2> UnpathableTiles( LegacyBuildingInfo buildingInfo, int2 position )
|
||||
{
|
||||
var footprint = buildingInfo.Footprint.Where( x => !char.IsWhiteSpace( x ) ).ToArray();
|
||||
foreach( var tile in TilesWhere( buildingInfo.Name, buildingInfo.Dimensions, footprint, a => a == 'x' ) )
|
||||
@@ -52,7 +52,7 @@ namespace OpenRa.Game.GameRules
|
||||
yield return new int2( x, y );
|
||||
}
|
||||
|
||||
public static int2 AdjustForBuildingSize( BuildingInfo unitInfo )
|
||||
public static int2 AdjustForBuildingSize( LegacyBuildingInfo unitInfo )
|
||||
{
|
||||
var dim = unitInfo.Dimensions;
|
||||
return new int2( dim.X / 2, dim.Y > 1 ? ( dim.Y + 1 ) / 2 : 0 );
|
||||
|
||||
Reference in New Issue
Block a user