mirror of
https://github.com/TheJordanDev/PEAK-JordanMod.git
synced 2026-10-16 23:56:44 +02:00
0.1.12 | Added: Open Passport keybind
Also removes a leftover debug keybind on the BingBong module that was bound to P and would have fired alongside the new passport keybind. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,3 +62,7 @@
|
|||||||
- Fixed the right-click confirmation always showing "No answer, not refreshing songs" even after successfully confirming, due to a timing check that ran before the confirmation window instead of after.
|
- Fixed the right-click confirmation always showing "No answer, not refreshing songs" even after successfully confirming, due to a timing check that ran before the confirmation window instead of after.
|
||||||
- Fixed an error (NullReferenceException) every time a thrown item bonked something: `Bonkable` added at runtime has no serialized prefab data, so its sound-effect array was `null` instead of empty. It now defaults to an empty array so bonks still ragdoll/knock back the target, just silently.
|
- Fixed an error (NullReferenceException) every time a thrown item bonked something: `Bonkable` added at runtime has no serialized prefab data, so its sound-effect array was `null` instead of empty. It now defaults to an empty array so bonks still ragdoll/knock back the target, just silently.
|
||||||
|
|
||||||
|
# v0.1.12 | Added customization keybinds
|
||||||
|
|
||||||
|
- Open the passport when pressing the "Open Passport" keybind (default: P)
|
||||||
|
- Removed a leftover debug keybind on the BingBong module that was also bound to P and would have fired alongside the new passport keybind.
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ public static class ConfigHandler
|
|||||||
// Better Airport
|
// Better Airport
|
||||||
public static ConfigEntry<float> ConveyorSpeedModifier { get; private set; } = null!;
|
public static ConfigEntry<float> ConveyorSpeedModifier { get; private set; } = null!;
|
||||||
|
|
||||||
|
// Open Passport settings
|
||||||
|
public static ConfigEntry<KeyCode> OpenPassport { get; private set; } = null!;
|
||||||
|
|
||||||
// Stashed Bugle settings
|
// Stashed Bugle settings
|
||||||
public static ConfigEntry<KeyCode> ToggleBugle { get; private set; } = null!;
|
public static ConfigEntry<KeyCode> ToggleBugle { get; private set; } = null!;
|
||||||
|
|
||||||
@@ -49,6 +52,14 @@ public static class ConfigHandler
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Open Passport settings
|
||||||
|
OpenPassport = Config.Bind(
|
||||||
|
"Key Bindings",
|
||||||
|
"OpenPassport",
|
||||||
|
KeyCode.P,
|
||||||
|
new ConfigDescription("Open Passport UI")
|
||||||
|
);
|
||||||
|
|
||||||
// Stashed Bugle settings
|
// Stashed Bugle settings
|
||||||
ToggleBugle = Config.Bind(
|
ToggleBugle = Config.Bind(
|
||||||
"Control",
|
"Control",
|
||||||
|
|||||||
@@ -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.11</Version>
|
<Version>0.1.12</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
28
src/JordanMod/modules/open_passport/OpenPassportModule.cs
Normal file
28
src/JordanMod/modules/open_passport/OpenPassportModule.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace JordanMod.Modules.OpenPassport;
|
||||||
|
|
||||||
|
[Module(Enabled = true)]
|
||||||
|
class OpenPassportModule : Module
|
||||||
|
{
|
||||||
|
public override string ModuleName => "Open Passport Module";
|
||||||
|
|
||||||
|
public override Type[] GetPatches() { return []; }
|
||||||
|
|
||||||
|
public override void Update()
|
||||||
|
{
|
||||||
|
if (!Input.GetKeyDown(ConfigHandler.OpenPassport.Value)) return;
|
||||||
|
|
||||||
|
// PassportManager.instance is a plain static that survives a scene unload, so it can
|
||||||
|
// be a destroyed object here; the Unity == operator is what catches that. Its
|
||||||
|
// Initialize() also reads Character.localCharacter.characterName, so don't open it
|
||||||
|
// before we have a character.
|
||||||
|
PassportManager passportManager = PassportManager.instance;
|
||||||
|
if (passportManager == null) return;
|
||||||
|
if (Character.localCharacter == null) return;
|
||||||
|
if (passportManager.isOpen) return;
|
||||||
|
|
||||||
|
passportManager.ToggleOpen();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,17 +27,6 @@ class ReplaceBingBongModule : Module
|
|||||||
AudioSyncWorker.OnAudioLoadComplete += OnAudioLoadComplete;
|
AudioSyncWorker.OnAudioLoadComplete += OnAudioLoadComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
if (Input.GetKeyDown(KeyCode.P))
|
|
||||||
{
|
|
||||||
Helper.FindItemByName("BingBong_Prop Variant", out Item? item);
|
|
||||||
if (item == null) return;
|
|
||||||
Debug.Log($"Found item: {item.name} in scene {item.gameObject.scene.name}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void OnAudioLoadComplete()
|
private static void OnAudioLoadComplete()
|
||||||
{
|
{
|
||||||
if (!HasReplacedSounds) return;
|
if (!HasReplacedSounds) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user