Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff api/Objects/GameSystem.cs @ 286:08a9c960e17f
Fixes #97: Default army size
* Merge default army size branch with trunk code
* Fix issues with UTF-8 encoding and new line characters
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 13 Dec 2010 20:20:00 +0000 |
parents | d576034ad1dd |
children | 4dcb038e4f55 |
line wrap: on
line diff
--- a/api/Objects/GameSystem.cs Sat Oct 30 14:28:44 2010 +0000 +++ b/api/Objects/GameSystem.cs Mon Dec 13 20:20:00 2010 +0000 @@ -17,16 +17,34 @@ /// </summary> public class GameSystem : WarFoundryStagedLoadingObject { - private bool warnOnError; + private static int SYSTEM_DEFAULT_ARMY_SIZE = 1000; + private bool warnOnError; private bool allowAllies; private Dictionary<string, Category> categories = new Dictionary<string,Category>(); private Dictionary<string, SystemStats> stats = new Dictionary<string,SystemStats>(); private string defaultStats; + private int defaultArmySize; public GameSystem(string systemID, string systemName, IWarFoundryFactory creatingFactory) : base(systemID, systemName, creatingFactory) { stats = new Dictionary<string,SystemStats>(); } + + public int SystemArmyDefaultSize + { + get { return defaultArmySize; } + set + { + if (value == 0) + { + defaultArmySize = SYSTEM_DEFAULT_ARMY_SIZE; + } + else + { + defaultArmySize = value; + } + } + } public bool AllowAllies {