Merge commit 'matt/dune^'
Conflicts: .gitignore mods/d2k/rules/system.yaml
This commit is contained in:
@@ -14,6 +14,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
class ActorLostNotificationInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Race = null;
|
||||
public readonly string Notification = null;
|
||||
public readonly bool NotifyAll = false;
|
||||
|
||||
@@ -31,6 +32,8 @@ namespace OpenRA.Mods.RA
|
||||
public void Killed(Actor self, AttackInfo e)
|
||||
{
|
||||
var player = (Info.NotifyAll) ? self.World.LocalPlayer : self.Owner;
|
||||
if (Info.Race != null && Info.Race != self.Owner.Country.Race)
|
||||
return;
|
||||
Sound.PlayToPlayer(player, Info.Notification);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace OpenRA.Mods.RA
|
||||
public string WinNotification = null;
|
||||
public string LoseNotification = null;
|
||||
public int NotificationDelay = 1500; // Milliseconds
|
||||
public readonly string Race = null;
|
||||
|
||||
public object Create(ActorInitializer init) { return new ConquestVictoryConditions(this); }
|
||||
}
|
||||
|
||||
@@ -53,6 +55,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Lose(Actor self)
|
||||
{
|
||||
if (Info.Race != null && Info.Race != self.Owner.Country.Race) return;
|
||||
if (self.Owner.WinState == WinState.Lost) return;
|
||||
self.Owner.WinState = WinState.Lost;
|
||||
|
||||
@@ -74,6 +77,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Win(Actor self)
|
||||
{
|
||||
if (Info.Race != null && Info.Race != self.Owner.Country.Race) return;
|
||||
if (self.Owner.WinState == WinState.Won) return;
|
||||
self.Owner.WinState = WinState.Won;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
public readonly int NotifyInterval = 30; /* seconds */
|
||||
public readonly string Audio = "baseatk1.aud";
|
||||
public readonly string Race = null;
|
||||
|
||||
public object Create(ActorInitializer init) { return new BaseAttackNotifier(this); }
|
||||
}
|
||||
@@ -34,6 +35,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Damaged(Actor self, AttackInfo e)
|
||||
{
|
||||
if (info.Race != null && info.Race != self.Owner.Country.Race) return;
|
||||
/* only track last hit against our base */
|
||||
if (!self.HasTrait<Building>())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user