-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRailSceneModule.cs
More file actions
25 lines (23 loc) · 873 Bytes
/
Copy pathRailSceneModule.cs
File metadata and controls
25 lines (23 loc) · 873 Bytes
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
using System.Collections.Generic;
using advent.Data.Rail;
namespace advent;
internal sealed class RailSceneModule : ISceneModule
{
public IEnumerable<SceneCatalogRegistration> RegisterScenes(SceneModuleContext context)
{
return
[
new SceneCatalogRegistration(
"UK Rail Board",
context.RailConfigured
? () => context.RailSnapshotSource is null
? new RailBoardScene()
: new RailBoardScene(context.RailSnapshotSource)
: null,
IncludedInCycle: context.RailConfigured,
MaxDuration: RailBoardScene.MaxSceneDuration,
IsReady: () => context.RailSnapshotSource is not null &&
context.RailSnapshotSource.TryGetSnapshot(out _))
];
}
}