-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStagefright.cs
More file actions
executable file
·39 lines (34 loc) · 1.23 KB
/
Stagefright.cs
File metadata and controls
executable file
·39 lines (34 loc) · 1.23 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
using HarmonyLib;
using ResoniteModLoader;
using FrooxEngine;
using System.Text;
namespace Stagefright;
public class Stagefright : ResoniteMod
{
public override string Name => "StageFright";
public override string Author => "Cyro";
public override string Version => "0.1.0";
public override string Link => "https://github.com/RileyGuy/Stagefright";
public static ModConfiguration? Config;
public override void OnEngineInit()
{
Harmony harmony = new("net.Cyro.Stagefright");
Config = GetConfiguration();
Config?.Save(true);
ArtNetBridge.StartListening();
if (HeadlessHelper.IsHeadless)
{
Msg("Headless detected! Running headless-specific setup...");
HeadlessHelper.PatchHeadless(harmony);
}
else
{
Engine.Current.RunPostInit(() =>
{
DevCreateNewForm.AddAction("Stagefright", "Set up individual stages", StageHelper.BuildStage);
DevCreateNewForm.AddAction("Stagefright", "Set up all stages", StageHelper.SetupWorldStages);
DevCreateNewForm.AddAction("Stagefright", "Destroy all stages", StageHelper.DestroyWorldStages);
});
}
}
}