Skip to content

Commit fc419ad

Browse files
committed
[Addition] IDs for all Hooks
1 parent 6cb128c commit fc419ad

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# RL2.ModLoader Changelog
22

3+
# v1.0.3
4+
### Changes:
5+
- All RL2.ModLoader detours now have their own IDs
6+
37
# v1.0.2
48
### Bug fixes:
59
- Commands are now loaded from standalone mods correctly

RL2.ModLoader/BuiltinEndpoints.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public partial class ModLoader
1414
(Action orig) => {
1515
orig();
1616
OnLoad?.Invoke();
17+
},
18+
new HookConfig() {
19+
ID = "RL2.ModLoader::OnGameLoad"
1720
}
1821
);
1922

@@ -26,6 +29,9 @@ public partial class ModLoader
2629
Log("Unloading mods...");
2730
OnUnload?.Invoke();
2831
orig(self);
32+
},
33+
new HokConfig() {
34+
ID = "RL2.ModLoader::OnGameUnload"
2935
}
3036
);
3137

RL2.ModLoader/ConsoleHook.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public partial class ModLoader {
1616
self.gameObject.AddComponent<Console>();
1717
}
1818
orig(self);
19+
},
20+
new Hookconfig() {
21+
ID = "RL2.ModLoader::ConsoleHook"
1922
}
2023
);
2124
}

RL2.ModLoader/ModLoaderDetours.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ public partial class ModLoader
1010
typeof(System_EV).GetMethod("GetVersionString", BindingFlags.Public | BindingFlags.Static),
1111
(Func<string> orig) => {
1212
return orig() + "\nRL2.ModLoader v." + ModLoaderVersion.ToString();
13+
},
14+
new Hookconfig() {
15+
ID = "RL2.ModLoader::VersionDisplay"
1316
}
1417
);
1518
}

0 commit comments

Comments
 (0)