changeset 234:06b4beb3e156 WarFoundry_v0.1beta6_Winforms

Re #228: Crash with missing abilityID * Add helper methods to get various supporting factories
author IBBoard <dev@ibboard.co.uk>
date Thu, 24 Dec 2009 19:59:38 +0000
parents a36a0e9cc05d
children 0ebb1b80a2bd
files api/Factories/Xml/WarFoundryXmlFactory.cs
diffstat 1 files changed, 16 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/api/Factories/Xml/WarFoundryXmlFactory.cs	Thu Dec 24 19:45:39 2009 +0000
     1.2 +++ b/api/Factories/Xml/WarFoundryXmlFactory.cs	Thu Dec 24 19:59:38 2009 +0000
     1.3 @@ -30,7 +30,7 @@
     1.4  		private WarFoundryXmlRaceFactory raceFactory;
     1.5  		private WarFoundryXmlArmyFactory armyFactory;
     1.6  
     1.7 -		public static AbstractNativeWarFoundryFactory GetFactory()
     1.8 +		public static WarFoundryXmlFactory GetFactory()
     1.9  		{
    1.10  			if (factory == null)
    1.11  			{
    1.12 @@ -47,6 +47,21 @@
    1.13  			armyFactory = new WarFoundryXmlArmyFactory();
    1.14  		}
    1.15  		
    1.16 +		public WarFoundryXmlGameSystemFactory GetSystemFactory()
    1.17 +		{
    1.18 +			return gameSystemFactory;
    1.19 +		}
    1.20 +		
    1.21 +		public WarFoundryXmlRaceFactory GetRaceFactory()
    1.22 +		{
    1.23 +			return raceFactory;
    1.24 +		}
    1.25 +		
    1.26 +		public WarFoundryXmlArmyFactory GetArmyFactory()
    1.27 +		{
    1.28 +			return armyFactory;
    1.29 +		}
    1.30 +		
    1.31  		protected override bool CheckCanFindArmyFileContent(ZipFile file)
    1.32  		{
    1.33  			return file.FindEntry("data.armyx", true) > -1;