Merge pull request #10569 from abcdefg30/PrimaryNote

Unhardcode the "PrimaryBuildingSelected" notification
This commit is contained in:
Matthias Mailänder
2016-01-23 14:09:41 +01:00

View File

@@ -30,6 +30,9 @@ namespace OpenRA.Mods.Common.Traits
[UpgradeGrantedReference, Desc("The upgrades to grant while the primary building.")]
public readonly string[] Upgrades = { "primary" };
[Desc("The speech notification to play when selecting a primary building.")]
public readonly string SelectionNotification = "PrimaryBuildingSelected";
public object Create(ActorInitializer init) { return new PrimaryBuilding(init.Self, this); }
}
@@ -93,7 +96,7 @@ namespace OpenRA.Mods.Common.Traits
foreach (var up in info.Upgrades)
manager.GrantUpgrade(self, up, this);
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", "PrimaryBuildingSelected", self.Owner.Faction.InternalName);
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.SelectionNotification, self.Owner.Faction.InternalName);
}
}
}