-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMod.cs
More file actions
63 lines (52 loc) · 1.63 KB
/
Mod.cs
File metadata and controls
63 lines (52 loc) · 1.63 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
using Il2CppInterop.Runtime.Injection;
using MelonLoader;
using StreamSideResearch.Components;
using StreamSideResearch.Managers;
#if IN_TEST_MODE
using Il2CppNPC;
using UnityEngine;
#endif
[assembly: HarmonyDontPatchAll]
[assembly: MelonColor(1, 160, 32, 240)]
[assembly: MelonGame("CyberneticWalrus", "Roadside Research")]
[assembly: MelonInfo(typeof(StreamSideResearch.Mod), "StreamSideResearch", "2.0.0", "ReservedKeyword")]
namespace StreamSideResearch
{
public class Mod : MelonMod
{
internal static Mod Instance { get; private set; }
internal ChatterManager ChatterManager { get; private set; }
internal ModConfig ModConfig { get; private set; }
#if IN_TEST_MODE
private DebugCheats debugCheats;
#endif
private HarmonyLib.Harmony harmony;
public override void OnInitializeMelon()
{
Instance = this;
ModConfig = new();
ChatterManager = new(this, ModConfig);
ClassInjector.RegisterTypeInIl2Cpp<NameTag>();
ChatterManager.Connect();
#if IN_TEST_MODE
debugCheats = new(LoggerInstance);
#endif
harmony = new("com.reservedkeyword.StreamSideResearch");
harmony.PatchAll();
LoggerInstance.Msg("Mod has finished initialization process!");
}
#if IN_TEST_MODE
public override void OnUpdate()
{
if (Input.GetKeyDown(KeyCode.F5))
{
debugCheats.Spawn(NPCType.Agent);
}
if (Input.GetKeyDown(KeyCode.F6))
{
debugCheats.Spawn(NPCType.Customer);
}
}
#endif
}
}