mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 12:19:15 +12:00
Add Groomers
This commit is contained in:
parent
dfb177b3d1
commit
62a2e64ea5
6 changed files with 153 additions and 5 deletions
|
@ -439,6 +439,9 @@ namespace HISP.Game
|
|||
|
||||
public static string GroomerBestToHisAbilitiesFormat;
|
||||
public static string GroomerCannotAffordMessage;
|
||||
public static string GroomerBestToHisAbilitiesALL;
|
||||
public static string GroomerDontNeed;
|
||||
|
||||
public static string GroomerHorseCurrentlyAtFormat;
|
||||
public static string GroomerApplyServiceFormat;
|
||||
public static string GroomerApplyServiceForAllFormat;
|
||||
|
@ -872,9 +875,9 @@ namespace HISP.Game
|
|||
{
|
||||
return GroomerHorseCurrentlyAtFormat.Replace("%HORSENAME%", horseName).Replace("%TOTAL%", currentGroom.ToString()).Replace("%MAX%", maxGroom.ToString());
|
||||
}
|
||||
public static string FormatHorseGroomedToBestAbilities(string breedName)
|
||||
public static string FormatHorseGroomedToBestAbilities(string horseName)
|
||||
{
|
||||
return GroomerBestToHisAbilitiesFormat.Replace("%HORSEBREED%", breedName);
|
||||
return GroomerBestToHisAbilitiesFormat.Replace("%HORSENAME%", horseName);
|
||||
}
|
||||
|
||||
public static string FormatBookReadMeta(string author, string title, string bookText)
|
||||
|
|
|
@ -1313,6 +1313,27 @@ namespace HISP.Game
|
|||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
}
|
||||
private static string buildGroomer(User User, Groomer groomer)
|
||||
{
|
||||
string message = "";
|
||||
int totalPrice = 0;
|
||||
int count = 0;
|
||||
foreach(HorseInstance horse in User.HorseInventory.HorseList)
|
||||
{
|
||||
message += Messages.FormatHorseGroomCurrentlyAt(horse.Name, horse.BasicStats.Groom, 1000);
|
||||
if(horse.BasicStats.Groom < groomer.Max)
|
||||
{
|
||||
int price = groomer.CalculatePrice(horse.BasicStats.Groom);
|
||||
totalPrice += price;
|
||||
count++;
|
||||
message += Messages.FormatGroomerApplyService(price, horse.RandomId);
|
||||
}
|
||||
}
|
||||
message += Messages.FormatGroomerApplyAllService(count, totalPrice);
|
||||
message += Messages.ExitThisPlace;
|
||||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
}
|
||||
private static string buildVet(Vet vet, User user)
|
||||
{
|
||||
string message = "";
|
||||
|
@ -1893,6 +1914,12 @@ namespace HISP.Game
|
|||
Vet vet = Vet.GetVetById(VetId);
|
||||
message += buildVet(vet, user);
|
||||
}
|
||||
if(TileCode == "GROOMER")
|
||||
{
|
||||
int groomId = int.Parse(TileArg);
|
||||
Groomer groomer = Groomer.GetGroomerById(groomId);
|
||||
message += buildGroomer(user, groomer);
|
||||
}
|
||||
if (TileCode == "BANK")
|
||||
{
|
||||
message += buildBank(user);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue