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?")]
|
[Desc("Should the level-up animation be suppressed when actor is created?")]
|
||||||
public readonly bool SuppressLevelupAnimation = true;
|
public readonly bool SuppressLevelupAnimation = true;
|
||||||
|
|
||||||
|
public readonly string LevelUpNotification = null;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new GainsExperience(init, this); }
|
public object Create(ActorInitializer init) { return new GainsExperience(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
if (!silent)
|
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)));
|
self.World.AddFrameEndTask(w => w.Add(new CrateEffect(self, "levelup", info.LevelUpPalette)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
^GainsExperience:
|
^GainsExperience:
|
||||||
GainsExperience:
|
GainsExperience:
|
||||||
|
LevelUpNotification: LevelUp
|
||||||
Conditions:
|
Conditions:
|
||||||
200: rank-veteran
|
200: rank-veteran
|
||||||
400: rank-veteran
|
400: rank-veteran
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
^GainsExperience:
|
^GainsExperience:
|
||||||
GainsExperience:
|
GainsExperience:
|
||||||
|
LevelUpNotification: LevelUp
|
||||||
Conditions:
|
Conditions:
|
||||||
200: rank-veteran
|
200: rank-veteran
|
||||||
400: rank-veteran
|
400: rank-veteran
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
^GainsExperience:
|
^GainsExperience:
|
||||||
GainsExperience:
|
GainsExperience:
|
||||||
|
LevelUpNotification: LevelUp
|
||||||
Conditions:
|
Conditions:
|
||||||
200: rank-veteran
|
200: rank-veteran
|
||||||
400: rank-veteran
|
400: rank-veteran
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
^GainsExperience:
|
^GainsExperience:
|
||||||
GainsExperience:
|
GainsExperience:
|
||||||
|
LevelUpNotification: LevelUp
|
||||||
Conditions:
|
Conditions:
|
||||||
500: rank
|
500: rank
|
||||||
1000: rank
|
1000: rank
|
||||||
|
|||||||
Reference in New Issue
Block a user