comparison api/Objects/GameSystem.cs @ 392:db6713d5b35f default-army-size

RRe #97: Default army size issues
author snowblizz
date Wed, 01 Dec 2010 20:00:58 +0000
parents d576034ad1dd
children b90db11edc64
comparison
equal deleted inserted replaced
387:83c82e5c740c 392:db6713d5b35f
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
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;
25 26 private int defaultArmySize;
26 public GameSystem(string systemID, string systemName, IWarFoundryFactory creatingFactory) : base(systemID, systemName, creatingFactory) 27
28 public GameSystem(string systemID, string systemName, IWarFoundryFactory creatingFactory)
29 : base(systemID, systemName, creatingFactory)
27 { 30 {
28 stats = new Dictionary<string,SystemStats>(); 31 stats = new Dictionary<string,SystemStats>();
29 } 32 }
33
34 public int SystemArmyDefaultSize
35 {
36 get { return defaultArmySize; }
37 set
38 {
39 if (value == 0)
40 {
41 defaultArmySize = 1;
42 throw new ArgumentException("No default system army size");
43
44 }
45
46 defaultArmySize = value;
47 }
48 }
30 49
31 public bool AllowAllies 50 public bool AllowAllies
32 { 51 {
33 get { return allowAllies; } 52 get { return allowAllies; }
34 set { allowAllies = value; } 53 set { allowAllies = value; }