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 diff
     1.1 --- a/API/Objects/Army.cs	Sat Apr 21 15:53:24 2012 +0100
     1.2 +++ b/API/Objects/Army.cs	Tue May 15 20:57:29 2012 +0100
     1.3 @@ -301,7 +301,7 @@
     1.4  				requirements.AddRange(unitType.GetRequirements());
     1.5  			}
     1.6  
     1.7 -			return requirements;
     1.8 +			return (ICollection<IRequirement>)requirements;
     1.9  		}
    1.10  
    1.11  		internal void OnArmyCompositionChanged()
     2.1 --- a/API/WarFoundryHacks.cs	Sat Apr 21 15:53:24 2012 +0100
     2.2 +++ b/API/WarFoundryHacks.cs	Tue May 15 20:57:29 2012 +0100
     2.3 @@ -16,10 +16,12 @@
     2.4  	/// </summary>
     2.5  	public class WarFoundryHacks
     2.6  	{
     2.7 +		public static readonly string dataPath = Path.Combine(Constants.ExecutablePath, "data");
     2.8 +
     2.9  		public static void Initialise()
    2.10  		{
    2.11  			//Set default data path - should be a preference
    2.12 -			WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(Path.Combine(Constants.ExecutablePath, "data")));
    2.13 +			WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(dataPath));
    2.14  			//Make sure we have at least one loader - should be controlled by plugins
    2.15  			WarFoundryLoader.GetDefault().RegisterFactory(WarFoundryXmlFactory.GetFactory());
    2.16  			//Make sure we have a way to save files - should be controlled by plugins