Mercurial > repos > IBBoard.WarFoundry.API.Tests
annotate API/FixedGameSystemWarFoundryLoader.cs @ 132:8f1af48e120c
Re #27: Unit requirements
* Add unit test for unit requirements in opposite order
* Add unit test to make sure that requirement doesn't lock to first result, even after changes
Also:
* Clean up line endings to meet policy
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 17 Apr 2011 19:34:48 +0000 |
parents | 82cd08385bfe |
children |
rev | line source |
---|---|
35
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 // This file (FixedGameSystemWarFoundryLoader.cs) is a part of the IBBoard.WarFoundry.API.Tests project and is copyright 2009 IBBoard |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 // |
4302e6b2c5c1
Re #228: Crash with missing abilityID
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. |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 using System; |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 using IBBoard.WarFoundry.API.Objects; |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 namespace IBBoard.WarFoundry.API |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 { |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 public class FixedGameSystemWarFoundryLoader : DefaultWarFoundryLoader |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 { |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 private GameSystem system; |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 public FixedGameSystemWarFoundryLoader (GameSystem fixedSystem) |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 { |
36
82cd08385bfe
Fixes #228: Crash on invalid ability ID
IBBoard <dev@ibboard.co.uk>
parents:
35
diff
changeset
|
16 LoadFiles(); |
35
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
17 system = fixedSystem; |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 } |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 public override GameSystem GetGameSystem(string systemID) |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 { |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 return system; |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 } |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 } |
4302e6b2c5c1
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 } |