Fix ordering and fully implement "View Companion"

This commit is contained in:
SilicaPi 2021-02-01 19:50:37 +13:00
parent bd149e4ecf
commit 7bf0f37427
7 changed files with 91 additions and 43 deletions

View file

@ -330,7 +330,7 @@ namespace HISP.Game
{
string message = "";
foreach(Tack.TackSet set in Tack.TackSets)
foreach(Tack.TackSet set in Tack.TackSets.OrderBy(o => o.SortPosition()).ToArray())
{
string[] setSwfs = set.GetSwfNames();
string swf = "breedviewer.swf?terrain=book2&breed=tackonly";
@ -361,6 +361,23 @@ namespace HISP.Game
return message;
}
public static string BuildCompanionLibary()
{
string message = "";
foreach(Item.ItemInformation itm in Item.Items.OrderBy(o => o.GetMiscFlag(0)).ToArray())
{
if(itm.Type == "COMPANION" && itm.EmbedSwf != null)
{
string swf = "breedviewer.swf?terrain=book2&breed=tackonly&companion="+itm.EmbedSwf+"&j=";
message += Messages.FormatCompanionViewButton(itm.IconId, itm.Name, swf);
message += Messages.FormatCompanionEntry(itm.Description);
}
}
message += Messages.BackToMap;
message += Messages.MetaTerminator;
return message;
}
public static string BuildHorseReleased()
{
string message = "";