-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollectionData.cs
More file actions
47 lines (41 loc) · 1.39 KB
/
Copy pathCollectionData.cs
File metadata and controls
47 lines (41 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
namespace LevelCollections;
/// <summary>
/// A named, ordered collection of levels.
/// Each level is identified by a string LevelId; its type is
/// auto-detected at runtime by CollectionManager.ResolveLevelType().
/// </summary>
[Serializable]
public class CollectionDefinition
{
public string Name;
public List<string> Levels;
/// <summary>
/// Set by ConfigLoader when this collection's definition is invalid
/// (e.g. missing Name, empty Levels, malformed JSON element).
/// The UI shows these entries in red with a warning so the user can
/// fix their config file and press Refresh.
/// </summary>
[NonSerialized] public bool IsBroken;
[NonSerialized] public string ErrorMessage;
}
/// <summary>
/// Root config object for de/serializing the collections JSON file.
/// </summary>
[Serializable]
public class CollectionConfig
{
public List<CollectionDefinition> Collections;
/// <summary>
/// Number of levels to draw for the random collection
/// (the "lc random" console command). Falls back to a default
/// if missing/invalid/<= 0.
/// </summary>
public int RandomLevelCount;
/// <summary>
/// Pool of LevelId strings the random collection is drawn from.
/// Falls back to the BuiltIn levels if missing/empty.
/// </summary>
public List<string> RandomLevelPool;
}