* Fix #107 by pulling SortOrder form an enum. * Add initial support for the Prophecy block item. * Update the static data. * Hook Prophecy data into the static data service. * Fill out the initial prophecy data.
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using Filtration.Common.Utilities;
|
|
using Filtration.Properties;
|
|
|
|
namespace Filtration.Services
|
|
{
|
|
public interface IStaticDataService
|
|
{
|
|
IEnumerable<string> ItemBaseTypes { get; }
|
|
IEnumerable<string> ItemClasses { get; }
|
|
IEnumerable<string> ItemMods { get; }
|
|
IEnumerable<string> Prophecies { get; }
|
|
}
|
|
|
|
internal class StaticDataService : IStaticDataService
|
|
{
|
|
public StaticDataService()
|
|
{
|
|
PopulateStaticData();
|
|
}
|
|
|
|
public IEnumerable<string> ItemBaseTypes { get; private set; }
|
|
|
|
public IEnumerable<string> ItemClasses { get; private set; }
|
|
|
|
public IEnumerable<string> ItemMods { get; private set; }
|
|
|
|
public IEnumerable<string> Prophecies { get; private set; }
|
|
|
|
private void PopulateStaticData()
|
|
{
|
|
ItemBaseTypes = new LineReader(() => new StringReader(Resources.ItemBaseTypes)).ToList();
|
|
ItemClasses = new LineReader(() => new StringReader(Resources.ItemClasses)).ToList();
|
|
ItemMods = new LineReader(() => new StringReader(Resources.ItemMods)).ToList();
|
|
Prophecies = new LineReader(() => new StringReader(Resources.Prophecies)).ToList();
|
|
}
|
|
}
|
|
}
|