more cleanup

This commit is contained in:
Chris Forbes
2010-04-01 21:00:33 +13:00
parent 1f1e748f1b
commit c5fdda9141
6 changed files with 46 additions and 72 deletions

View File

@@ -35,7 +35,7 @@ namespace OpenRA
public static TechTree TechTree;
public static Dictionary<string, ActorInfo> Info;
public static Dictionary<string, NewWeaponInfo> Weapons;
public static Dictionary<string, WeaponInfo> Weapons;
public static void LoadRules(string map, Manifest m)
{
@@ -64,9 +64,9 @@ namespace OpenRA
Info.Add(kv.Key.ToLowerInvariant(), new ActorInfo(kv.Key.ToLowerInvariant(), kv.Value, yamlRules));
var weaponsYaml = m.Weapons.Select(a => MiniYaml.FromFile(a)).Aggregate(MiniYaml.Merge);
Weapons = new Dictionary<string, NewWeaponInfo>();
Weapons = new Dictionary<string, WeaponInfo>();
foreach (var kv in weaponsYaml)
Weapons.Add(kv.Key.ToLowerInvariant(), new NewWeaponInfo(kv.Key.ToLowerInvariant(), kv.Value));
Weapons.Add(kv.Key.ToLowerInvariant(), new WeaponInfo(kv.Key.ToLowerInvariant(), kv.Value));
TechTree = new TechTree();
}