Add "View Awards" to libary.

This commit is contained in:
SilicaPi 2021-02-02 01:29:27 +13:00
parent e3dae116dd
commit 9f44620fd7
5 changed files with 37 additions and 0 deletions

View file

@ -185,6 +185,10 @@ namespace HISP.Game
public static string MaxJewelryMessage;
public static string RemoveJewelry;
// Awards (Libary)
public static string AwardsAvalible;
public static string AwardEntryFormat;
// Locations (Libary)
public static string LocationKnownIslands;
public static string LocationKnownTowns;
@ -533,6 +537,12 @@ namespace HISP.Game
// Click
public static string NothingInterestingHere;
public static string FormatAwardEntry(int iconId, string awardName, int bonusMoney, string description)
{
return AwardEntryFormat.Replace("%ICONID%", iconId.ToString()).Replace("%AWARDNAME%", awardName).Replace("%BONUSMONEY%",bonusMoney.ToString("N0")).Replace("%DESCRIPTION%",description);
}
public static string FormatLocationDescription(string description)
{
return LocationDescriptionFormat.Replace("%AREADESC%", description);

View file

@ -446,6 +446,19 @@ namespace HISP.Game
message += Messages.MetaTerminator;
return message;
}
public static string BuildAwardsLibary()
{
string message = "";
message += Messages.AwardsAvalible;
foreach(Award.AwardEntry award in Award.GlobalAwardList.OrderBy(o => o.Sort).ToArray())
{
message += Messages.FormatAwardEntry(award.IconId, award.Title, award.MoneyBonus, award.Description);
}
message += Messages.BackToMap;
message += Messages.MetaTerminator;
return message;
}
public static string BuildHorseReleased()
{
string message = "";
@ -455,6 +468,7 @@ namespace HISP.Game
return message;
}
public static string BuildTopHighscores(string gameName)
{
Highscore.HighscoreTableEntry[] scores = Database.GetTopScores(gameName, 20);