mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
add groomer related strings
This commit is contained in:
parent
e8d2690d1a
commit
8a3675ec3d
4 changed files with 107 additions and 16 deletions
|
@ -133,6 +133,14 @@
|
|||
"venus_flytrap_format":"The Giant Venus Flytrap chomped at you!<BR><B>OUCH!!</B><BR>It chomped your pocket, taking $%MONEY% with it!!",
|
||||
"password_input":"<BR>^PLReply:|^PS14|ANSWER^R1",
|
||||
"last_poet":"^R1^LLast Player Poet:%USERNAME% ^R1",
|
||||
"groomer":{
|
||||
"groomed_best_it_can":"Your horse %HORSEBREED% is now groomed as best as this groomer can!",
|
||||
"cannot_afford_service":"You cannot afford the groomer's services at this time.",
|
||||
"currently_at":"^LYour horse %HORSENAME%: groom currently %TOTAL%/%MAX%^R1",
|
||||
"apply_service":"^I258^T8Apply grooming services for $%PRICE% ^B3G%RANDOMID%^R1",
|
||||
"apply_all":"^R1^R1^I258^T8Groom all %COUNT% horses for $%PRICE% ^B3g^R1"
|
||||
"cannot_improve":"^I258^T9This groomer cannot improve this horse's groom.^R1"
|
||||
},
|
||||
"farrier":{
|
||||
"shoes_total":"^LYour horse %HORSENAME%: shoes currently %TOTAL%/%MAX%^R1",
|
||||
"put_on_steel_shoes":"Your horse has had new Steel Horseshoes put on. Now shoes=%TOTAL%/%MAX%.",
|
||||
|
@ -759,20 +767,22 @@
|
|||
"pm_sound":"PM"
|
||||
}
|
||||
},
|
||||
"vet":{
|
||||
"price_multipliers":[
|
||||
{"id":1,"cost":0.5},
|
||||
{"id":2,"cost":0.8},
|
||||
{"id":3,"cost":0.9}
|
||||
]
|
||||
"services":{
|
||||
"vet":{
|
||||
"price_multipliers":[
|
||||
{"id":1,"cost":0.5},
|
||||
{"id":2,"cost":0.8},
|
||||
{"id":3,"cost":0.9}
|
||||
]
|
||||
},
|
||||
"groomer":{
|
||||
"price_multipliers":[
|
||||
{"id":1,"max":800,"cost":0.5},
|
||||
{"id":2,"max":1000,"cost":0.8},
|
||||
{"id":3,"max":750,"cost":0.4}
|
||||
],
|
||||
}
|
||||
},
|
||||
"groomer":{
|
||||
"price_multipliers":[
|
||||
{"id":1,"max":800,"cost":0.5},
|
||||
{"id":2,"max":1000,"cost":0.8},
|
||||
{"id":3,"max":750,"cost":0.4}
|
||||
],
|
||||
}
|
||||
"horses":{
|
||||
"names":["A Buck Or Two","A Cowboy's Dream","A Cowgirls's Dream","A Promise Kept","A Smile","A Splash Of Class",
|
||||
"A Whole Lotta Luck","A'dab","A'idah","Abaccus","Abalone","Abba",
|
||||
|
|
|
@ -328,6 +328,15 @@ namespace HISP.Game
|
|||
public static string HorseEquipFormat;
|
||||
public static string BackToHorse;
|
||||
|
||||
|
||||
// Groomer
|
||||
public static string GroomerBestToHisAbilitiesFormat;
|
||||
public static string GroomerCannotAffordMessage;
|
||||
public static string GroomerHorseCurrentlyAtFormat;
|
||||
public static string GroomerApplyServiceFormat;
|
||||
public static string GroomerApplyServiceForAllFormat;
|
||||
public static string GroomerCannotImprove;
|
||||
|
||||
// Vet
|
||||
public static string VetServiceHorseFormat;
|
||||
public static string VetSerivcesNotNeeded;
|
||||
|
@ -548,6 +557,23 @@ namespace HISP.Game
|
|||
// Click
|
||||
public static string NothingInterestingHere;
|
||||
|
||||
public static string FormatGroomerApplyAllService(int count, int price)
|
||||
{
|
||||
return GroomerApplyServiceForAllFormat.Replace("%PRICE%", price.ToString("N0")).Replace("%COUNT%", count.ToString("N0"));
|
||||
}
|
||||
public static string FormatGroomerApplyService(int price, int randomid)
|
||||
{
|
||||
return GroomerApplyServiceFormat.Replace("%PRICE%", price.ToString("N0")).Replace("%RANDOMID%", randomid.ToString());
|
||||
}
|
||||
public static string FormatHorseGroomCurrentlyAt(string horseName, int currentGroom, int maxGroom)
|
||||
{
|
||||
return GroomerHorseCurrentlyAtFormat.Replace("%HORSENAME%", horseName).Replace("%TOTAL%", currentGroom.ToString()).Replace("%MAX%", maxGroom.ToString());
|
||||
}
|
||||
public static string FormatHorseGroomedToBestAbilities(string breedName)
|
||||
{
|
||||
return GroomerBestToHisAbilitiesFormat.Replace("%HORSEBREED%", breedName);
|
||||
}
|
||||
|
||||
public static string FormatBookReadMeta(string author, string title, string bookText)
|
||||
{
|
||||
return BookReadFormat.Replace("%AUTHOR%", author).Replace("%TITLE%", title).Replace("%TEXT%", bookText);
|
||||
|
|
38
Horse Isle Server/HorseIsleServer/Game/Services/Groomer.cs
Normal file
38
Horse Isle Server/HorseIsleServer/Game/Services/Groomer.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HISP.Game.Services
|
||||
{
|
||||
public class Groomer
|
||||
{
|
||||
|
||||
public static List<Groomer> Groomers = new List<Groomer>();
|
||||
|
||||
public Groomer(int id, double price, int max)
|
||||
{
|
||||
Id = id;
|
||||
PriceMultiplier = price;
|
||||
Max = max;
|
||||
Groomers.Add(this);
|
||||
}
|
||||
|
||||
public int Id;
|
||||
public double PriceMultiplier;
|
||||
public int Max;
|
||||
public int CalculatePrice(int groom)
|
||||
{
|
||||
double price = ((double)Max - (double)groom) * PriceMultiplier;
|
||||
return Convert.ToInt32(Math.Round(price));
|
||||
}
|
||||
|
||||
public static Groomer GetGroomerById(int id)
|
||||
{
|
||||
foreach (Groomer groomer in Groomers)
|
||||
{
|
||||
if (id == groomer.Id)
|
||||
return groomer;
|
||||
}
|
||||
throw new KeyNotFoundException("Groomer with id: " + id + " Not found.");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -517,14 +517,23 @@ namespace HISP.Server
|
|||
Tracking.TrackedItemsStatsMenu.Add(trackedItem);
|
||||
Logger.DebugPrint("Registered Tracked Item: " + trackedItem.What + " value: " + trackedItem.Value);
|
||||
}
|
||||
int totalVets = gameData.vet.price_multipliers.Count;
|
||||
int totalVets = gameData.services.vet.price_multipliers.Count;
|
||||
for (int i = 0; i < totalVets; i++)
|
||||
{
|
||||
double cost = gameData.vet.price_multipliers[i].cost;
|
||||
int id = gameData.vet.price_multipliers[i].id;
|
||||
double cost = gameData.services.vet.price_multipliers[i].cost;
|
||||
int id = gameData.services.vet.price_multipliers[i].id;
|
||||
Vet vet = new Vet(id, cost);
|
||||
Logger.DebugPrint("Registered Vet: " + vet.Id + " selling at: " + vet.PriceMultiplier);
|
||||
}
|
||||
int totalGroomers = gameData.services.groomer.price_multipliers.Count;
|
||||
for (int i = 0; i < totalGroomers; i++)
|
||||
{
|
||||
double cost = gameData.services.groomer.price_multipliers[i].cost;
|
||||
int id = gameData.services.groomer.price_multipliers[i].id;
|
||||
int max = gameData.services.groomer.price_multipliers[i].max;
|
||||
Groomer groomer = new Groomer(id, cost, max);
|
||||
Logger.DebugPrint("Registered Groomer: " + groomer.Id + " selling at: " + groomer.PriceMultiplier);
|
||||
}
|
||||
int totalBooks = gameData.books.Count;
|
||||
for (int i = 0; i < totalBooks; i++)
|
||||
{
|
||||
|
@ -644,6 +653,14 @@ namespace HISP.Server
|
|||
Messages.TackViewSetFormat = gameData.messages.meta.libary.tack.view_tack_set;
|
||||
Messages.TackSetPeiceFormat = gameData.messages.meta.libary.tack.set_peice_format;
|
||||
|
||||
// Groomer
|
||||
Messages.GroomerBestToHisAbilitiesFormat = gameData.messages.meta.groomer.groomed_best_it_can;
|
||||
Messages.GroomerCannotAffordMessage = gameData.messages.meta.groomer.cannot_afford_service;
|
||||
Messages.GroomerHorseCurrentlyAtFormat = gameData.messages.meta.groomer.currently_at;
|
||||
Messages.GroomerApplyServiceFormat = gameData.messages.meta.groomer.apply_service;
|
||||
Messages.GroomerApplyServiceForAllFormat = gameData.messages.meta.groomer.apply_all;
|
||||
Messages.GroomerCannotImprove = gameData.messages.meta.groomer.cannot_improve;
|
||||
|
||||
// Vet
|
||||
Messages.VetServiceHorseFormat = gameData.messages.meta.vet.service_horse;
|
||||
Messages.VetSerivcesNotNeeded = gameData.messages.meta.vet.not_needed;
|
||||
|
|
Loading…
Add table
Reference in a new issue