ml_vpc: added options to use cookies from browsers and enable/disable the mod completely

This commit is contained in:
kafeijao 2025-11-18 14:53:59 +00:00
parent da9dc508d0
commit 7ada4c4d86
No known key found for this signature in database
GPG key ID: E99978723E454B4C
7 changed files with 302 additions and 3 deletions

View file

@ -0,0 +1,30 @@
using System;
using System.IO;
using System.Reflection;
namespace ml_vpc
{
static class ResourcesHandler
{
readonly static string ms_namespace = typeof(ResourcesHandler).Namespace;
public static string GetEmbeddedResource(string p_name)
{
string l_result = "";
Assembly l_assembly = Assembly.GetExecutingAssembly();
try
{
Stream l_libraryStream = l_assembly.GetManifestResourceStream(ms_namespace + ".resources." + p_name);
StreamReader l_streadReader = new StreamReader(l_libraryStream);
l_result = l_streadReader.ReadToEnd();
}
catch(Exception e)
{
MelonLoader.MelonLogger.Error(e);
}
return l_result;
}
}
}