changeset 393:b90db11edc64 default-army-size

Re #97: Default army size * Merge accidental commit into "default name" branch into "default size" branch
author IBBoard <dev@ibboard.co.uk>
date Mon, 13 Dec 2010 19:49:55 +0000
parents db6713d5b35f
children 47ae48fd1f02
files api/Objects/GameSystem.cs schemas/system.xsd
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/api/Objects/GameSystem.cs	Wed Dec 01 20:00:58 2010 +0000
     1.2 +++ b/api/Objects/GameSystem.cs	Mon Dec 13 19:49:55 2010 +0000
     1.3 @@ -17,7 +17,7 @@
     1.4  	/// </summary>
     1.5  	public class GameSystem : WarFoundryStagedLoadingObject
     1.6  	{
     1.7 -        
     1.8 +        private static int SYSTEM_DEFAULT_ARMY_SIZE = 1000;
     1.9          private bool warnOnError;
    1.10  		private bool allowAllies;
    1.11  		private Dictionary<string, Category> categories = new Dictionary<string,Category>();
    1.12 @@ -38,12 +38,12 @@
    1.13              {
    1.14                  if (value == 0)
    1.15                  {
    1.16 -                    defaultArmySize = 1;
    1.17 -                    throw new ArgumentException("No default system army size");
    1.18 -                    
    1.19 +                    defaultArmySize = SYSTEM_DEFAULT_ARMY_SIZE;
    1.20                  }
    1.21 -                
    1.22 -                 defaultArmySize =  value;
    1.23 +                else
    1.24 +                {
    1.25 +                    defaultArmySize = value;
    1.26 +                }
    1.27              }
    1.28          }
    1.29  		
     2.1 --- a/schemas/system.xsd	Wed Dec 01 20:00:58 2010 +0000
     2.2 +++ b/schemas/system.xsd	Mon Dec 13 19:49:55 2010 +0000
     2.3 @@ -39,7 +39,7 @@
     2.4  		</xs:sequence>
     2.5  		<xs:attribute name="id" type="xs:string" />
     2.6  		<xs:attribute name="name" type="xs:string" use="required"/>
     2.7 -    <xs:attribute name="defaultArmySize" type="core:nonNegativeNonInfiniteDouble" default="0"/>
     2.8 +		<xs:attribute name="defaultArmySize" type="core:nonNegativeNonInfiniteDouble" default="0"/>
     2.9  		<xs:attribute name="warn" type="xs:boolean" default="false"/>
    2.10  		<xs:attribute name="allowAllies" type="xs:boolean" default="true"/>
    2.11  		<xs:anyAttribute processContents="lax"/>