Mercurial > repos > snowblizz-super-API-ideas
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 wrap: on
line diff
--- a/api/Objects/GameSystem.cs Wed Dec 01 20:00:58 2010 +0000 +++ b/api/Objects/GameSystem.cs Mon Dec 13 19:49:55 2010 +0000 @@ -17,7 +17,7 @@ /// </summary> public class GameSystem : WarFoundryStagedLoadingObject { - + private static int SYSTEM_DEFAULT_ARMY_SIZE = 1000; private bool warnOnError; private bool allowAllies; private Dictionary<string, Category> categories = new Dictionary<string,Category>(); @@ -38,12 +38,12 @@ { if (value == 0) { - defaultArmySize = 1; - throw new ArgumentException("No default system army size"); - + defaultArmySize = SYSTEM_DEFAULT_ARMY_SIZE; } - - defaultArmySize = value; + else + { + defaultArmySize = value; + } } }
--- a/schemas/system.xsd Wed Dec 01 20:00:58 2010 +0000 +++ b/schemas/system.xsd Mon Dec 13 19:49:55 2010 +0000 @@ -39,7 +39,7 @@ </xs:sequence> <xs:attribute name="id" type="xs:string" /> <xs:attribute name="name" type="xs:string" use="required"/> - <xs:attribute name="defaultArmySize" type="core:nonNegativeNonInfiniteDouble" default="0"/> + <xs:attribute name="defaultArmySize" type="core:nonNegativeNonInfiniteDouble" default="0"/> <xs:attribute name="warn" type="xs:boolean" default="false"/> <xs:attribute name="allowAllies" type="xs:boolean" default="true"/> <xs:anyAttribute processContents="lax"/>