mirror of
https://github.com/TheJordanDev/PEAK-JordanMod.git
synced 2026-06-05 19:23:27 +02:00
0.1.1 | Added: PassportPatch.cs
This commit is contained in:
@@ -3,4 +3,8 @@
|
||||
- Initial project setup
|
||||
- Added config dependency
|
||||
- Added utils and debug functions
|
||||
- Added config handler
|
||||
- Added config handler
|
||||
|
||||
# v0.1.1 | Throw passport anywhere patch
|
||||
|
||||
- Added PassportPatch.cs and registerd it as GlobalPatch in Plugin.cs
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<!-- This is the display name of your mod. Example: BepInEx Template -->
|
||||
<AssemblyTitle>JordanMod</AssemblyTitle>
|
||||
<!-- This is the version number of your mod. -->
|
||||
<Version>0.1.0</Version>
|
||||
<Version>0.1.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -16,7 +16,9 @@ public partial class Plugin : BaseUnityPlugin
|
||||
private static Harmony? _harmony;
|
||||
private ModuleManager? _moduleManager;
|
||||
|
||||
private static readonly List<Type> _globalPatches = [];
|
||||
private static readonly List<Type> _globalPatches = [
|
||||
typeof(Patches.PassportPatch),
|
||||
];
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
@@ -4,14 +4,4 @@ namespace JordanMod.Patches;
|
||||
|
||||
public class ExamplePatch
|
||||
{
|
||||
[HarmonyPatch(typeof(Item), "Start")]
|
||||
[HarmonyPostfix]
|
||||
static void PostItemStartFix(Item __instance)
|
||||
{
|
||||
if (__instance.UIData.itemName.ToLower() == "passport")
|
||||
{
|
||||
__instance.UIData.canDrop = true;
|
||||
__instance.UIData.canThrow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
17
src/JordanMod/patches/PassportPatch.cs
Normal file
17
src/JordanMod/patches/PassportPatch.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace JordanMod.Patches;
|
||||
|
||||
public class PassportPatch
|
||||
{
|
||||
[HarmonyPatch(typeof(Item), "Start")]
|
||||
[HarmonyPostfix]
|
||||
static void PostItemStartFix(Item __instance)
|
||||
{
|
||||
if (__instance.UIData.itemName.ToLower() == "passport")
|
||||
{
|
||||
__instance.UIData.canDrop = true;
|
||||
__instance.UIData.canThrow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user