From 5af4476cd86abe2dd7b198ccd1ccf68775a91b90 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 11 Jul 2011 19:55:36 +1200 Subject: [PATCH] split AnnounceOnKill into its own file --- OpenRA.Mods.RA/AnnounceOnBuild.cs | 15 --------------- OpenRA.Mods.RA/AnnounceOnKill.cs | 26 ++++++++++++++++++++++++++ OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 3 ++- 3 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 OpenRA.Mods.RA/AnnounceOnKill.cs diff --git a/OpenRA.Mods.RA/AnnounceOnBuild.cs b/OpenRA.Mods.RA/AnnounceOnBuild.cs index d53dc0d052..5f84a66a64 100644 --- a/OpenRA.Mods.RA/AnnounceOnBuild.cs +++ b/OpenRA.Mods.RA/AnnounceOnBuild.cs @@ -8,11 +8,7 @@ */ #endregion -using System.Drawing; -using OpenRA.Effects; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; -using OpenRA.Traits.Activities; namespace OpenRA.Mods.RA { @@ -28,15 +24,4 @@ namespace OpenRA.Mods.RA Sound.PlayVoice("Build", self, self.Owner.Country.Race); } } - - public class AnnounceOnKillInfo : TraitInfo {} - - public class AnnounceOnKill : INotifyAppliedDamage - { - public void AppliedDamage(Actor self, Actor damaged, AttackInfo e) - { - if (e.DamageState == DamageState.Dead) - Sound.PlayVoice("Kill", self, self.Owner.Country.Race); - } - } } diff --git a/OpenRA.Mods.RA/AnnounceOnKill.cs b/OpenRA.Mods.RA/AnnounceOnKill.cs new file mode 100644 index 0000000000..a07e1a23b0 --- /dev/null +++ b/OpenRA.Mods.RA/AnnounceOnKill.cs @@ -0,0 +1,26 @@ +#region Copyright & License Information +/* + * Copyright 2007-2011 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.Traits; + +namespace OpenRA.Mods.RA +{ + public class AnnounceOnKillInfo : TraitInfo {} + + public class AnnounceOnKill : INotifyAppliedDamage + { + public void AppliedDamage(Actor self, Actor damaged, AttackInfo e) + { + if (e.DamageState == DamageState.Dead) + Sound.PlayVoice("Kill", self, self.Owner.Country.Race); + } + } +} + diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 244f2e109f..9193efc384 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -1,4 +1,4 @@ - + Debug @@ -351,6 +351,7 @@ +