forked from zombieb/undead-universal-patch-il2cpp
Add project files.
This commit is contained in:
40
Plugin.cs
Normal file
40
Plugin.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using BepInEx;
|
||||
using BepInEx.Logging;
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace undead_universal_patch_il2cpp;
|
||||
|
||||
[BepInPlugin("dev.proxnet.recroom.universalpatch.noneac.il2cpp", "Undead Universal Patch", "1.0.0")]
|
||||
public class Plugin : BasePlugin
|
||||
{
|
||||
public static new readonly ManualLogSource Log = Logger.CreateLogSource("UUPatch");
|
||||
|
||||
public static Harmony _hi = new("dev.proxnet.recroom.universalpatch.noneac.il2cpp");
|
||||
|
||||
public override bool Unload()
|
||||
{
|
||||
Log.LogInfo("Destroying.");
|
||||
_hi.UnpatchSelf();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
GenericConfig.LogAllRequests = Config.Bind("Generic", "LogAllRequests", GenericConfigDefaults.LogAllRequests,
|
||||
"Log all HTTP requests sent by the game.");
|
||||
PhotonConfig.PatchPhotonIds = Config.Bind("Photon", "PatchPhotonIds", PhotonConfigDefaults.PatchPhotonIds,
|
||||
"Enable/disable changing the target IDs in PhotonServerSettings." +
|
||||
"\nCustom server settings are not yet supported.");
|
||||
PhotonConfig.AppID = Config.Bind("Photon", "AppID", PhotonConfigDefaults.AppID,
|
||||
"The new target (PUN) App ID from the Photon dashboard.");
|
||||
PhotonConfig.VoiceAppID = Config.Bind("Photon", "VoiceAppID", PhotonConfigDefaults.VoiceAppID,
|
||||
"The new target Voice App ID from the Photon dashboard.");
|
||||
NameserverConfig.Rewrite = Config.Bind("Nameserver", "Rewrite", NameserverConfigDefaults.Rewrite,
|
||||
"Enable/disable rewriting the URL for nameserver requests.");
|
||||
NameserverConfig.NewUrl = Config.Bind("Nameserver", "NewUrl", NameserverConfigDefaults.NewUrl,
|
||||
"The new full URL to use when sending a nameserver request.");
|
||||
|
||||
_hi.PatchAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user