removed old WeaponInfo

This commit is contained in:
Chris Forbes
2010-04-01 19:16:46 +13:00
parent a00abdab85
commit 1f1e748f1b
9 changed files with 11 additions and 63 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenRA
return xs.Aggregate(1f, (a, x) => a * x);
}
public static WeaponInfo GetPrimaryWeapon(this Actor self)
public static NewWeaponInfo GetPrimaryWeapon(this Actor self)
{
var info = self.Info.Traits.GetOrDefault<AttackBaseInfo>();
if (info == null) return null;
@@ -52,10 +52,10 @@ namespace OpenRA
var weapon = info.PrimaryWeapon;
if (weapon == null) return null;
return Rules.WeaponInfo[weapon];
return Rules.Weapons[weapon.ToLowerInvariant()];
}
public static WeaponInfo GetSecondaryWeapon(this Actor self)
public static NewWeaponInfo GetSecondaryWeapon(this Actor self)
{
var info = self.Info.Traits.GetOrDefault<AttackBaseInfo>();
if (info == null) return null;
@@ -63,7 +63,7 @@ namespace OpenRA
var weapon = info.SecondaryWeapon;
if (weapon == null) return null;
return Rules.WeaponInfo[weapon];
return Rules.Weapons[weapon.ToLowerInvariant()];
}
public static int GetMaxHP(this Actor self)