move Building et al into Mods/

This commit is contained in:
Bob
2010-11-04 17:26:56 +13:00
committed by Chris Forbes
parent fdfa1ddf97
commit 480c5edd75
60 changed files with 322 additions and 285 deletions

View File

@@ -12,9 +12,6 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.GameRules;
using OpenRA.Traits;
namespace OpenRA.Traits
{
@@ -122,22 +119,14 @@ namespace OpenRA.Traits
public static IEnumerable<int2> GetVisOrigins(Actor a)
{
if (a.Info.Traits.Contains<BuildingInfo>())
var ios = a.TraitOrDefault<IOccupySpace>();
if (ios != null)
{
var bi = a.Info.Traits.Get<BuildingInfo>();
return Footprint.Tiles(a.Info.Name, bi, a.Location);
var cells = ios.OccupiedCells();
if (cells.Any()) return cells;
}
else
{
var ios = a.TraitOrDefault<IOccupySpace>();
if (ios != null)
{
var cells = ios.OccupiedCells();
if (cells.Any()) return cells;
}
return new[] { (1f / Game.CellSize * a.CenterLocation).ToInt2() };
}
return new[] { (1f / Game.CellSize * a.CenterLocation).ToInt2() };
}
void RemoveActor(Actor a)