Implement workshops and fix more quest weirdnes.

This commit is contained in:
SilicaAndPina 2021-02-06 17:04:50 +13:00
parent cb00f79d48
commit d5762c3b07
9 changed files with 352 additions and 112 deletions

View file

@ -34,6 +34,30 @@ namespace HISP.Game.Services
public static List<Workshop> Workshops = new List<Workshop>();
public static Workshop GetWorkshopAt(int x, int y)
{
foreach(Workshop wkShop in Workshops)
{
if(wkShop.X == x && wkShop.Y == y)
{
return wkShop;
}
}
throw new KeyNotFoundException("No workshop found.");
}
public static bool CraftIdExists(int id)
{
try
{
GetCraftId(id);
return true;
}
catch(KeyNotFoundException)
{
return false;
}
}
public static CraftableItem GetCraftId(int id)
{
foreach(Workshop wkShop in Workshops)