Unhardcode terrain types. Needs a bit more work re initialization and bridges
This commit is contained in:
@@ -34,7 +34,6 @@ namespace OpenRA
|
||||
public static Dictionary<string, WeaponInfo> Weapons;
|
||||
public static Dictionary<string, VoiceInfo> Voices;
|
||||
public static Dictionary<string, MusicInfo> Music;
|
||||
public static Dictionary<TerrainType, TerrainCost> TerrainTypes;
|
||||
|
||||
public static void LoadRules(Manifest m, Map map)
|
||||
{
|
||||
@@ -48,9 +47,6 @@ namespace OpenRA
|
||||
Weapons = LoadYamlRules(m.Weapons, map.Weapons, (k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
|
||||
Voices = LoadYamlRules(m.Voices, map.Voices, (k, _) => new VoiceInfo(k.Value));
|
||||
Music = LoadYamlRules(m.Music, map.Music, (k, _) => new MusicInfo(k.Value));
|
||||
TerrainTypes = LoadYamlRules(m.Terrain, map.Terrain, (k, _) => new TerrainCost(k.Value))
|
||||
.ToDictionary(kv => (TerrainType)Enum.Parse(typeof(TerrainType), kv.Key, true), kv => kv.Value);
|
||||
|
||||
TechTree = new TechTree();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user