Rays layer fix

Desktop tracking scale fix
More notifications
This commit is contained in:
SDraw 2023-01-29 19:55:22 +03:00
parent fbad3fdf8e
commit 6bc448d41d
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
8 changed files with 118 additions and 45 deletions

View file

@ -1,5 +1,6 @@
using ABI_RC.Core.EventSystem;
using ABI_RC.Core.InteractionSystem;
using ABI_RC.Core.IO;
using ABI_RC.Core.Networking;
using ABI_RC.Core.Util;
using DarkRift.Client;
@ -28,6 +29,24 @@ namespace ml_egn
null,
new HarmonyLib.HarmonyMethod(typeof(ExtendedGameNotifications).GetMethod(nameof(OnGameNetworkConnectionClosed), BindingFlags.NonPublic | BindingFlags.Static))
);
HarmonyInstance.Patch(
typeof(CVRCamImageSaver).GetMethod(nameof(CVRCamImageSaver.SavePicture), BindingFlags.Public | BindingFlags.Static),
null,
new HarmonyLib.HarmonyMethod(typeof(ExtendedGameNotifications).GetMethod(nameof(OnPictureSave), BindingFlags.NonPublic | BindingFlags.Static))
);
HarmonyInstance.Patch(
typeof(CVRSyncHelper).GetMethod(nameof(CVRSyncHelper.DeleteAllProps), BindingFlags.Public | BindingFlags.Static),
null,
new HarmonyLib.HarmonyMethod(typeof(ExtendedGameNotifications).GetMethod(nameof(OnAllPropsDelete), BindingFlags.NonPublic | BindingFlags.Static))
);
HarmonyInstance.Patch(
typeof(CVRSyncHelper).GetMethod(nameof(CVRSyncHelper.DeleteMyProps), BindingFlags.Public | BindingFlags.Static),
null,
new HarmonyLib.HarmonyMethod(typeof(ExtendedGameNotifications).GetMethod(nameof(OnOwnPropsDelete), BindingFlags.NonPublic | BindingFlags.Static))
);
}
static void OnLocalAvatarLoad()
@ -82,5 +101,43 @@ namespace ml_egn
MelonLoader.MelonLogger.Error(e);
}
}
static void OnPictureSave()
{
try
{
Utils.ShowHUDNotification("(Local) Client", "Screenshot saved");
}
catch(System.Exception e)
{
MelonLoader.MelonLogger.Error(e);
}
}
static void OnAllPropsDelete()
{
try
{
if(Utils.IsMenuOpened())
Utils.ShowMenuNotification("Props are removed");
}
catch(System.Exception e)
{
MelonLoader.MelonLogger.Error(e);
}
}
static void OnOwnPropsDelete()
{
try
{
if(Utils.IsMenuOpened())
Utils.ShowMenuNotification("Own props are removed");
}
catch(System.Exception e)
{
MelonLoader.MelonLogger.Error(e);
}
}
}
}

View file

@ -1,10 +1,10 @@
using System.Reflection;
[assembly: AssemblyTitle("ExtendedGameNotifications")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.1")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: MelonLoader.MelonInfo(typeof(ml_egn.ExtendedGameNotifications), "ExtendedGameNotifications", "1.0.0", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonInfo(typeof(ml_egn.ExtendedGameNotifications), "ExtendedGameNotifications", "1.0.1", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
[assembly: MelonLoader.MelonPlatformDomain(MelonLoader.MelonPlatformDomainAttribute.CompatibleDomains.MONO)]

View file

@ -1,5 +1,9 @@
# Extended Game Notifications
This mod shows main menu notifications and HUD popups upon avatar changing, prop spawning and server connection loss.
This mod shows main menu notifications and HUD popups upon:
* Avatar changing
* Prop spawning/deletion
* Server connection loss
* Screenshot saving
Basically, merged previous `Avatar Change Info` and `Server Connection Info` mods in one.
# Installation