diff --git a/OpenRA.Mods.D2k/BuildingCaptureNotification.cs b/OpenRA.Mods.D2k/BuildingCaptureNotification.cs index ceaaf8a240..e23746d7f4 100644 --- a/OpenRA.Mods.D2k/BuildingCaptureNotification.cs +++ b/OpenRA.Mods.D2k/BuildingCaptureNotification.cs @@ -14,8 +14,7 @@ namespace OpenRA.Mods.RA { class CaptureNotificationInfo : ITraitInfo { - public readonly string Race = null; - public readonly string Notification = null; + public readonly string Notification = "BuildingCaptured"; public object Create(ActorInitializer init) { return new CaptureNotification(this); } } @@ -33,10 +32,7 @@ namespace OpenRA.Mods.RA if (captor.World.LocalPlayer != captor.Owner) return; - if (Info.Race != null && Info.Race != newOwner.Country.Race) - return; - - Sound.PlayToPlayer(captor.World.LocalPlayer, Info.Notification); + Sound.PlayNotification(captor.World.LocalPlayer, "Speech", Info.Notification, newOwner.Country.Race); } } } diff --git a/OpenRA.Mods.RA/ActorLostNotification.cs b/OpenRA.Mods.RA/ActorLostNotification.cs index 827c8afe30..d053e79288 100644 --- a/OpenRA.Mods.RA/ActorLostNotification.cs +++ b/OpenRA.Mods.RA/ActorLostNotification.cs @@ -14,8 +14,7 @@ namespace OpenRA.Mods.RA { class ActorLostNotificationInfo : ITraitInfo { - public readonly string Race = null; - public readonly string Notification = null; + public readonly string Notification = "UnitLost"; public readonly bool NotifyAll = false; public object Create(ActorInitializer init) { return new ActorLostNotification(this); } @@ -32,9 +31,7 @@ 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); + Sound.PlayNotification(player, "Speech", Info.Notification, self.Owner.Country.Race); } } } diff --git a/OpenRA.Mods.RA/BuildingCaptureNotification.cs b/OpenRA.Mods.RA/BuildingCaptureNotification.cs index 67b23c3ab5..441bc69b0c 100644 --- a/OpenRA.Mods.RA/BuildingCaptureNotification.cs +++ b/OpenRA.Mods.RA/BuildingCaptureNotification.cs @@ -14,8 +14,7 @@ namespace OpenRA.Mods.RA { class CaptureNotificationInfo : ITraitInfo { - public readonly string Race = null; - public readonly string Notification = null; + public readonly string Notification = "BuildingCaptured"; public object Create(ActorInitializer init) { return new CaptureNotification(this); } } @@ -33,10 +32,7 @@ namespace OpenRA.Mods.RA if (captor.World.LocalPlayer != captor.Owner) return; - if (Info.Race != null && Info.Race != oldOwner.Country.Race) - return; - - Sound.PlayToPlayer(captor.World.LocalPlayer, Info.Notification); + Sound.PlayNotification(captor.World.LocalPlayer, "Speech", Info.Notification, oldOwner.Country.Race); } } } diff --git a/mods/cnc/notifications.yaml b/mods/cnc/notifications.yaml index fe9699c073..20a27318ee 100644 --- a/mods/cnc/notifications.yaml +++ b/mods/cnc/notifications.yaml @@ -1,4 +1,7 @@ Speech: + Prefixes: + gdi: gdi + nod: nod Notifications: Repairing: repair1 LowPower: lopower1 @@ -21,6 +24,11 @@ Speech: Building: bldging1 ConstructionComplete: constru1 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: Notifications: diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index 7615dfcc2c..2e891daebf 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -27,7 +27,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlost.aud AttackMove: AcceptsCloakCrate: WithSmoke: @@ -62,7 +61,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlost.aud AttackMove: AcceptsCloakCrate: WithSmoke: @@ -91,7 +89,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlost.aud Explodes: Weapon: HeliExplode EmptyWeapon: HeliExplode @@ -139,7 +136,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlost.aud SpawnViceroid: Probability: 2 CrushableInfantry: @@ -175,7 +171,7 @@ Weapon: Pistol AttackFrontal: ActorLostNotification: - Notification: civdead1.aud + Notification: CivilianKilled NotifyAll: true ScaredyCat: RenderInfantryPanic: @@ -196,7 +192,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlost.aud DebugMuzzlePositions: ^Ship: @@ -215,7 +210,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlost.aud AttackMove: DebugMuzzlePositions: @@ -252,14 +246,10 @@ ActorTypes: e6,e1 MustBeDestroyed: GivesExperience: - CaptureNotification@GDI: - Race: gdi - Notification: gdicapt1.aud - CaptureNotification@NOD: - Race: nod - Notification: nodcapt1.aud + CaptureNotification: + Notification: BuildingCaptured ActorLostNotification: - Notification: strclost.aud + Notification: BuildingLost EditorAppearance: RelativeToTopLeft: yes AutoTargetIgnore: diff --git a/mods/cnc/rules/infantry.yaml b/mods/cnc/rules/infantry.yaml index fdda163d5f..e4b90489f0 100644 --- a/mods/cnc/rules/infantry.yaml +++ b/mods/cnc/rules/infantry.yaml @@ -223,7 +223,6 @@ PVICE: Queue: Biolab BuildPaletteOrder: 40 Owner: gdi, nod -# Prerequisites: bio Tooltip: Description: Mutated abomination that spits liquid tiberium.\n Strong vs Infantry, Buildings\n Weak vs Aircraft Icon: viceicnh @@ -231,5 +230,4 @@ PVICE: Selectable: Voice: DinoVoice SelectionDecorations: - ActorLostNotification: - Notification: unitlost.aud + ActorLostNotification: \ No newline at end of file diff --git a/mods/d2k/notifications.yaml b/mods/d2k/notifications.yaml index 46af2a46c6..f00743a389 100644 --- a/mods/d2k/notifications.yaml +++ b/mods/d2k/notifications.yaml @@ -29,6 +29,9 @@ Speech: BuildingReady: BDRDY OrderPlaced: ORDER Reinforce: REINF + UnitLost: ULOST + BuildingLost: BLOST + BuildingCaptured: CAPT Sounds: Notifications: diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index 6a9c995faf..703740beef 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -23,15 +23,7 @@ GainsExperience: GivesExperience: DrawLineToTarget: - ActorLostNotification@Atreides: - Race: atreides - Notification: AI_ULOST.AUD - ActorLostNotification@Harkonnen: - Race: harkonnen - Notification: HI_ULOST.AUD - ActorLostNotification@Ordos: - Race: ordos - Notification: OI_ULOST.AUD + ActorLostNotification: ProximityCaptor: Types:Vehicle GivesBounty: @@ -67,15 +59,7 @@ GainsExperience: GivesExperience: DrawLineToTarget: - ActorLostNotification@Atreides: - Race: atreides - Notification: AI_ULOST.AUD - ActorLostNotification@Harkonnen: - Race: harkonnen - Notification: HI_ULOST.AUD - ActorLostNotification@Ordos: - Race: ordos - Notification: OI_ULOST.AUD + ActorLostNotification: ProximityCaptor: Types:Tank GivesBounty: @@ -154,15 +138,7 @@ GainsExperience: GivesExperience: DrawLineToTarget: - ActorLostNotification@Atreides: - Race: atreides - Notification: AI_ULOST.AUD - ActorLostNotification@Harkonnen: - Race: harkonnen - Notification: HI_ULOST.AUD - ActorLostNotification@Ordos: - Race: ordos - Notification: OI_ULOST.AUD + ActorLostNotification: ProximityCaptor: Types:Infantry GivesBounty: @@ -188,15 +164,7 @@ GainsExperience: GivesExperience: DrawLineToTarget: - ActorLostNotification@Atreides: - Race: atreides - Notification: AI_ULOST.AUD - ActorLostNotification@Harkonnen: - Race: harkonnen - Notification: HI_ULOST.AUD - ActorLostNotification@Ordos: - Race: ordos - Notification: OI_ULOST.AUD + ActorLostNotification: DebugAircraftFacing: DebugAircraftSubPxX: DebugAircraftSubPxY: @@ -236,25 +204,11 @@ ActorTypes: rifle,rifle,rifle,rifle,rifle,bazooka,bazooka,bazooka,engineer MustBeDestroyed: GivesExperience: + FrozenUnderFog: - CaptureNotification@Atreides: - Race: atreides - Notification: AI_CAPT.AUD - 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 + CaptureNotification: + ActorLostNotification: + Notification: BuildingLost EditorAppearance: RelativeToTopLeft: yes AutoTargetIgnore: diff --git a/mods/ra/notifications.yaml b/mods/ra/notifications.yaml index cfcde2d486..aeab522df8 100644 --- a/mods/ra/notifications.yaml +++ b/mods/ra/notifications.yaml @@ -20,6 +20,11 @@ Speech: Cancelled: cancld1 Building: abldgin1 ConstructionComplete: conscmp1 + UnitLost: unitlst1 + NavalUnitLost: navylst1 + AirUnitLost: aunitl1 + BuildingCaptured: strucap1 + Sounds: Notifications: diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index b06075f5c2..01d0078538 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -26,7 +26,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlst1.aud ProximityCaptor: Types:Vehicle GivesBounty: @@ -64,7 +63,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlst1.aud ProximityCaptor: Types:Tank GivesBounty: @@ -110,7 +108,6 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: unitlst1.aud ProximityCaptor: Types:Infantry GivesBounty: @@ -145,7 +142,7 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: navylst1.aud + Notification: NavalUnitLost ProximityCaptor: Types:Ship GivesBounty: @@ -169,7 +166,7 @@ GivesExperience: DrawLineToTarget: ActorLostNotification: - Notification: aunitl1.aud + Notification: AirUnitLost DebugAircraftFacing: DebugAircraftSubPxX: DebugAircraftSubPxY: @@ -217,7 +214,6 @@ GivesExperience: # FrozenUnderFog: CaptureNotification: - Notification: strucap1.aud EditorAppearance: RelativeToTopLeft: yes ShakeOnDeath: