Merge pull request #6796 from Mailaender/soviet-01-lua

Added soviet 01 to the Red Alert campaign
This commit is contained in:
Paul Chote
2014-11-04 08:06:28 +13:00
8 changed files with 949 additions and 17 deletions

View File

@@ -17,6 +17,8 @@ namespace OpenRA.Mods.RA.Power
public class PowerManagerInfo : ITraitInfo, Requires<DeveloperModeInfo>
{
public readonly int AdviceInterval = 250;
public readonly string SpeechNotification = "LowPower";
public object Create(ActorInitializer init) { return new PowerManager(init.self, this); }
}
@@ -118,7 +120,7 @@ namespace OpenRA.Mods.RA.Power
if (--nextPowerAdviceTime <= 0)
{
if (lowPower)
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", "LowPower", self.Owner.Country.Race);
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.SpeechNotification, self.Owner.Country.Race);
nextPowerAdviceTime = info.AdviceInterval;
}

View File

@@ -26,6 +26,13 @@ namespace OpenRA.Mods.RA.Scripting
{
self.QueueActivity(new Fly(self, Target.FromCell(self.World, cell)));
}
[ScriptActorPropertyActivity]
[Desc("Return to the base, which is either the airfield given, or an auto-selected one otherwise.")]
public void ReturnToBase(Actor airfield = null)
{
self.QueueActivity(new ReturnToBase(self, airfield));
}
}
[ScriptPropertyGroup("Combat")]