-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.cs
More file actions
67 lines (61 loc) · 1.93 KB
/
Plugin.cs
File metadata and controls
67 lines (61 loc) · 1.93 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
64
65
66
67
using BepInEx;
using dark.efijiPOIWikjek;
using MalachiTemp.Backend;
using MalachiTemp.UI;
using HarmonyLib;
using Loading;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Malachis_Temp
{
/*
PROTECTION NOTE: THIS TEMPLATE IS PROTECTED MATERIAL FROM "Project Malachi".
IF ANY MATERIAL FROM "MalachiTemp" FOUND IN ANY OTHER PROJECT/THING WITHOUT
CREDIT OR PERMISSION MUST AND WILL BE REMOVED IMMEDIATELY
*/
[BepInPlugin(Name, GUID, Version)]
public class Plugin : BaseUnityPlugin
{
public const string Name = "malachistemp";
public const string GUID = "malachis.temp";
public const string Version = "1.0";
private bool patchedHarmony = false;
[System.Serializable]
public class LoginData
{
public string license;
}
void Awake()
{
if (!patchedHarmony && Loader.loaded == false)
{
Harmony harmony = new Harmony(GUID);
harmony.PatchAll();
patchedHarmony = true;
Loader.loaded = true;
}
}
}
[HarmonyPatch(typeof(GorillaLocomotion.Player), "FixedUpdate")]
internal class UpdatePatch
{
private static bool alreadyInit;
public static GameObject Gameobject;
static void Postfix()
{
if (!alreadyInit)
{
alreadyInit = true;
Gameobject = new GameObject();
Gameobject.AddComponent<Plugin>();
Gameobject.AddComponent<WristMenu>();
Gameobject.AddComponent<RigShit>();
Gameobject.AddComponent<Mods>();
Gameobject.AddComponent<GhostPatch>();
Gameobject.AddComponent<GTAG_NotificationLib.NotifiLib>();
Mods.Load();
Object.DontDestroyOnLoad(Gameobject);
}
}
}
}