annotate api/Objects/Race.cs @ 11:5a1df00b0359

Re #9 - Make WarFoundry API load files in small methods * Add "add unit type" and "add equipment" methods to Race * Deprecate old "set unit types" and "set equipment" methods on Race * Update WarFoundryXmlFactory to use new methods * Create DuplicateItemException for later use
author IBBoard <dev@ibboard.co.uk>
date Sun, 18 Jan 2009 16:24:03 +0000
parents 613bc5eaac59
children ad8eaed12e66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 // Race.cs
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 //
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 // Copyright (C) 2008 IBBoard
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 //
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 // This library is free software; you can redistribute it and/or
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 // modify it under the terms of the GNU Lesser General Public
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 // License as published by the Free Software Foundation; either
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 // version 2.1 of the License, or (at your option) any later version.
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 //
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 // This library is distributed in the hope that it will be useful,
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 // Lesser General Public License for more details.
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 //
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 // You should have received a copy of the GNU Lesser General Public
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 // License along with this library; if not, write to the Free Software
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 //
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 //
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 using System;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 using System.Collections.Generic;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 using System.IO;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 using System.Xml;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 using IBBoard.IO;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 using IBBoard.WarFoundry.API.Factories;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 namespace IBBoard.WarFoundry.API.Objects
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 {
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
30 public class Race : WarFoundryStagedLoadingObject
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 public static string SYSTEM_DEFAULT_RACE_ID = "GameDefault";
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 private string subID;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 private string systemID;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 private GameSystem system;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 private Dictionary<Category, Dictionary<string, UnitType>> unitTypesByCat;
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
38 private Dictionary<string, UnitType> unitTypes = new Dictionary<string,UnitType>();
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
39 private Dictionary<string, EquipmentItem> equipment = new Dictionary<string,EquipmentItem>();
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
40 private Dictionary<string, Ability> abilities = new Dictionary<string,Ability>();
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
41 private Dictionary<string, Category> categories = new Dictionary<string,Category>();
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
43 public Race(string raceID, string raceName, string gameSystemID, IWarFoundryFactory creatingFactory) : this(raceID, "", raceName, gameSystemID, creatingFactory)
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
47 public Race(string raceID, string raceSubID, string raceName, string gameSystemID, IWarFoundryFactory creatingFactory) : base(raceID + (raceSubID!="" ? "_"+raceSubID : ""), raceName, creatingFactory)
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 subID = (raceSubID == null ? "" : raceSubID);
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 systemID = gameSystemID;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 public string SubID
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 get { return subID; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 set { subID = (value == null ? "" : value.Trim()); }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
59 public GameSystem GameSystem
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61 get
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
63 if (system == null)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
64 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
65 system = WarFoundryLoader.GetDefault().GetGameSystem(systemID);
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
66 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
67
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
68 return system;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
70 set
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
72 if (value == null)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74 throw new ArgumentException("Game system for a race cannot be null");
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
75 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
76
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
77 system = value;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
78 }
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
79 }
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
80
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
81 public void AddCategory(Category cat)
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
82 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
83 categories[cat.ID] = cat;
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 /// <summary>
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 /// Gets a category from its ID. Attempts to get the category from the race's overrides, or else it falls back to getting the Game System's category with that ID.
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
88 /// </summary>
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
89 /// <param name="id">
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
90 /// The ID of the category to get
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
91 /// </param>
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
92 /// <returns>
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
93 /// The <code>Category</code> with the specified ID, or null if one doesn't exist.
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
94 /// </returns>
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
95 public Category GetCategory(string id)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 {
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
97 EnsureFullyLoaded();
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
98 Category cat = null;
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
99 categories.TryGetValue(id, out cat);
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
100
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
101 if (cat == null)
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
102 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
103 cat = GameSystem.GetCategory(id);
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
104 }
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
105
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
106 return cat;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
108
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
109 public Category[] Categories
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
111 get
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
112 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
113 EnsureFullyLoaded();
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
114 Category[] cats;
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
115
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
116 if (!HasCategoryOverrides())
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
117 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
118 cats = GameSystem.Categories;
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
119 }
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
120 else
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
121 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
122 cats = DictionaryToArrayConverter.Convert<string, Category>(categories);
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
123 }
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
124
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
125 return cats;
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126 }
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
127 }
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
128
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
129 public bool HasCategoryOverrides()
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
130 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
131 return categories.Count > 0;
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
132 }
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
133
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
134 public void AddEquipmentItem(EquipmentItem item)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
135 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
136 //TODO: Throw DuplicateItemException
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
137 equipment.Add(item.ID, item);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
138 }
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
139
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
140 [Obsolete("Use AddEquipmentItem method instead")]
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
141 public void SetEquipmentItems(Dictionary<string, EquipmentItem> items)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
142 {
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
143 foreach (EquipmentItem item in items.Values)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
144 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
145 AddEquipmentItem(item);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
146 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
148
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
149 public EquipmentItem GetEquipmentItem(string id)
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
150 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
151 EnsureFullyLoaded();
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
152 return (EquipmentItem)equipment[id];
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
153 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
154
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
155 public List<EquipmentItem> GetEquipmentList()
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
156 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
157 List<EquipmentItem> items = new List<EquipmentItem>();
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
158
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
159 foreach (EquipmentItem item in equipment.Values)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
160 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
161 items.Add(item);
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
162 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
163
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
164 return items;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
165 }
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
166
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
167 public void AddUnitType(UnitType type)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
168 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
169 unitTypes.Add(type.ID, type);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
170 CacheUnitType(type);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
171 }
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
172
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
173 [Obsolete("Use AddUnitType method instead")]
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
174 public void SetUnitTypes(Dictionary<string, UnitType> types)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
175 {
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
176 foreach (UnitType type in types.Values)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
177 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
178 AddUnitType(type);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
179 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
180 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
181
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
182 public UnitType[] GetUnitTypes(Category cat)
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
183 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
184 BuildUnitTypesByCategoryCache();
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
185 Dictionary<string, UnitType> unitTypesDictionary;
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
186 unitTypesByCat.TryGetValue(cat, out unitTypesDictionary);
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
187 UnitType[] unitTypesArray;
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
188
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
189 if (unitTypesDictionary == null)
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
190 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
191 unitTypesArray = new UnitType[0];
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
192 }
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
193 else
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
194 {
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
195 unitTypesArray = DictionaryToArrayConverter.Convert<string, UnitType>(unitTypesDictionary);
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
196 }
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
197
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
198 return unitTypesArray;
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
199 }
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
200
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
201 private void CacheUnitType(UnitType unit)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
202 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
203 BuildUnitTypesByCategoryCache();
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
204 Dictionary<string,UnitType> catUnitTypes;
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
205 unitTypesByCat.TryGetValue(unit.MainCategory, out catUnitTypes);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
206
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
207 if (catUnitTypes == null)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
208 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
209 throw new InvalidFileException(String.Format("Unit type {0} with name {1} is a unit of an undefined category", unit.ID, unit.Name));
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
210 }
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
211
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
212 catUnitTypes.Add(unit.ID, unit);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
213 }
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
214
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
215 private void BuildUnitTypesByCategoryCache()
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
216 {
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
217 if (unitTypesByCat == null)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
218 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
219 DoBuildUnitTypesByCategoryCache();
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
220 }
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
221 }
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
222
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
223 private void DoBuildUnitTypesByCategoryCache()
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
224 {
8
613bc5eaac59 Re #9 - Make WarFoundry loading granular
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
225 unitTypesByCat = new Dictionary<Category,Dictionary<string,UnitType>>();
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
226
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
227 foreach (Category category in Categories)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
228 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
229 unitTypesByCat.Add(category, new Dictionary<string, UnitType>());
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
230 }
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
231
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
232 foreach (UnitType unit in unitTypes.Values)
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
233 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
234 CacheUnitType(unit);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
235 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
236 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
237
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
238 public UnitType GetUnitType(string id)
11
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
239 {
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
240 UnitType type = null;
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
241 unitTypes.TryGetValue(id, out type);
5a1df00b0359 Re #9 - Make WarFoundry API load files in small methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
242 return type;
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
243 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
244
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
245 public List<Ability> GetAbilityList()
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
246 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
247 List<Ability> items = new List<Ability>();
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
248
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
249 foreach (Ability ability in abilities.Values)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
250 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
251 items.Add(ability);
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
252 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
253
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
254 return items;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
255 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
256
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
257 public void SetAbilities(Dictionary<string, Ability> newAbilities)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
258 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
259 abilities = newAbilities;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
260 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
261
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
262 public Ability GetAbility(string id)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
263 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
264 Ability ability = null;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
265 abilities.TryGetValue(id, out ability);
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
266 return ability;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
267 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
268
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
269 protected virtual Dictionary<string, UnitType> RaceUnitTypes
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
270 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
271 get { return RaceRawUnitTypes; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
272 set { RaceRawUnitTypes = value; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
273 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
274
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
275 protected virtual Dictionary<string, EquipmentItem> RaceEquipment
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
276 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
277 get { return RaceRawEquipment; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
278 set { RaceRawEquipment = value; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
279 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
280
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
281 protected virtual Dictionary<string, Ability> RaceAbilities
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
282 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
283 get { return RaceRawAbilities; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
284 set { RaceRawAbilities = value; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
285 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
286
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
287 protected Dictionary<string, UnitType> RaceRawUnitTypes
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
288 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
289 get { return unitTypes; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
290 set { unitTypes = value; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
291 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
292
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
293 protected Dictionary<string, EquipmentItem> RaceRawEquipment
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
294 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
295 get { return equipment; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
296 set { equipment = value; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
297 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
298
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
299 protected Dictionary<string, Ability> RaceRawAbilities
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
300 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
301 get { return abilities; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
302 set { abilities = value; }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
303 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
304 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
305 }