From bd149e4ecf9a8a102f77c2e8d0c83b9f3a9fe14a Mon Sep 17 00:00:00 2001
From: SilicaPi <silica@silica.com>
Date: Mon, 1 Feb 2021 18:56:25 +1300
Subject: [PATCH] Register "view companions" strings.

---
 DataCollection/gamedata.json                      |  6 +++++-
 .../HorseIsleServer/Game/Messages.cs              | 15 ++++++++++++---
 .../HorseIsleServer/Server/GameDataJson.cs        |  6 +++++-
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/DataCollection/gamedata.json b/DataCollection/gamedata.json
index f6b2706..fdee540 100755
--- a/DataCollection/gamedata.json
+++ b/DataCollection/gamedata.json
@@ -290,6 +290,10 @@
 			"horse_relative_format":"^I252^T7A Horse Relative, the %NAME%:^D4c%ID%|VIEW^R1",
 			"maximum_stats":"<B>MAXIMUM STATS:</B><BR>^AA",
 			"breed_preview_format":"<B>Viewing %NAME%:</B><BR>%DESCRIPTION%^D4|RETURN TO BREED LIST^R2^H",
+			"companion":{
+				"view_button":"^I%ICONID%^T7View %COMPANIONNAME% Companion:^BM%SWF%^R1^H",
+				"entry_format":"%COMPANIONDESC%"
+			},
 			"tack":{
 				"view_tack_set":"^I%ICONID%^T7View %SETNAME% Tack Set:^BM%SWF%^R1^H",
 				"set_peice_format":"<B>%ITEMNAME%</B>: %ITEMDESC%<BR>",
@@ -545498,4 +545502,4 @@
 		{"sort_by":41,"title":"Quiz Genius","icon_id":186,"earn_money":15000,"on_complete_text":"You earned the <B>Quiz Genius</B> Award!  $15,000 Bonus!","description":"Finish 15 Real Time Quizzes first to earn this award."},
 		{"sort_by":110,"title":"UniPeg Friend","icon_id":186,"earn_money":50000,"on_complete_text":"You have earned the <B>UniPeg Friend</B> Award!  $50,000 Bonus!","description":"Team up with a UniPeg 5 times at the Uniter to earn this award."}
 	]
-}
\ No newline at end of file
+}
diff --git a/Horse Isle Server/HorseIsleServer/Game/Messages.cs b/Horse Isle Server/HorseIsleServer/Game/Messages.cs
index 5fddc45..5109991 100755
--- a/Horse Isle Server/HorseIsleServer/Game/Messages.cs	
+++ b/Horse Isle Server/HorseIsleServer/Game/Messages.cs	
@@ -185,11 +185,13 @@ namespace HISP.Game
         public static string MaxJewelryMessage;
         public static string RemoveJewelry;
 
+        // Companion (Libary)
+        public static string CompanionViewFormat;
+        public static string CompanionEntryFormat;
+
         // Tack (Libary)
         public static string TackViewSetFormat;
         public static string TackSetPeiceFormat;
-        public static string TackBonusFormat;
-        public static string TackAndSeperator;
 
         // Horse
         public static string BreedViewerMaximumStats;
@@ -518,7 +520,14 @@ namespace HISP.Game
         // Click
         public static string NothingInterestingHere;
 
-
+        public static string FormatCompanionEntry(string itemDescription)
+        {
+            return CompanionEntryFormat.Replace("%COMPANIONDESC%", itemDescription);
+        }
+        public static string FormatCompanionViewButton(int iconid, string itemName, string swf)
+        {
+            return CompanionViewFormat.Replace("%ICONID%", iconId.ToString()).Replace("%COMPANIONNAME%",itemName).Replace("%SWF%", swf);
+        }
         public static string FormatTackSetPeice(string itemName, string itemDescription)
         {
             return TackSetPeiceFormat.Replace("%ITEMNAME%",itemName).Replace("%ITEMDESC%", itemDescription);
diff --git a/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs b/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs
index 329ae40..b354155 100755
--- a/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs	
+++ b/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs	
@@ -588,7 +588,11 @@ namespace HISP.Server
             Messages.StatMiscNoneRecorded = gameData.messages.meta.misc_stats.no_stats_recorded;
             Messages.StatMiscEntryFormat = gameData.messages.meta.misc_stats.stat_format;
 
-            // Tack (Horse)
+            // Companion (Libary)
+            Messages.CompanionViewFormat = gameData.messages.meta.libary.companion.view_button;
+            Messages.CompanionEntryFormat = gameData.messages.meta.libary.companion.entry_format;
+
+            // Tack (Libary)
             Messages.TackViewSetFormat = gameData.messages.meta.libary.tack.view_tack_set;
             Messages.TackSetPeiceFormat = gameData.messages.meta.libary.tack.set_peice_format;