GainsExperience notification now optional.

This commit is contained in:
Andre Mohren
2018-07-22 13:43:12 +02:00
committed by abcdefg30
parent e353ff326e
commit cf84e6f8d5
5 changed files with 7 additions and 1 deletions

View File

@@ -36,6 +36,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Should the level-up animation be suppressed when actor is created?")]
public readonly bool SuppressLevelupAnimation = true;
public readonly string LevelUpNotification = null;
public object Create(ActorInitializer init) { return new GainsExperience(init, this); }
}
@@ -99,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
if (!silent)
{
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", "LevelUp", self.Owner.Faction.InternalName);
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", info.LevelUpNotification, self.Owner.Faction.InternalName);
self.World.AddFrameEndTask(w => w.Add(new CrateEffect(self, "levelup", info.LevelUpPalette)));
}
}

View File

@@ -43,6 +43,7 @@
^GainsExperience:
GainsExperience:
LevelUpNotification: LevelUp
Conditions:
200: rank-veteran
400: rank-veteran

View File

@@ -15,6 +15,7 @@
^GainsExperience:
GainsExperience:
LevelUpNotification: LevelUp
Conditions:
200: rank-veteran
400: rank-veteran

View File

@@ -42,6 +42,7 @@
^GainsExperience:
GainsExperience:
LevelUpNotification: LevelUp
Conditions:
200: rank-veteran
400: rank-veteran

View File

@@ -17,6 +17,7 @@
^GainsExperience:
GainsExperience:
LevelUpNotification: LevelUp
Conditions:
500: rank
1000: rank