Rename CrateAction>Notification to Sound

This commit is contained in:
Mustafa Alperen Seki
2018-10-12 15:50:13 +03:00
committed by Paul Chote
parent f18ce8cfda
commit f066655bb7
3 changed files with 55 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits
[PaletteReference] public readonly string Palette = "effect";
[Desc("Audio clip to play when the crate is collected.")]
public readonly string Notification = null;
public readonly string Sound = null;
[Desc("The earliest time (in ticks) that this crate action can occur on.")]
public readonly int TimeDelay = 0;
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Traits
public virtual void Activate(Actor collector)
{
Game.Sound.PlayToPlayer(SoundType.World, collector.Owner, Info.Notification);
Game.Sound.PlayToPlayer(SoundType.World, collector.Owner, Info.Sound);
if (Info.Effect != null)
collector.World.AddFrameEndTask(w => w.Add(new CrateEffect(collector, Info.Effect, Info.Palette)));