BuildingCapture, ActorLost now use notifications.yaml
less redundancy, aggregates notification audio files
This commit is contained in:
@@ -14,8 +14,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class CaptureNotificationInfo : ITraitInfo
|
class CaptureNotificationInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly string Race = null;
|
public readonly string Notification = "BuildingCaptured";
|
||||||
public readonly string Notification = null;
|
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new CaptureNotification(this); }
|
public object Create(ActorInitializer init) { return new CaptureNotification(this); }
|
||||||
}
|
}
|
||||||
@@ -33,10 +32,7 @@ namespace OpenRA.Mods.RA
|
|||||||
if (captor.World.LocalPlayer != captor.Owner)
|
if (captor.World.LocalPlayer != captor.Owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Info.Race != null && Info.Race != newOwner.Country.Race)
|
Sound.PlayNotification(captor.World.LocalPlayer, "Speech", Info.Notification, newOwner.Country.Race);
|
||||||
return;
|
|
||||||
|
|
||||||
Sound.PlayToPlayer(captor.World.LocalPlayer, Info.Notification);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class ActorLostNotificationInfo : ITraitInfo
|
class ActorLostNotificationInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly string Race = null;
|
public readonly string Notification = "UnitLost";
|
||||||
public readonly string Notification = null;
|
|
||||||
public readonly bool NotifyAll = false;
|
public readonly bool NotifyAll = false;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new ActorLostNotification(this); }
|
public object Create(ActorInitializer init) { return new ActorLostNotification(this); }
|
||||||
@@ -32,9 +31,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public void Killed(Actor self, AttackInfo e)
|
public void Killed(Actor self, AttackInfo e)
|
||||||
{
|
{
|
||||||
var player = (Info.NotifyAll) ? self.World.LocalPlayer : self.Owner;
|
var player = (Info.NotifyAll) ? self.World.LocalPlayer : self.Owner;
|
||||||
if (Info.Race != null && Info.Race != self.Owner.Country.Race)
|
Sound.PlayNotification(player, "Speech", Info.Notification, self.Owner.Country.Race);
|
||||||
return;
|
|
||||||
Sound.PlayToPlayer(player, Info.Notification);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class CaptureNotificationInfo : ITraitInfo
|
class CaptureNotificationInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly string Race = null;
|
public readonly string Notification = "BuildingCaptured";
|
||||||
public readonly string Notification = null;
|
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new CaptureNotification(this); }
|
public object Create(ActorInitializer init) { return new CaptureNotification(this); }
|
||||||
}
|
}
|
||||||
@@ -33,10 +32,7 @@ namespace OpenRA.Mods.RA
|
|||||||
if (captor.World.LocalPlayer != captor.Owner)
|
if (captor.World.LocalPlayer != captor.Owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Info.Race != null && Info.Race != oldOwner.Country.Race)
|
Sound.PlayNotification(captor.World.LocalPlayer, "Speech", Info.Notification, oldOwner.Country.Race);
|
||||||
return;
|
|
||||||
|
|
||||||
Sound.PlayToPlayer(captor.World.LocalPlayer, Info.Notification);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
Speech:
|
Speech:
|
||||||
|
Prefixes:
|
||||||
|
gdi: gdi
|
||||||
|
nod: nod
|
||||||
Notifications:
|
Notifications:
|
||||||
Repairing: repair1
|
Repairing: repair1
|
||||||
LowPower: lopower1
|
LowPower: lopower1
|
||||||
@@ -21,6 +24,11 @@ Speech:
|
|||||||
Building: bldging1
|
Building: bldging1
|
||||||
ConstructionComplete: constru1
|
ConstructionComplete: constru1
|
||||||
Reinforce: reinfor1
|
Reinforce: reinfor1
|
||||||
|
UnitLost: unitlost
|
||||||
|
BuildingLost: strclost
|
||||||
|
CivilianKilled: civdead1
|
||||||
|
BuildingCaptured: capt1
|
||||||
|
DisablePrefixes: Repairing, LowPower, SilosNeeded, PrimaryBuildingSelected, BuildingCannotPlaceAudio, NewOptions, AbilityInsufficientPower, Win, Lose, BaseAttack, HarvesterAttack, Leave, UnitReady, NoBuild, Training, OnHold, Cancelled, Building, ConstructionComplete, Reinforce, UnitLost, BuildingLost, CivilianKilled
|
||||||
|
|
||||||
Sounds:
|
Sounds:
|
||||||
Notifications:
|
Notifications:
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlost.aud
|
|
||||||
AttackMove:
|
AttackMove:
|
||||||
AcceptsCloakCrate:
|
AcceptsCloakCrate:
|
||||||
WithSmoke:
|
WithSmoke:
|
||||||
@@ -62,7 +61,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlost.aud
|
|
||||||
AttackMove:
|
AttackMove:
|
||||||
AcceptsCloakCrate:
|
AcceptsCloakCrate:
|
||||||
WithSmoke:
|
WithSmoke:
|
||||||
@@ -91,7 +89,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlost.aud
|
|
||||||
Explodes:
|
Explodes:
|
||||||
Weapon: HeliExplode
|
Weapon: HeliExplode
|
||||||
EmptyWeapon: HeliExplode
|
EmptyWeapon: HeliExplode
|
||||||
@@ -139,7 +136,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlost.aud
|
|
||||||
SpawnViceroid:
|
SpawnViceroid:
|
||||||
Probability: 2
|
Probability: 2
|
||||||
CrushableInfantry:
|
CrushableInfantry:
|
||||||
@@ -175,7 +171,7 @@
|
|||||||
Weapon: Pistol
|
Weapon: Pistol
|
||||||
AttackFrontal:
|
AttackFrontal:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: civdead1.aud
|
Notification: CivilianKilled
|
||||||
NotifyAll: true
|
NotifyAll: true
|
||||||
ScaredyCat:
|
ScaredyCat:
|
||||||
RenderInfantryPanic:
|
RenderInfantryPanic:
|
||||||
@@ -196,7 +192,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlost.aud
|
|
||||||
DebugMuzzlePositions:
|
DebugMuzzlePositions:
|
||||||
|
|
||||||
^Ship:
|
^Ship:
|
||||||
@@ -215,7 +210,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlost.aud
|
|
||||||
AttackMove:
|
AttackMove:
|
||||||
DebugMuzzlePositions:
|
DebugMuzzlePositions:
|
||||||
|
|
||||||
@@ -252,14 +246,10 @@
|
|||||||
ActorTypes: e6,e1
|
ActorTypes: e6,e1
|
||||||
MustBeDestroyed:
|
MustBeDestroyed:
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
CaptureNotification@GDI:
|
CaptureNotification:
|
||||||
Race: gdi
|
Notification: BuildingCaptured
|
||||||
Notification: gdicapt1.aud
|
|
||||||
CaptureNotification@NOD:
|
|
||||||
Race: nod
|
|
||||||
Notification: nodcapt1.aud
|
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: strclost.aud
|
Notification: BuildingLost
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
RelativeToTopLeft: yes
|
RelativeToTopLeft: yes
|
||||||
AutoTargetIgnore:
|
AutoTargetIgnore:
|
||||||
|
|||||||
@@ -223,7 +223,6 @@ PVICE:
|
|||||||
Queue: Biolab
|
Queue: Biolab
|
||||||
BuildPaletteOrder: 40
|
BuildPaletteOrder: 40
|
||||||
Owner: gdi, nod
|
Owner: gdi, nod
|
||||||
# Prerequisites: bio
|
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Description: Mutated abomination that spits liquid tiberium.\n Strong vs Infantry, Buildings\n Weak vs Aircraft
|
Description: Mutated abomination that spits liquid tiberium.\n Strong vs Infantry, Buildings\n Weak vs Aircraft
|
||||||
Icon: viceicnh
|
Icon: viceicnh
|
||||||
@@ -231,5 +230,4 @@ PVICE:
|
|||||||
Selectable:
|
Selectable:
|
||||||
Voice: DinoVoice
|
Voice: DinoVoice
|
||||||
SelectionDecorations:
|
SelectionDecorations:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlost.aud
|
|
||||||
@@ -29,6 +29,9 @@ Speech:
|
|||||||
BuildingReady: BDRDY
|
BuildingReady: BDRDY
|
||||||
OrderPlaced: ORDER
|
OrderPlaced: ORDER
|
||||||
Reinforce: REINF
|
Reinforce: REINF
|
||||||
|
UnitLost: ULOST
|
||||||
|
BuildingLost: BLOST
|
||||||
|
BuildingCaptured: CAPT
|
||||||
|
|
||||||
Sounds:
|
Sounds:
|
||||||
Notifications:
|
Notifications:
|
||||||
|
|||||||
@@ -23,15 +23,7 @@
|
|||||||
GainsExperience:
|
GainsExperience:
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification@Atreides:
|
ActorLostNotification:
|
||||||
Race: atreides
|
|
||||||
Notification: AI_ULOST.AUD
|
|
||||||
ActorLostNotification@Harkonnen:
|
|
||||||
Race: harkonnen
|
|
||||||
Notification: HI_ULOST.AUD
|
|
||||||
ActorLostNotification@Ordos:
|
|
||||||
Race: ordos
|
|
||||||
Notification: OI_ULOST.AUD
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types:Vehicle
|
Types:Vehicle
|
||||||
GivesBounty:
|
GivesBounty:
|
||||||
@@ -67,15 +59,7 @@
|
|||||||
GainsExperience:
|
GainsExperience:
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification@Atreides:
|
ActorLostNotification:
|
||||||
Race: atreides
|
|
||||||
Notification: AI_ULOST.AUD
|
|
||||||
ActorLostNotification@Harkonnen:
|
|
||||||
Race: harkonnen
|
|
||||||
Notification: HI_ULOST.AUD
|
|
||||||
ActorLostNotification@Ordos:
|
|
||||||
Race: ordos
|
|
||||||
Notification: OI_ULOST.AUD
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types:Tank
|
Types:Tank
|
||||||
GivesBounty:
|
GivesBounty:
|
||||||
@@ -154,15 +138,7 @@
|
|||||||
GainsExperience:
|
GainsExperience:
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification@Atreides:
|
ActorLostNotification:
|
||||||
Race: atreides
|
|
||||||
Notification: AI_ULOST.AUD
|
|
||||||
ActorLostNotification@Harkonnen:
|
|
||||||
Race: harkonnen
|
|
||||||
Notification: HI_ULOST.AUD
|
|
||||||
ActorLostNotification@Ordos:
|
|
||||||
Race: ordos
|
|
||||||
Notification: OI_ULOST.AUD
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types:Infantry
|
Types:Infantry
|
||||||
GivesBounty:
|
GivesBounty:
|
||||||
@@ -188,15 +164,7 @@
|
|||||||
GainsExperience:
|
GainsExperience:
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification@Atreides:
|
ActorLostNotification:
|
||||||
Race: atreides
|
|
||||||
Notification: AI_ULOST.AUD
|
|
||||||
ActorLostNotification@Harkonnen:
|
|
||||||
Race: harkonnen
|
|
||||||
Notification: HI_ULOST.AUD
|
|
||||||
ActorLostNotification@Ordos:
|
|
||||||
Race: ordos
|
|
||||||
Notification: OI_ULOST.AUD
|
|
||||||
DebugAircraftFacing:
|
DebugAircraftFacing:
|
||||||
DebugAircraftSubPxX:
|
DebugAircraftSubPxX:
|
||||||
DebugAircraftSubPxY:
|
DebugAircraftSubPxY:
|
||||||
@@ -236,25 +204,11 @@
|
|||||||
ActorTypes: rifle,rifle,rifle,rifle,rifle,bazooka,bazooka,bazooka,engineer
|
ActorTypes: rifle,rifle,rifle,rifle,rifle,bazooka,bazooka,bazooka,engineer
|
||||||
MustBeDestroyed:
|
MustBeDestroyed:
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
|
|
||||||
FrozenUnderFog:
|
FrozenUnderFog:
|
||||||
CaptureNotification@Atreides:
|
CaptureNotification:
|
||||||
Race: atreides
|
ActorLostNotification:
|
||||||
Notification: AI_CAPT.AUD
|
Notification: BuildingLost
|
||||||
CaptureNotification@Harkonnen:
|
|
||||||
Race: harkonnen
|
|
||||||
Notification: HI_CAPT.AUD
|
|
||||||
CaptureNotification@Ordos:
|
|
||||||
Race: ordos
|
|
||||||
Notification: OI_CAPT.AUD
|
|
||||||
ActorLostNotification@Atreides:
|
|
||||||
Race: atreides
|
|
||||||
Notification: AI_BLOST.AUD
|
|
||||||
ActorLostNotification@Harkonnen:
|
|
||||||
Race: harkonnen
|
|
||||||
Notification: HI_BLOST.AUD
|
|
||||||
ActorLostNotification@Ordos:
|
|
||||||
Race: ordos
|
|
||||||
Notification: OI_BLOST.AUD
|
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
RelativeToTopLeft: yes
|
RelativeToTopLeft: yes
|
||||||
AutoTargetIgnore:
|
AutoTargetIgnore:
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ Speech:
|
|||||||
Cancelled: cancld1
|
Cancelled: cancld1
|
||||||
Building: abldgin1
|
Building: abldgin1
|
||||||
ConstructionComplete: conscmp1
|
ConstructionComplete: conscmp1
|
||||||
|
UnitLost: unitlst1
|
||||||
|
NavalUnitLost: navylst1
|
||||||
|
AirUnitLost: aunitl1
|
||||||
|
BuildingCaptured: strucap1
|
||||||
|
|
||||||
|
|
||||||
Sounds:
|
Sounds:
|
||||||
Notifications:
|
Notifications:
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlst1.aud
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types:Vehicle
|
Types:Vehicle
|
||||||
GivesBounty:
|
GivesBounty:
|
||||||
@@ -64,7 +63,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlst1.aud
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types:Tank
|
Types:Tank
|
||||||
GivesBounty:
|
GivesBounty:
|
||||||
@@ -110,7 +108,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: unitlst1.aud
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types:Infantry
|
Types:Infantry
|
||||||
GivesBounty:
|
GivesBounty:
|
||||||
@@ -145,7 +142,7 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: navylst1.aud
|
Notification: NavalUnitLost
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types:Ship
|
Types:Ship
|
||||||
GivesBounty:
|
GivesBounty:
|
||||||
@@ -169,7 +166,7 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
Notification: aunitl1.aud
|
Notification: AirUnitLost
|
||||||
DebugAircraftFacing:
|
DebugAircraftFacing:
|
||||||
DebugAircraftSubPxX:
|
DebugAircraftSubPxX:
|
||||||
DebugAircraftSubPxY:
|
DebugAircraftSubPxY:
|
||||||
@@ -217,7 +214,6 @@
|
|||||||
GivesExperience:
|
GivesExperience:
|
||||||
# FrozenUnderFog:
|
# FrozenUnderFog:
|
||||||
CaptureNotification:
|
CaptureNotification:
|
||||||
Notification: strucap1.aud
|
|
||||||
EditorAppearance:
|
EditorAppearance:
|
||||||
RelativeToTopLeft: yes
|
RelativeToTopLeft: yes
|
||||||
ShakeOnDeath:
|
ShakeOnDeath:
|
||||||
|
|||||||
Reference in New Issue
Block a user