renamed Info to LegacyInfo, marked Obsolete. added NewUnitInfo ref as Info.

This commit is contained in:
Chris Forbes
2010-01-10 18:28:24 +13:00
parent 74a2ed9624
commit 99a61ca8d9
52 changed files with 142 additions and 137 deletions

View File

@@ -14,7 +14,7 @@ namespace OpenRa.Game.Traits
public void OnSteal(Actor self, Actor thief)
{
// Steal half the ore the building holds
var toSteal = (self.Info as LegacyBuildingInfo).Storage/2;
var toSteal = (self.LegacyInfo as LegacyBuildingInfo).Storage/2;
self.Owner.TakeCash(toSteal);
thief.Owner.GiveCash(toSteal);
@@ -28,9 +28,9 @@ namespace OpenRa.Game.Traits
public IEnumerable<PipType> GetPips(Actor self)
{
for (int i = 0; i < self.Info.OrePips; i++)
for (int i = 0; i < self.LegacyInfo.OrePips; i++)
{
if (Game.LocalPlayer.GetSiloFullness() > i * 1.0f / self.Info.OrePips)
if (Game.LocalPlayer.GetSiloFullness() > i * 1.0f / self.LegacyInfo.OrePips)
{
yield return PipType.Yellow;
continue;