... and the rest.

This commit is contained in:
Bob
2010-01-12 22:32:27 +13:00
parent 16a9189bec
commit cecc163e52
8 changed files with 27 additions and 136 deletions

View File

@@ -13,7 +13,6 @@ namespace OpenRa.Game
public static IniFile AllRules;
public static Dictionary<string, List<string>> Categories = new Dictionary<string, List<string>>();
public static Dictionary<string, string> UnitCategory;
[Obsolete] public static InfoLoader<LegacyUnitInfo> UnitInfo;
public static InfoLoader<WeaponInfo> WeaponInfo;
public static InfoLoader<WarheadInfo> WarheadInfo;
public static InfoLoader<ProjectileInfo> ProjectileInfo;
@@ -64,14 +63,6 @@ namespace OpenRa.Game
"Plane");
UnitCategory = Categories.SelectMany(x => x.Value.Select(y => new KeyValuePair<string, string>(y, x.Key))).ToDictionary(x => x.Key, x => x.Value);
UnitInfo = new InfoLoader<LegacyUnitInfo>(
Pair.New<string, Func<string, LegacyUnitInfo>>("Building", s => new LegacyBuildingInfo(s)),
Pair.New<string, Func<string, LegacyUnitInfo>>("Defense", s => new LegacyBuildingInfo(s)),
Pair.New<string, Func<string, LegacyUnitInfo>>("Infantry", s => new InfantryInfo(s)),
Pair.New<string, Func<string, LegacyUnitInfo>>("Vehicle", s => new VehicleInfo(s)),
Pair.New<string, Func<string, LegacyUnitInfo>>("Ship", s => new VehicleInfo(s)),
Pair.New<string, Func<string, LegacyUnitInfo>>("Plane", s => new VehicleInfo(s)));
LoadCategories(
"Weapon",
"Warhead",