Mercurial > repos > IBBoard.WarFoundry.API
changeset 476:81e130f3b85e
Re #417: Improve install experience
* Make hacked default path available (will need improving/replacing)
Also:
* Fix type casting issue
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 15 May 2012 20:57:29 +0100 |
parents | b2c818833841 |
children | 1a632b133606 |
files | API/Objects/Army.cs API/WarFoundryHacks.cs |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/API/Objects/Army.cs Sat Apr 21 15:53:24 2012 +0100 +++ b/API/Objects/Army.cs Tue May 15 20:57:29 2012 +0100 @@ -301,7 +301,7 @@ requirements.AddRange(unitType.GetRequirements()); } - return requirements; + return (ICollection<IRequirement>)requirements; } internal void OnArmyCompositionChanged()
--- a/API/WarFoundryHacks.cs Sat Apr 21 15:53:24 2012 +0100 +++ b/API/WarFoundryHacks.cs Tue May 15 20:57:29 2012 +0100 @@ -16,10 +16,12 @@ /// </summary> public class WarFoundryHacks { + public static readonly string dataPath = Path.Combine(Constants.ExecutablePath, "data"); + public static void Initialise() { //Set default data path - should be a preference - WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(Path.Combine(Constants.ExecutablePath, "data"))); + WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(dataPath)); //Make sure we have at least one loader - should be controlled by plugins WarFoundryLoader.GetDefault().RegisterFactory(WarFoundryXmlFactory.GetFactory()); //Make sure we have a way to save files - should be controlled by plugins