mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 13:15:53 +12:00
Implement workshops and fix more quest weirdnes.
This commit is contained in:
parent
cb00f79d48
commit
d5762c3b07
9 changed files with 352 additions and 112 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue