forked from callanh/pathos-official
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPathosOfficial.cs
More file actions
70 lines (59 loc) · 2.01 KB
/
PathosOfficial.cs
File metadata and controls
70 lines (59 loc) · 2.01 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using Inv.Support;
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Pathos")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("PathosCompiler")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("PathosMaker")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("PathosStudioW")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("PathosSyntaxTest")]
namespace Pathos
{
public sealed class OfficialCampaign : Campaign
{
internal OfficialCampaign(System.IO.Stream CodexStream)
: base("official", "Official")
{
#if MASTER_CODEX
this.Codex = new Codex(new Manifest("Pathos")); // 1.3 seconds.
#endif
if (this.Codex == null)
{
if (CodexStream != null)
{
this.Codex = new Codex();
new CodexGovernor().Load(Codex, CodexStream); // 0.3 seconds.
}
else
{
throw new Exception("CodexStream must be provided when MASTER_CODEX is not used.");
}
}
SetManifest(Codex.Manifest);
AddModule(new NethackModule(Codex));
AddModule(new OpusModule(Codex));
AddModule(new SPDModule(Codex));
AddModule(new DhakModule(Codex));
AddModule(new SandboxModule(Codex));
AddAtlasType("absurd");
AddAtlasType("classic");
AddAtlasType("geoduck");
AddAtlasType("sonyvanda");
AddAlbumType("freesound");
}
public Codex Codex { get; }
public override void Make(CampaignMake Make)
{
// only save the Codex when it has been declared in this execution.
if (Inv.Assert.IsEnabled)
Inv.Assert.Check(Make.CodexStream != null, "CodexStream must be provided.");
var Sanity = new CodexSanity();
Sanity.Check(Codex);
Make.SanityMessages = Sanity.Messages;
if (Make.CodexStream != null)
new CodexGovernor().Save(Codex, Make.CodexStream);
// TODO: Codex Reports?
}
}
}