mirror of
https://github.com/TheJordanDev/PEAK-JordanMod.git
synced 2026-10-17 08:05:25 +02:00
0.1.1 | Added: PassportPatch.cs
This commit is contained in:
@@ -4,3 +4,7 @@
|
|||||||
- Added config dependency
|
- Added config dependency
|
||||||
- Added utils and debug functions
|
- 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 -->
|
<!-- This is the display name of your mod. Example: BepInEx Template -->
|
||||||
<AssemblyTitle>JordanMod</AssemblyTitle>
|
<AssemblyTitle>JordanMod</AssemblyTitle>
|
||||||
<!-- This is the version number of your mod. -->
|
<!-- This is the version number of your mod. -->
|
||||||
<Version>0.1.0</Version>
|
<Version>0.1.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ public partial class Plugin : BaseUnityPlugin
|
|||||||
private static Harmony? _harmony;
|
private static Harmony? _harmony;
|
||||||
private ModuleManager? _moduleManager;
|
private ModuleManager? _moduleManager;
|
||||||
|
|
||||||
private static readonly List<Type> _globalPatches = [];
|
private static readonly List<Type> _globalPatches = [
|
||||||
|
typeof(Patches.PassportPatch),
|
||||||
|
];
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,14 +4,4 @@ namespace JordanMod.Patches;
|
|||||||
|
|
||||||
public class ExamplePatch
|
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