LuaTTS: fixes for latest scripting nightly

This commit is contained in:
NotAKidoS 2024-09-11 16:25:19 -05:00
parent af00f4c6d0
commit 35943bd709
4 changed files with 35 additions and 22 deletions

View file

@ -1,5 +1,4 @@
 using ABI.Scripting.CVRSTL.Client;
using ABI.Scripting.CVRSTL.Client;
using ABI.Scripting.CVRSTL.Common; using ABI.Scripting.CVRSTL.Common;
using HarmonyLib; using HarmonyLib;
using MoonSharp.Interpreter; using MoonSharp.Interpreter;
@ -10,11 +9,19 @@ namespace NAK.LuaTTS.Patches;
internal static class LuaScriptFactoryPatches internal static class LuaScriptFactoryPatches
{ {
[HarmonyPostfix] [HarmonyPostfix]
[HarmonyPatch(typeof(LuaScriptFactory.CVRRequireModule), nameof(LuaScriptFactory.CVRRequireModule.require))] [HarmonyPatch(typeof(LuaScriptFactory.CVRRequireModule), nameof(LuaScriptFactory.CVRRequireModule.Require))]
private static void Postfix_CVRRequireModule_require(string modid, private static void Postfix_CVRRequireModule_require(
ref object __result, ref Script ___script, CVRLuaContext ___context) string modid,
ref LuaScriptFactory.CVRRequireModule __instance,
ref object __result,
ref Script ___script,
ref CVRLuaContext ___context)
{ {
if (modid == "TextToSpeech") const string TTSModuleID = "TextToSpeech";
__result = TTSLuaModule.RegisterUserData(___script, ___context); if (TTSModuleID != modid)
return; // not our module
__result = TTSLuaModule.RegisterUserData(___script, ___context);
__instance.RegisteredModules[TTSModuleID] = __result; // add module to cache
} }
} }

View file

@ -20,13 +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, 125, 126, 129)] [assembly: MelonColor(255, 246, 25, 99)] // red-pink
[assembly: MelonAuthorColor(255, 158, 21, 32)] [assembly: MelonAuthorColor(255, 158, 21, 32)] // red
[assembly: HarmonyDontPatchAll] [assembly: HarmonyDontPatchAll]
namespace NAK.LuaTTS.Properties; namespace NAK.LuaTTS.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";
} }

View file

@ -1,23 +1,23 @@
{ {
"_id": 211, "_id": -1,
"name": "RelativeSync", "name": "LuaTTS",
"modversion": "1.0.2", "modversion": "1.0.2",
"gameversion": "2024r175", "gameversion": "2024r176",
"loaderversion": "0.6.1", "loaderversion": "0.6.1",
"modtype": "Mod", "modtype": "Mod",
"author": "NotAKidoS", "author": "NotAKidoS",
"description": "Relative sync for Movement Parent & Chairs. Requires both users to have the mod installed. Synced over Mod Network.\n\nProvides some Experimental settings to also fix local jitter on movement parents.", "description": "Provides access to the built-in text-to-speech (TTS) functionality to lua scripts. Allows you to make the local player speak.",
"searchtags": [ "searchtags": [
"relative", "lua",
"sync", "tts",
"movement", "texttospeech",
"chair" "tomato"
], ],
"requirements": [ "requirements": [
"None" "None"
], ],
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r28/RelativeSync.dll", "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r28/LuaTTS.dll",
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/RelativeSync/", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/LuaTTS/",
"changelog": "- Fixed RelativeSyncMarker not generating correct path hash for local player\n - This fixes relative sync on local avatar movement parents\n- Fixed initial calculated interpolation interval when assigning a new RelativeSyncMarker for a remote user\n - Would calculate from time was last on a movement parent, which could lead to seconds long interpolation\n- Added Network Debug settings\n- Added experimental settings to fix **local** jitter on movement parents\n - These options are disabled by default as they have not been heavily tested", "changelog": "- Initial release.",
"embedcolor": "#507e64" "embedcolor": "#f61963"
} }

View file

@ -79,6 +79,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvatarScaleMod", "AvatarSca
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmoothRay", "SmoothRay\SmoothRay.csproj", "{99F9D60D-9A2D-4DBE-AA52-13D8A0838696}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmoothRay", "SmoothRay\SmoothRay.csproj", "{99F9D60D-9A2D-4DBE-AA52-13D8A0838696}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaNetworkVariables", "LuaNetworkVariables\LuaNetworkVariables.csproj", "{A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -237,6 +239,10 @@ Global
{99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Debug|Any CPU.Build.0 = Debug|Any CPU {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.ActiveCfg = Release|Any CPU {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.Build.0 = Release|Any CPU {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.Build.0 = Release|Any CPU
{A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE