Mercurial > repos > IBBoard.WarFoundry.API
comparison 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 |
comparison
equal
deleted
inserted
replaced
285:40362a9adf20 | 286:08a9c960e17f |
---|---|
15 /// <summary> | 15 /// <summary> |
16 /// Summary description for GameSystem. | 16 /// Summary description for GameSystem. |
17 /// </summary> | 17 /// </summary> |
18 public class GameSystem : WarFoundryStagedLoadingObject | 18 public class GameSystem : WarFoundryStagedLoadingObject |
19 { | 19 { |
20 private bool warnOnError; | 20 private static int SYSTEM_DEFAULT_ARMY_SIZE = 1000; |
21 private bool warnOnError; | |
21 private bool allowAllies; | 22 private bool allowAllies; |
22 private Dictionary<string, Category> categories = new Dictionary<string,Category>(); | 23 private Dictionary<string, Category> categories = new Dictionary<string,Category>(); |
23 private Dictionary<string, SystemStats> stats = new Dictionary<string,SystemStats>(); | 24 private Dictionary<string, SystemStats> stats = new Dictionary<string,SystemStats>(); |
24 private string defaultStats; | 25 private string defaultStats; |
26 private int defaultArmySize; | |
25 | 27 |
26 public GameSystem(string systemID, string systemName, IWarFoundryFactory creatingFactory) : base(systemID, systemName, creatingFactory) | 28 public GameSystem(string systemID, string systemName, IWarFoundryFactory creatingFactory) : base(systemID, systemName, creatingFactory) |
27 { | 29 { |
28 stats = new Dictionary<string,SystemStats>(); | 30 stats = new Dictionary<string,SystemStats>(); |
29 } | 31 } |
32 | |
33 public int SystemArmyDefaultSize | |
34 { | |
35 get { return defaultArmySize; } | |
36 set | |
37 { | |
38 if (value == 0) | |
39 { | |
40 defaultArmySize = SYSTEM_DEFAULT_ARMY_SIZE; | |
41 } | |
42 else | |
43 { | |
44 defaultArmySize = value; | |
45 } | |
46 } | |
47 } | |
30 | 48 |
31 public bool AllowAllies | 49 public bool AllowAllies |
32 { | 50 { |
33 get { return allowAllies; } | 51 get { return allowAllies; } |
34 set { allowAllies = value; } | 52 set { allowAllies = value; } |