GainsExperience notification now optional.
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
^GainsExperience:
|
||||
GainsExperience:
|
||||
LevelUpNotification: LevelUp
|
||||
Conditions:
|
||||
200: rank-veteran
|
||||
400: rank-veteran
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
^GainsExperience:
|
||||
GainsExperience:
|
||||
LevelUpNotification: LevelUp
|
||||
Conditions:
|
||||
200: rank-veteran
|
||||
400: rank-veteran
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
^GainsExperience:
|
||||
GainsExperience:
|
||||
LevelUpNotification: LevelUp
|
||||
Conditions:
|
||||
200: rank-veteran
|
||||
400: rank-veteran
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
^GainsExperience:
|
||||
GainsExperience:
|
||||
LevelUpNotification: LevelUp
|
||||
Conditions:
|
||||
500: rank
|
||||
1000: rank
|
||||
|
||||
Reference in New Issue
Block a user