added VoiceInfo stuff

This commit is contained in:
Chris Forbes
2009-12-05 15:17:22 +13:00
parent 2435e48a82
commit 3294956c2f
5 changed files with 87 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ namespace OpenRa.Game
public static InfoLoader<WeaponInfo> WeaponInfo;
public static InfoLoader<WarheadInfo> WarheadInfo;
public static InfoLoader<ProjectileInfo> ProjectileInfo;
public static InfoLoader<VoiceInfo> VoiceInfo;
public static GeneralInfo General;
public static TechTree TechTree;
public static Map Map;
@@ -65,15 +66,17 @@ namespace OpenRa.Game
LoadCategories(
"Weapon",
"Warhead",
"Projectile");
"Projectile",
"Voice");
WeaponInfo = new InfoLoader<WeaponInfo>(
Pair.New<string, Func<string, WeaponInfo>>("Weapon", _ => new WeaponInfo()));
WarheadInfo = new InfoLoader<WarheadInfo>(
Pair.New<string, Func<string, WarheadInfo>>("Warhead", _ => new WarheadInfo()));
ProjectileInfo = new InfoLoader<ProjectileInfo>(
Pair.New<string, Func<string, ProjectileInfo>>("Projectile", _ => new ProjectileInfo()));
VoiceInfo = new InfoLoader<VoiceInfo>(
Pair.New<string, Func<string, VoiceInfo>>("Voice", _ => new VoiceInfo()));
TechTree = new TechTree();
Map = new Map( AllRules );

View File

@@ -58,6 +58,7 @@ namespace OpenRa.Game.GameRules
public readonly int Passengers = 0;
public readonly int Speed = 0;
public readonly bool NoMovingFire = false;
public readonly string Voice = "GenericVoice";
public MobileInfo(string name) : base(name) { }
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRa.Game.GameRules
{
class VoiceInfo
{
public readonly string[] SovietVariants = { ".aud" };
public readonly string[] AlliedVariants = { ".aud" };
public readonly string[] Select = {};
public readonly string[] Move = {};
public readonly string[] Attack = null;
}
}

View File

@@ -82,6 +82,7 @@
<Compile Include="Exts.cs" />
<Compile Include="GameRules\GeneralInfo.cs" />
<Compile Include="GameRules\TechTree.cs" />
<Compile Include="GameRules\VoiceInfo.cs" />
<Compile Include="IEffect.cs" />
<Compile Include="IOrderSource.cs" />
<Compile Include="LocalOrderSource.cs" />