-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRFLegacyMod.cs
More file actions
46 lines (38 loc) · 1.48 KB
/
RFLegacyMod.cs
File metadata and controls
46 lines (38 loc) · 1.48 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
using System.Collections.Generic;
using ModLoader;
using HarmonyLib;
using ModLoader.Helpers;
namespace RandomFailuresLegacy
{
public class RFLegacyMod : Mod
{
public const string RfModId = "random_failures_legacy";
public const string RfModName = "Random Failures Legacy";
public const string RfAuthor = "TheAlgorithm476";
private static Harmony? _patcher;
public static RFLegacyMod Instance { get; private set; } = null!;
public override string ModNameID => RfModId;
public override string DisplayName => RfModName;
public override string Author => RfAuthor;
public override string MinimumGameVersionNecessary => "1.5.10.2";
public override string ModVersion => "1.0.0";
public override Dictionary<string, string> Dependencies { get; } = new() { { "UITools", "1.1.5" } };
public override string Description =>
"Adds a random small chance of an engine failing to ignite, or having an in-flight failure.";
public RFLegacyMod() => Instance = this;
public override void Early_Load()
{
_patcher = new Harmony($"me.thealgorithm476.{RfModId}");
_patcher.PatchAll();
}
public override void Load()
{
Settings.Load();
ConfigurationMenuTab.Load();
SceneHelper.OnHubSceneLoaded += () =>
{
Data.FailureTable.Clear();
};
}
}
}