-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainFile.cs
More file actions
34 lines (30 loc) · 1.1 KB
/
Copy pathMainFile.cs
File metadata and controls
34 lines (30 loc) · 1.1 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
using System;
using Godot;
using EasyProfileTransfer.UI;
using MegaCrit.Sts2.Core.Modding;
namespace EasyProfileTransfer;
[ModInitializer(nameof(Initialize))]
public static class MainFile
{
public const string ModId = "EasyProfileTransfer";
public static MegaCrit.Sts2.Core.Logging.Logger Logger { get; } = new(ModId, MegaCrit.Sts2.Core.Logging.LogType.Generic);
public static void Initialize()
{
try
{
if (Engine.GetMainLoop() is not SceneTree tree)
{
Logger.Error("EasyProfileTransfer disabled: main loop is not a SceneTree.");
return;
}
EasyProfileTransferBootRuntime.ScheduleBootAttach(tree);
string modVer = ModVersionInfo.GetInformationalVersion();
string compiledAgainst = ModVersionInfo.GetCompiledAgainstVersions();
Logger.Info($"EasyProfileTransfer initialized (version {modVer}, compiled-against {compiledAgainst}).");
}
catch (Exception ex)
{
GD.PrintErr($"[EasyProfileTransfer] Initialize failed: {ex}");
}
}
}