diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 17d589b786..bcf50f1fd1 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -262,9 +262,6 @@ namespace OpenRA orderManager.LastTickTime = Environment.TickCount; orderManager.StartGame(); worldRenderer.RefreshPalette(); - - if (!isShellmap) - Sound.PlayNotification(null, "Speech", "StartGame", null); } public static bool IsHost diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 4c538e05da..ab8bb3ebb8 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -496,6 +496,7 @@ + diff --git a/OpenRA.Mods.RA/StartGameNotification.cs b/OpenRA.Mods.RA/StartGameNotification.cs new file mode 100644 index 0000000000..495a098b93 --- /dev/null +++ b/OpenRA.Mods.RA/StartGameNotification.cs @@ -0,0 +1,36 @@ +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using OpenRA.Graphics; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + class StartGameNotificationInfo : ITraitInfo + { + public readonly string Notification = "StartGame"; + + public object Create(ActorInitializer init) { return new StartGameNotification(this); } + } + + class StartGameNotification : IWorldLoaded + { + StartGameNotificationInfo info; + public StartGameNotification(StartGameNotificationInfo info) + { + this.info = info; + } + + public void WorldLoaded(World w, WorldRenderer wr) + { + Sound.PlayNotification(null, "Speech", info.Notification, null); + } + } +} diff --git a/mods/ra/maps/desert-shellmap/map.yaml b/mods/ra/maps/desert-shellmap/map.yaml index df096a95d7..6046df662e 100644 --- a/mods/ra/maps/desert-shellmap/map.yaml +++ b/mods/ra/maps/desert-shellmap/map.yaml @@ -1307,6 +1307,7 @@ Rules: LuaScripts: desert-shellmap.lua LoadWidgetAtGameStart: Widget: MAINMENU + -StartGameNotification: TRAN.Husk2: Burns: Damage: 0 diff --git a/mods/ra/rules/world.yaml b/mods/ra/rules/world.yaml index 7c2889fadd..a59bc00154 100644 --- a/mods/ra/rules/world.yaml +++ b/mods/ra/rules/world.yaml @@ -165,4 +165,5 @@ World: ValidateOrder: DebugPauseState: RadarPings: + StartGameNotification: diff --git a/mods/ts/maps/blank-shellmap/map.yaml b/mods/ts/maps/blank-shellmap/map.yaml index dfa05fb7d2..979bde074b 100644 --- a/mods/ts/maps/blank-shellmap/map.yaml +++ b/mods/ts/maps/blank-shellmap/map.yaml @@ -37,6 +37,7 @@ Smudges: Rules: World: + -StartGameNotification: -SpawnMPUnits: -MPStartLocations: LoadWidgetAtGameStart: diff --git a/mods/ts/rules/world.yaml b/mods/ts/rules/world.yaml index e28bcc198a..79c2cfd1e7 100644 --- a/mods/ts/rules/world.yaml +++ b/mods/ts/rules/world.yaml @@ -97,4 +97,5 @@ World: DebugPauseState: ScreenShaker: RadarPings: + StartGameNotification: