Mercurial > repos > snowblizz-super-API-ideas
annotate api/WarFoundryLoader.cs @ 393:b90db11edc64 default-army-size
Re #97: Default army size
* Merge accidental commit into "default name" branch into "default size" branch
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 13 Dec 2010 19:49:55 +0000 |
parents | a36a0e9cc05d |
children |
rev | line source |
---|---|
104
2f3cafb69799
Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents:
102
diff
changeset
|
1 // This file (WarFoundryLoader.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2007, 2008, 2009 IBBoard. |
0 | 2 // |
104
2f3cafb69799
Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents:
102
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. |
0 | 4 |
5 using System; | |
6 using ICSharpCode.SharpZipLib.Zip; | |
7 | |
8 namespace IBBoard.WarFoundry.API | |
9 { | |
10 public class WarFoundryLoader | |
11 { | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
12 private static AbstractWarFoundryLoader loader; |
0 | 13 |
14 /// <summary> | |
15 /// Gets the default <see cref="WarFoundryLoader"/> used to load WarFoundry data files. | |
16 /// </summary> | |
17 /// <returns> | |
18 /// The default <see cref="WarFoundryLoader"/> | |
19 /// </returns> | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
20 public static AbstractWarFoundryLoader GetDefault() |
0 | 21 { |
22 if (loader == null) | |
23 { | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
24 loader = new DefaultWarFoundryLoader(); |
0 | 25 } |
26 | |
27 return loader; | |
28 } | |
29 | |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
30 public static void SetDefault(AbstractWarFoundryLoader newLoader) |
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
31 { |
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
32 loader = newLoader; |
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
33 } |
0 | 34 |
144
721891008b5c
Fixes #22: Add functionality to get failed file loads and reason
IBBoard <dev@ibboard.co.uk>
parents:
141
diff
changeset
|
35 private WarFoundryLoader() |
0 | 36 { |
233
a36a0e9cc05d
Re #228: Crash with missing abilityID
IBBoard <dev@ibboard.co.uk>
parents:
226
diff
changeset
|
37 //Hide constructor |
0 | 38 } |
39 } | |
40 } |