0.1.1 | Added: PassportPatch.cs

This commit is contained in:
2026-03-07 02:02:08 +01:00
parent 61c519be05
commit 42a6ff8928
5 changed files with 26 additions and 13 deletions

View File

@@ -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

View File

@@ -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>

View File

@@ -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()
{

View File

@@ -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;
}
}
}

View 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;
}
}
}