changeset 315:6cb0fb78b9a6

Re #324: Add saving of Race and System data to files * Convert IWarFoundryFileSaver from a marker interface into an interface with a purpose of its own so that we can support multiple data files in one zip * Repurpose WarFoundryXmlSaver to be just an Army saver - we still need to make it usable as part of a larger whole * Add a WarFoundryLoadedObject class for objects loaded from files and make Race/Army/GameSystem inherit from it
author IBBoard <dev@ibboard.co.uk>
date Mon, 28 Feb 2011 21:09:20 +0000
parents bd5d8bfe18a6
children 40a2df1f629a
files IBBoard.WarFoundry.API.csproj api/Factories/Xml/WarFoundryXmlArmySaver.cs api/Factories/Xml/WarFoundryXmlSaver.cs api/Objects/Army.cs api/Objects/WarFoundryLoadedObject.cs api/Objects/WarFoundryStagedLoadingObject.cs api/Savers/IWarFoundryFileSaver.cs api/Savers/WarFoundrySaver.cs
diffstat 8 files changed, 231 insertions(+), 213 deletions(-) [+]
line diff
     1.1 --- a/IBBoard.WarFoundry.API.csproj	Sun Feb 27 20:01:04 2011 +0000
     1.2 +++ b/IBBoard.WarFoundry.API.csproj	Mon Feb 28 21:09:20 2011 +0000
     1.3 @@ -8,7 +8,7 @@
     1.4      <ProjectGuid>{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}</ProjectGuid>
     1.5      <OutputType>Library</OutputType>
     1.6      <AppDesignerFolder>Properties</AppDesignerFolder>
     1.7 -    <RootNamespace>IBBoard.WarFoundry.API</RootNamespace>
     1.8 +    <RootNamespace>IBBoard.WarFoundry</RootNamespace>
     1.9      <AssemblyName>IBBoard.WarFoundry.API</AssemblyName>
    1.10      <FileUpgradeFlags>
    1.11      </FileUpgradeFlags>
    1.12 @@ -80,7 +80,6 @@
    1.13      <Compile Include="api\Factories\IWarFoundryFactory.cs" />
    1.14      <Compile Include="api\Factories\Xml\WarFoundryXmlElementName.cs" />
    1.15      <Compile Include="api\Factories\Xml\WarFoundryXmlFactory.cs" />
    1.16 -    <Compile Include="api\Factories\Xml\WarFoundryXmlSaver.cs" />
    1.17      <Compile Include="api\FileLoadFailure.cs" />
    1.18      <Compile Include="api\Objects\Ability.cs" />
    1.19      <Compile Include="api\Objects\Army.cs" />
    1.20 @@ -186,6 +185,8 @@
    1.21      <Compile Include="api\Factories\DummyWarFoundryFactory.cs" />
    1.22      <Compile Include="api\Savers\IWarFoundryArmySaver.cs" />
    1.23      <Compile Include="api\Savers\IWarFoundryRaceSaver.cs" />
    1.24 +    <Compile Include="api\Objects\WarFoundryLoadedObject.cs" />
    1.25 +    <Compile Include="api\Factories\Xml\WarFoundryXmlArmySaver.cs" />
    1.26    </ItemGroup>
    1.27    <ItemGroup>
    1.28      <Reference Include="System.Xml" />
    1.29 @@ -233,4 +234,13 @@
    1.30        <Install>true</Install>
    1.31      </BootstrapperPackage>
    1.32    </ItemGroup>
    1.33 +  <ProjectExtensions>
    1.34 +    <MonoDevelop>
    1.35 +      <Properties>
    1.36 +        <Policies>
    1.37 +          <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedFlat" ResourceNamePolicy="FileFormatDefault" />
    1.38 +        </Policies>
    1.39 +      </Properties>
    1.40 +    </MonoDevelop>
    1.41 +  </ProjectExtensions>
    1.42  </Project>
    1.43 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/api/Factories/Xml/WarFoundryXmlArmySaver.cs	Mon Feb 28 21:09:20 2011 +0000
     2.3 @@ -0,0 +1,186 @@
     2.4 +// This file (WarFoundryXmlSaver.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2008, 2009 IBBoard.
     2.5 +//
     2.6 +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     2.7 +
     2.8 +using System;
     2.9 +using System.Collections.Generic;
    2.10 +using System.IO;
    2.11 +using System.Xml;
    2.12 +using System.Xml.Schema;
    2.13 +using IBBoard.Lang;
    2.14 +using IBBoard.Xml;
    2.15 +using IBBoard.WarFoundry.API.Factories.Xml.Zip;
    2.16 +using IBBoard.WarFoundry.API.Objects;
    2.17 +using IBBoard.WarFoundry.API.Savers;
    2.18 +using IBBoard.WarFoundry.API.Util;
    2.19 +using ICSharpCode.SharpZipLib.Zip;
    2.20 +
    2.21 +namespace IBBoard.WarFoundry.API.Factories.Xml
    2.22 +{
    2.23 +	public class WarFoundryXmlArmySaver : IWarFoundryArmySaver
    2.24 +	{
    2.25 +		public const string ARMY_FILE_EXTENSION = ".army";
    2.26 +		
    2.27 +		public bool Save(Army toSave, string savePath)
    2.28 +		{
    2.29 +			bool success = false;
    2.30 +			ZipFile file = null;
    2.31 +			
    2.32 +			if (!savePath.EndsWith(ARMY_FILE_EXTENSION))
    2.33 +			{
    2.34 +				savePath = savePath + ARMY_FILE_EXTENSION;
    2.35 +			}
    2.36 +
    2.37 +			try
    2.38 +			{
    2.39 +				file = ZipFile.Create(savePath);
    2.40 +				file.BeginUpdate();
    2.41 +				file.Add(new StringZipEntrySource(CreateXmlString(toSave)), "data.armyx");
    2.42 +				file.CommitUpdate();
    2.43 +				success = true;
    2.44 +			}
    2.45 +			finally
    2.46 +			{
    2.47 +				if (file != null)
    2.48 +				{
    2.49 +					file.Close();
    2.50 +				}
    2.51 +			}
    2.52 +
    2.53 +			return success;
    2.54 +		}
    2.55 +
    2.56 +		private string CreateXmlString(WarFoundryObject toSave)
    2.57 +		{
    2.58 +			string xmlString = "";
    2.59 +
    2.60 +			if (toSave is Army)
    2.61 +			{
    2.62 +				xmlString = CreateArmyXmlString((Army)toSave);
    2.63 +			}
    2.64 +
    2.65 +			return xmlString;
    2.66 +		}
    2.67 +
    2.68 +		private string CreateArmyXmlString(Army toSave)
    2.69 +		{
    2.70 +			XmlDocument doc = new XmlDocument();
    2.71 +			XmlDeclaration declaration = doc.CreateXmlDeclaration("1.0", null, null);
    2.72 +			doc.AppendChild(declaration);
    2.73 +			XmlSchema schema = new XmlSchema();
    2.74 +			schema.Namespaces.Add("", "http://ibboard.co.uk/warfoundry/army");
    2.75 +			schema.Namespaces.Add("core", "http://ibboard.co.uk/warfoundry/core");
    2.76 +			doc.Schemas.Add(schema);
    2.77 +			XmlElement root = doc.CreateElement("army");
    2.78 +			root.SetAttribute("xmlns", "http://ibboard.co.uk/warfoundry/army");
    2.79 +			root.SetAttribute("xmlns:core", "http://ibboard.co.uk/warfoundry/core");
    2.80 +			doc.AppendChild(root);
    2.81 +			root.SetAttribute("id", XmlTools.GetAsciiXmlIdForString(toSave.ID));
    2.82 +			root.SetAttribute("name", toSave.Name);
    2.83 +			//Don't convert system and race to ID format as they could be stored in non-XML file formats
    2.84 +			//If they are in XML files then they'll already be valid
    2.85 +			root.SetAttribute("system", toSave.GameSystem.ID);
    2.86 +			root.SetAttribute("race", toSave.Race.ID);
    2.87 +			root.SetAttribute("maxPoints", toSave.MaxPoints.ToString());
    2.88 +			XmlElement units = doc.CreateElement("units");
    2.89 +			root.AppendChild(units);
    2.90 +			
    2.91 +			foreach (Unit unit in toSave.GetUnits())
    2.92 +			{
    2.93 +				units.AppendChild(CreateUnitElement(unit, doc));
    2.94 +			}
    2.95 +			
    2.96 +			return doc.OuterXml;
    2.97 +		}
    2.98 +
    2.99 +		private XmlElement CreateUnitElement(Unit unit, XmlDocument doc)
   2.100 +		{
   2.101 +			XmlElement unitElem = doc.CreateElement("unit");
   2.102 +			unitElem.SetAttribute("id", XmlTools.GetAsciiXmlIdForString(unit.ID));
   2.103 +			unitElem.SetAttribute("unitName", (unit.HasDefaultName() ? "" : unit.Name));
   2.104 +			unitElem.SetAttribute("unitType", unit.UnitType.ID);
   2.105 +			unitElem.SetAttribute("size", unit.Size.ToString());
   2.106 +			
   2.107 +			if (!unit.Race.Equals(unit.Army.Race))
   2.108 +			{
   2.109 +				unitElem.SetAttribute("race", unit.Race.ID);
   2.110 +			}
   2.111 +			
   2.112 +			Category unitCategory = unit.Category.Category;
   2.113 +			if (!unit.UnitType.MainCategory.Equals(unitCategory))
   2.114 +			{
   2.115 +				unitElem.SetAttribute("category", unitCategory.ID);
   2.116 +			}
   2.117 +
   2.118 +			XmlElement equipmentElem = CreateEquipmentItemsElement(unit, doc);
   2.119 +
   2.120 +			if (equipmentElem != null)
   2.121 +			{
   2.122 +				unitElem.AppendChild(equipmentElem);
   2.123 +			}
   2.124 +			
   2.125 +			XmlElement containedElem = CreateContainedUnitsElement(unit, doc);
   2.126 +
   2.127 +			if (containedElem != null)
   2.128 +			{
   2.129 +				unitElem.AppendChild(containedElem);
   2.130 +			}
   2.131 +			
   2.132 +			return unitElem;
   2.133 +		}
   2.134 +
   2.135 +		private XmlElement CreateEquipmentItemsElement(Unit unit, XmlDocument doc)
   2.136 +		{
   2.137 +			UnitEquipmentItem[] equipItems = unit.GetEquipment();
   2.138 +			int equipItemCount = equipItems.Length;
   2.139 +			XmlElement equipmentElem = null;
   2.140 +
   2.141 +			if (equipItemCount > 0)
   2.142 +			{
   2.143 +				equipmentElem = doc.CreateElement("equipment");
   2.144 +				
   2.145 +				for (int i = 0; i < equipItemCount; i++)
   2.146 +				{
   2.147 +					equipmentElem.AppendChild(CreateEquipmentElement(equipItems[i], unit, doc));
   2.148 +				}
   2.149 +			}
   2.150 +
   2.151 +			return equipmentElem;
   2.152 +		}
   2.153 +
   2.154 +		private XmlElement CreateEquipmentElement(UnitEquipmentItem item, Unit unit, XmlDocument doc)
   2.155 +		{
   2.156 +			XmlElement equipmentItemElem = doc.CreateElement("equipItem");
   2.157 +			equipmentItemElem.SetAttribute("id", item.ID);
   2.158 +			equipmentItemElem.SetAttribute("amount", UnitEquipmentUtil.GetEquipmentAmount(unit, item).ToString());
   2.159 +			equipmentItemElem.SetAttribute("amountType", UnitEquipmentUtil.GetEquipmentAmountIsRatio(unit, item) ? "ratio" : "fixed");
   2.160 +			return equipmentItemElem;
   2.161 +		}
   2.162 +		
   2.163 +		private XmlElement CreateContainedUnitsElement(Unit unit, XmlDocument doc)
   2.164 +		{
   2.165 +			Unit[] containedUnits = unit.ContainedUnits;
   2.166 +			int containedCount = containedUnits.Length;
   2.167 +			XmlElement containedElem = null;
   2.168 +
   2.169 +			if (containedCount > 0)
   2.170 +			{
   2.171 +				containedElem = doc.CreateElement("contained");
   2.172 +				
   2.173 +				for (int i = 0; i < containedCount; i++)
   2.174 +				{
   2.175 +					containedElem.AppendChild(CreateContainedUnitElement(containedUnits[i], doc));
   2.176 +				}
   2.177 +			}
   2.178 +
   2.179 +			return containedElem;
   2.180 +		}
   2.181 +
   2.182 +		private XmlElement CreateContainedUnitElement(Unit unit,  XmlDocument doc)
   2.183 +		{
   2.184 +			XmlElement containedUnitElem = doc.CreateElement("containedUnit");
   2.185 +			containedUnitElem.SetAttribute("containedID", XmlTools.GetAsciiXmlIdForString(unit.ID));
   2.186 +			return containedUnitElem;
   2.187 +		}
   2.188 +	}
   2.189 +}
     3.1 --- a/api/Factories/Xml/WarFoundryXmlSaver.cs	Sun Feb 27 20:01:04 2011 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,196 +0,0 @@
     3.4 -// This file (WarFoundryXmlSaver.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2008, 2009 IBBoard.
     3.5 -//
     3.6 -// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     3.7 -
     3.8 -using System;
     3.9 -using System.Collections.Generic;
    3.10 -using System.IO;
    3.11 -using System.Xml;
    3.12 -using System.Xml.Schema;
    3.13 -using IBBoard.Lang;
    3.14 -using IBBoard.Xml;
    3.15 -using IBBoard.WarFoundry.API.Factories.Xml.Zip;
    3.16 -using IBBoard.WarFoundry.API.Objects;
    3.17 -using IBBoard.WarFoundry.API.Savers;
    3.18 -using IBBoard.WarFoundry.API.Util;
    3.19 -using ICSharpCode.SharpZipLib.Zip;
    3.20 -
    3.21 -namespace IBBoard.WarFoundry.API.Factories.Xml
    3.22 -{
    3.23 -	public class WarFoundryXmlSaver : IWarFoundryFileSaver
    3.24 -	{
    3.25 -		public const string ARMY_FILE_EXTENSION = ".army";
    3.26 -		
    3.27 -		public bool Save(Army toSave, string savePath)
    3.28 -		{
    3.29 -			bool success = false;
    3.30 -			ZipFile file = null;
    3.31 -			
    3.32 -			if (!savePath.EndsWith(ARMY_FILE_EXTENSION))
    3.33 -			{
    3.34 -				savePath = savePath + ARMY_FILE_EXTENSION;
    3.35 -			}
    3.36 -
    3.37 -			try
    3.38 -			{
    3.39 -				file = ZipFile.Create(savePath);
    3.40 -				file.BeginUpdate();
    3.41 -				file.Add(new StringZipEntrySource(CreateXmlString(toSave)), "data.armyx");
    3.42 -				file.CommitUpdate();
    3.43 -				success = true;
    3.44 -			}
    3.45 -			finally
    3.46 -			{
    3.47 -				if (file != null)
    3.48 -				{
    3.49 -					file.Close();
    3.50 -				}
    3.51 -			}
    3.52 -
    3.53 -			return success;
    3.54 -		}
    3.55 -
    3.56 -		private string CreateXmlString(WarFoundryObject toSave)
    3.57 -		{
    3.58 -			string xmlString = "";
    3.59 -
    3.60 -			if (toSave is Army)
    3.61 -			{
    3.62 -				xmlString = CreateArmyXmlString((Army)toSave);
    3.63 -			}
    3.64 -
    3.65 -			return xmlString;
    3.66 -		}
    3.67 -
    3.68 -		private string CreateArmyXmlString(Army toSave)
    3.69 -		{
    3.70 -			XmlDocument doc = new XmlDocument();
    3.71 -			XmlDeclaration declaration = doc.CreateXmlDeclaration("1.0", null, null);
    3.72 -			doc.AppendChild(declaration);
    3.73 -			XmlSchema schema = new XmlSchema();
    3.74 -			schema.Namespaces.Add("", "http://ibboard.co.uk/warfoundry/army");
    3.75 -			schema.Namespaces.Add("core", "http://ibboard.co.uk/warfoundry/core");
    3.76 -			doc.Schemas.Add(schema);
    3.77 -			XmlElement root = doc.CreateElement("army");
    3.78 -			root.SetAttribute("xmlns", "http://ibboard.co.uk/warfoundry/army");
    3.79 -			root.SetAttribute("xmlns:core", "http://ibboard.co.uk/warfoundry/core");
    3.80 -			doc.AppendChild(root);
    3.81 -			root.SetAttribute("id", XmlTools.GetAsciiXmlIdForString(toSave.ID));
    3.82 -			root.SetAttribute("name", toSave.Name);
    3.83 -			//Don't convert system and race to ID format as they could be stored in non-XML file formats
    3.84 -			//If they are in XML files then they'll already be valid
    3.85 -			root.SetAttribute("system", toSave.GameSystem.ID);
    3.86 -			root.SetAttribute("race", toSave.Race.ID);
    3.87 -			root.SetAttribute("maxPoints", toSave.MaxPoints.ToString());
    3.88 -			XmlElement units = doc.CreateElement("units");
    3.89 -			root.AppendChild(units);
    3.90 -			
    3.91 -			foreach (Unit unit in toSave.GetUnits())
    3.92 -			{
    3.93 -				units.AppendChild(CreateUnitElement(unit, doc));
    3.94 -			}
    3.95 -			
    3.96 -			return doc.OuterXml;
    3.97 -		}
    3.98 -
    3.99 -		private XmlElement CreateUnitElement(Unit unit, XmlDocument doc)
   3.100 -		{
   3.101 -			XmlElement unitElem = doc.CreateElement("unit");
   3.102 -			unitElem.SetAttribute("id", XmlTools.GetAsciiXmlIdForString(unit.ID));
   3.103 -			unitElem.SetAttribute("unitName", (unit.HasDefaultName() ? "" : unit.Name));
   3.104 -			unitElem.SetAttribute("unitType", unit.UnitType.ID);
   3.105 -			unitElem.SetAttribute("size", unit.Size.ToString());
   3.106 -			
   3.107 -			if (!unit.Race.Equals(unit.Army.Race))
   3.108 -			{
   3.109 -				unitElem.SetAttribute("race", unit.Race.ID);
   3.110 -			}
   3.111 -			
   3.112 -			Category unitCategory = unit.Category.Category;
   3.113 -			if (!unit.UnitType.MainCategory.Equals(unitCategory))
   3.114 -			{
   3.115 -				unitElem.SetAttribute("category", unitCategory.ID);
   3.116 -			}
   3.117 -
   3.118 -			XmlElement equipmentElem = CreateEquipmentItemsElement(unit, doc);
   3.119 -
   3.120 -			if (equipmentElem != null)
   3.121 -			{
   3.122 -				unitElem.AppendChild(equipmentElem);
   3.123 -			}
   3.124 -			
   3.125 -			XmlElement containedElem = CreateContainedUnitsElement(unit, doc);
   3.126 -
   3.127 -			if (containedElem != null)
   3.128 -			{
   3.129 -				unitElem.AppendChild(containedElem);
   3.130 -			}
   3.131 -			
   3.132 -			return unitElem;
   3.133 -		}
   3.134 -
   3.135 -		private XmlElement CreateEquipmentItemsElement(Unit unit, XmlDocument doc)
   3.136 -		{
   3.137 -			UnitEquipmentItem[] equipItems = unit.GetEquipment();
   3.138 -			int equipItemCount = equipItems.Length;
   3.139 -			XmlElement equipmentElem = null;
   3.140 -
   3.141 -			if (equipItemCount > 0)
   3.142 -			{
   3.143 -				equipmentElem = doc.CreateElement("equipment");
   3.144 -				
   3.145 -				for (int i = 0; i < equipItemCount; i++)
   3.146 -				{
   3.147 -					equipmentElem.AppendChild(CreateEquipmentElement(equipItems[i], unit, doc));
   3.148 -				}
   3.149 -			}
   3.150 -
   3.151 -			return equipmentElem;
   3.152 -		}
   3.153 -
   3.154 -		private XmlElement CreateEquipmentElement(UnitEquipmentItem item, Unit unit, XmlDocument doc)
   3.155 -		{
   3.156 -			XmlElement equipmentItemElem = doc.CreateElement("equipItem");
   3.157 -			equipmentItemElem.SetAttribute("id", item.ID);
   3.158 -			equipmentItemElem.SetAttribute("amount", UnitEquipmentUtil.GetEquipmentAmount(unit, item).ToString());
   3.159 -			equipmentItemElem.SetAttribute("amountType", UnitEquipmentUtil.GetEquipmentAmountIsRatio(unit, item) ? "ratio" : "fixed");
   3.160 -			return equipmentItemElem;
   3.161 -		}
   3.162 -		
   3.163 -		private XmlElement CreateContainedUnitsElement(Unit unit, XmlDocument doc)
   3.164 -		{
   3.165 -			Unit[] containedUnits = unit.ContainedUnits;
   3.166 -			int containedCount = containedUnits.Length;
   3.167 -			XmlElement containedElem = null;
   3.168 -
   3.169 -			if (containedCount > 0)
   3.170 -			{
   3.171 -				containedElem = doc.CreateElement("contained");
   3.172 -				
   3.173 -				for (int i = 0; i < containedCount; i++)
   3.174 -				{
   3.175 -					containedElem.AppendChild(CreateContainedUnitElement(containedUnits[i], doc));
   3.176 -				}
   3.177 -			}
   3.178 -
   3.179 -			return containedElem;
   3.180 -		}
   3.181 -
   3.182 -		private XmlElement CreateContainedUnitElement(Unit unit,  XmlDocument doc)
   3.183 -		{
   3.184 -			XmlElement containedUnitElem = doc.CreateElement("containedUnit");
   3.185 -			containedUnitElem.SetAttribute("containedID", XmlTools.GetAsciiXmlIdForString(unit.ID));
   3.186 -			return containedUnitElem;
   3.187 -		}
   3.188 -
   3.189 -		public bool Save (Race race, string path)
   3.190 -		{
   3.191 -			throw new System.NotImplementedException ();
   3.192 -		}
   3.193 -	
   3.194 -		public bool Save (GameSystem system, string path)
   3.195 -		{
   3.196 -			throw new System.NotImplementedException ();
   3.197 -		}
   3.198 -	}
   3.199 -}
     4.1 --- a/api/Objects/Army.cs	Sun Feb 27 20:01:04 2011 +0000
     4.2 +++ b/api/Objects/Army.cs	Mon Feb 28 21:09:20 2011 +0000
     4.3 @@ -17,7 +17,7 @@
     4.4  	/// <summary>
     4.5  	/// Summary description for Army.
     4.6  	/// </summary>
     4.7 -	public class Army : WarFoundryObject, ICostedWarFoundryObject
     4.8 +	public class Army : WarFoundryLoadedObject, ICostedWarFoundryObject
     4.9  	{
    4.10  		//private GameSystem system;
    4.11  		private Race armyRace;
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/api/Objects/WarFoundryLoadedObject.cs	Mon Feb 28 21:09:20 2011 +0000
     5.3 @@ -0,0 +1,26 @@
     5.4 +using System;
     5.5 +using IBBoard.WarFoundry.API.Objects;
     5.6 +
     5.7 +namespace IBBoard.WarFoundry.API.Objects
     5.8 +{
     5.9 +	/// <summary>
    5.10 +	/// A marker class for objects that are loaded from a file
    5.11 +	/// </summary>
    5.12 +	public class WarFoundryLoadedObject : WarFoundryObject
    5.13 +	{
    5.14 +		protected WarFoundryLoadedObject() : base()
    5.15 +		{
    5.16 +			//Do nothing
    5.17 +		}
    5.18 +				
    5.19 +		protected WarFoundryLoadedObject(string objName) : base(objName)
    5.20 +		{
    5.21 +			//Do nothing
    5.22 +		}
    5.23 +		
    5.24 +		protected WarFoundryLoadedObject(string objId, string objName) : base(objId, objName)
    5.25 +		{
    5.26 +			//Do nothing
    5.27 +		}	
    5.28 +	}
    5.29 +}
     6.1 --- a/api/Objects/WarFoundryStagedLoadingObject.cs	Sun Feb 27 20:01:04 2011 +0000
     6.2 +++ b/api/Objects/WarFoundryStagedLoadingObject.cs	Mon Feb 28 21:09:20 2011 +0000
     6.3 @@ -8,7 +8,7 @@
     6.4  
     6.5  namespace IBBoard.WarFoundry.API.Objects
     6.6  {	
     6.7 -	public class WarFoundryStagedLoadingObject : WarFoundryObject, IWarFoundryStagedLoadObject
     6.8 +	public class WarFoundryStagedLoadingObject : WarFoundryLoadedObject, IWarFoundryStagedLoadObject
     6.9  	{
    6.10  		private bool isFullyLoaded;
    6.11  		private bool isLoading;
     7.1 --- a/api/Savers/IWarFoundryFileSaver.cs	Sun Feb 27 20:01:04 2011 +0000
     7.2 +++ b/api/Savers/IWarFoundryFileSaver.cs	Mon Feb 28 21:09:20 2011 +0000
     7.3 @@ -7,8 +7,11 @@
     7.4  
     7.5  namespace IBBoard.WarFoundry.API.Savers
     7.6  {
     7.7 -	public interface IWarFoundryFileSaver : IWarFoundryGameSystemSaver, IWarFoundryRaceSaver, IWarFoundryArmySaver
     7.8 +	/// <summary>
     7.9 +	/// Saves one or more objects into a native-format zip file.
    7.10 +	/// </summary>
    7.11 +	public interface IWarFoundryFileSaver
    7.12  	{
    7.13 -		//Marker interface
    7.14 +		void Save(string path, params WarFoundryLoadedObject[] objects);
    7.15  	}
    7.16  }
     8.1 --- a/api/Savers/WarFoundrySaver.cs	Sun Feb 27 20:01:04 2011 +0000
     8.2 +++ b/api/Savers/WarFoundrySaver.cs	Mon Feb 28 21:09:20 2011 +0000
     8.3 @@ -9,7 +9,6 @@
     8.4  	public class WarFoundrySaver
     8.5  	{
     8.6  		private static IWarFoundryFileSaver fileSaver;
     8.7 -		private static IWarFoundryGameSystemSaver systemSaver;
     8.8  		
     8.9  		public static IWarFoundryFileSaver GetSaver()
    8.10  		{
    8.11 @@ -20,15 +19,5 @@
    8.12  		{
    8.13  			fileSaver = newFileSaver;
    8.14  		}
    8.15 -
    8.16 -		public static IWarFoundryGameSystemSaver GetGameSystemSaver()
    8.17 -		{
    8.18 -			return systemSaver;
    8.19 -		}
    8.20 -
    8.21 -		public static void SetGameSystemSaver(IWarFoundryGameSystemSaver newGameSystemSaver)
    8.22 -		{
    8.23 -			systemSaver = newGameSystemSaver;
    8.24 -		}
    8.25  	}
    8.26  }