annotate API/FixedObjectWarFoundryLoader.cs @ 227:d8cd6b259a9f

Re #359: Add "only contained" attribute to unit types * Test to make sure sub-units are removed from the army
author IBBoard <dev@ibboard.co.uk>
date Mon, 16 Apr 2012 20:45:45 +0100
parents 97ea355f9564
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
52
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 // This file (FixedGameSystemAndRaceWarFoundryLoader.cs) is a part of the IBBoard.WarFoundry.API.Tests project and is copyright 2009 IBBoard
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 //
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 using System;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 using IBBoard.WarFoundry.API.Objects;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 namespace IBBoard.WarFoundry.API
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 {
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 public class FixedObjectWarFoundryLoader : DefaultWarFoundryLoader
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 {
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 private Race race;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 private GameSystem system;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 public FixedObjectWarFoundryLoader()
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 {
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 LoadFiles();
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 }
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 public void SetRace(Race fixedRace)
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 {
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 race = fixedRace;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 }
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 public override Race GetRace(GameSystem system, string raceID)
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 {
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 return race;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 }
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 public void SetGameSystem(GameSystem fixedGameSystem)
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 {
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 system = fixedGameSystem;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 }
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 public override GameSystem GetGameSystem (string systemID)
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 {
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 return system;
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 }
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 }
97ea355f9564 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 }