Nevermind: fixes for r176

This commit is contained in:
NotAKidoS 2024-09-06 01:04:54 -05:00
parent 83139bf1da
commit 16a1a35a91
4 changed files with 30 additions and 15 deletions

View file

@ -5,23 +5,23 @@ using UnityEngine;
namespace NAK.Nevermind; namespace NAK.Nevermind;
public class Nevermind : MelonMod public class NevermindMod : MelonMod
{ {
#region Mod Settings #region Melon Preferences
private static readonly MelonPreferences_Category Category = private static readonly MelonPreferences_Category Category =
MelonPreferences.CreateCategory(nameof(Nevermind)); MelonPreferences.CreateCategory(nameof(NevermindMod));
private static readonly MelonPreferences_Entry<KeyCode> Setting_NevermindKey = private static readonly MelonPreferences_Entry<KeyCode> Entry_CancelKeybind =
Category.CreateEntry("Keybind", KeyCode.Home, description: "Key to cancel world join."); Category.CreateEntry("keybind", KeyCode.Home, description: "Key to cancel world join.");
#endregion #endregion Melon Preferences
#region Melon Events #region Melon Events
public override void OnUpdate() public override void OnUpdate()
{ {
if (!Input.GetKeyDown(Setting_NevermindKey.Value)) if (!Input.GetKeyDown(Entry_CancelKeybind.Value))
return; return;
if (CVRObjectLoader.Instance == null if (CVRObjectLoader.Instance == null
@ -35,7 +35,6 @@ public class Nevermind : MelonMod
return; // too late to cancel, world is being loaded return; // too late to cancel, world is being loaded
// Cancel world join if still downloading // Cancel world join if still downloading
CVRDownloadManager.Instance.ActiveWorldDownload = false;
foreach (var download in CVRDownloadManager.Instance._downloadTasks) foreach (var download in CVRDownloadManager.Instance._downloadTasks)
download.Value.JoinOnComplete = false; download.Value.JoinOnComplete = false;
@ -49,5 +48,5 @@ public class Nevermind : MelonMod
ViewManager.Instance.NotifyUser("(Local) Client", "World Join Cancelled", 2f); ViewManager.Instance.NotifyUser("(Local) Client", "World Join Cancelled", 2f);
} }
#endregion #endregion Melon Events
} }

View file

@ -10,7 +10,7 @@ using System.Reflection;
[assembly: AssemblyProduct(nameof(NAK.Nevermind))] [assembly: AssemblyProduct(nameof(NAK.Nevermind))]
[assembly: MelonInfo( [assembly: MelonInfo(
typeof(NAK.Nevermind.Nevermind), typeof(NAK.Nevermind.NevermindMod),
nameof(NAK.Nevermind), nameof(NAK.Nevermind),
AssemblyInfoParams.Version, AssemblyInfoParams.Version,
AssemblyInfoParams.Author, AssemblyInfoParams.Author,
@ -20,11 +20,13 @@ using System.Reflection;
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
[assembly: MelonColor(255, 246, 25, 99)] // red-pink
[assembly: MelonAuthorColor(255, 158, 21, 32)] // red
[assembly: HarmonyDontPatchAll] [assembly: HarmonyDontPatchAll]
namespace NAK.Nevermind.Properties; namespace NAK.Nevermind.Properties;
internal static class AssemblyInfoParams internal static class AssemblyInfoParams
{ {
public const string Version = "1.0.0"; public const string Version = "1.0.1";
public const string Author = "NotAKidoS"; public const string Author = "NotAKidoS";
} }

14
Nevermind/README.md Normal file
View file

@ -0,0 +1,14 @@
# Nevermind
Provides a cancel keybind for downloading/loading worlds on Desktop.
---
Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI.
https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive.
> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use.
> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive.

View file

@ -1,8 +1,8 @@
{ {
"_id": -1, "_id": -1,
"name": "Nevermind", "name": "Nevermind",
"modversion": "1.0.0", "modversion": "1.0.1",
"gameversion": "2024r174", "gameversion": "2024r176",
"loaderversion": "0.6.1", "loaderversion": "0.6.1",
"modtype": "Mod", "modtype": "Mod",
"author": "NotAKidoS", "author": "NotAKidoS",
@ -18,6 +18,6 @@
], ],
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r25/Nevermind.dll", "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r25/Nevermind.dll",
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/Nevermind/", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/Nevermind/",
"changelog": "- Initial Release", "changelog": "- Initial release",
"embedcolor": "#b589ec" "embedcolor": "#f61963"
} }