moved the rest of the mine crap into mod dll
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
namespace OpenRa.GameRules
|
||||
{
|
||||
class AftermathInfo
|
||||
public class AftermathInfo
|
||||
{
|
||||
public readonly int MTankDistance = 0;
|
||||
public readonly float QuakeUnitDamage = 0f;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System;
|
||||
namespace OpenRa.GameRules
|
||||
{
|
||||
class GeneralInfo
|
||||
public class GeneralInfo
|
||||
{
|
||||
/* Crates */
|
||||
public readonly int CrateMinimum = 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Collections;
|
||||
|
||||
namespace OpenRa.GameRules
|
||||
{
|
||||
class InfoLoader<T> : IEnumerable<KeyValuePair<string, T>>
|
||||
public class InfoLoader<T> : IEnumerable<KeyValuePair<string, T>>
|
||||
{
|
||||
readonly Dictionary<string, T> infos = new Dictionary<string, T>();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
namespace OpenRa.GameRules
|
||||
{
|
||||
class ProjectileInfo
|
||||
public class ProjectileInfo
|
||||
{
|
||||
public readonly bool AA = false;
|
||||
public readonly bool AG = true;
|
||||
|
||||
@@ -7,7 +7,7 @@ using OpenRa.GameRules;
|
||||
|
||||
namespace OpenRa
|
||||
{
|
||||
static class Rules
|
||||
public static class Rules
|
||||
{
|
||||
public static IniFile AllRules;
|
||||
public static Dictionary<string, List<string>> Categories = new Dictionary<string, List<string>>();
|
||||
|
||||
@@ -5,7 +5,7 @@ using OpenRa.Traits;
|
||||
|
||||
namespace OpenRa.GameRules
|
||||
{
|
||||
class TechTree
|
||||
public class TechTree
|
||||
{
|
||||
readonly Cache<string, List<NewUnitInfo>> producesIndex = new Cache<string, List<NewUnitInfo>>(x => new List<NewUnitInfo>());
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using IjwFramework.Collections;
|
||||
|
||||
namespace OpenRa.GameRules
|
||||
{
|
||||
class VoiceInfo
|
||||
public class VoiceInfo
|
||||
{
|
||||
public readonly string[] SovietVariants = { ".aud" };
|
||||
public readonly string[] AlliedVariants = { ".aud" };
|
||||
@@ -30,4 +30,29 @@ namespace OpenRa.GameRules
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class VoicePool
|
||||
{
|
||||
readonly string[] clips;
|
||||
readonly List<string> liveclips = new List<string>();
|
||||
|
||||
public VoicePool(params string[] clips)
|
||||
{
|
||||
this.clips = clips;
|
||||
}
|
||||
|
||||
public string GetNext()
|
||||
{
|
||||
if (liveclips.Count == 0)
|
||||
liveclips.AddRange(clips);
|
||||
|
||||
if (liveclips.Count == 0)
|
||||
return null; /* avoid crashing if there's no clips at all */
|
||||
|
||||
var i = Game.CosmeticRandom.Next(liveclips.Count);
|
||||
var s = liveclips[i];
|
||||
liveclips.RemoveAt(i);
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
namespace OpenRa.GameRules
|
||||
{
|
||||
class WeaponInfo
|
||||
public class WeaponInfo
|
||||
{
|
||||
public readonly string Anim = null;
|
||||
public readonly int Burst = 1;
|
||||
|
||||
Reference in New Issue
Block a user