comparison api/Objects/GameSystem.cs @ 390:4e0031339bcb default-army-name

Re #97: Default army size papercut. Updated GameSystem.cs, system.xsd and Factories to accommodate default system size.
author snowblizz
date Sun, 12 Dec 2010 15:27:07 +0000
parents d576034ad1dd
children d051f8f44e6c
comparison
equal deleted inserted replaced
389:121d9d1ba53c 390:4e0031339bcb
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;
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 = SYSTEM_DEFAULT_ARMY_SIZE;
42 }
43 else
44 {
45 defaultArmySize = value;
46 }
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; }