mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[LuaTTS] Initial Builds
This commit is contained in:
parent
f8dc4e9521
commit
0a0e6d849b
9 changed files with 194 additions and 1 deletions
20
LuaTTS/Patches.cs
Normal file
20
LuaTTS/Patches.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
using ABI.Scripting.CVRSTL.Client;
|
||||
using ABI.Scripting.CVRSTL.Common;
|
||||
using HarmonyLib;
|
||||
using MoonSharp.Interpreter;
|
||||
using NAK.LuaTTS.Modules;
|
||||
|
||||
namespace NAK.LuaTTS.Patches;
|
||||
|
||||
internal static class LuaScriptFactoryPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(LuaScriptFactory.CVRRequireModule), nameof(LuaScriptFactory.CVRRequireModule.require))]
|
||||
private static void Postfix_CVRRequireModule_require(string modid,
|
||||
ref object __result, ref Script ___script, CVRLuaContext ___context)
|
||||
{
|
||||
if (modid == "TextToSpeech")
|
||||
__result = TTSLuaModule.RegisterUserData(___script, ___context);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue