2022-05-14 19:53:00 +01:00
|
|
|
|
using BepInEx;
|
2023-08-08 19:34:27 +01:00
|
|
|
|
using BepInEx.Configuration;
|
|
|
|
|
using System;
|
2022-05-14 19:53:00 +01:00
|
|
|
|
|
|
|
|
|
namespace CWX_MasterKey
|
|
|
|
|
{
|
2023-03-12 11:09:53 +00:00
|
|
|
|
[BepInPlugin("com.CWX.MasterKey", "CWX-MasterKey", "1.4.3")]
|
2022-10-19 17:27:45 +01:00
|
|
|
|
public class MasterKey : BaseUnityPlugin
|
2022-05-14 19:53:00 +01:00
|
|
|
|
{
|
2023-08-08 19:34:27 +01:00
|
|
|
|
private const string KeyConfigName = "Key Config";
|
|
|
|
|
internal static ConfigEntry<string> Key;
|
|
|
|
|
private static string DefaultKey = "5c1d0d6d86f7744bb2683e1f";
|
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
|
private void Awake()
|
2022-09-19 00:12:56 +01:00
|
|
|
|
{
|
2023-08-08 19:34:27 +01:00
|
|
|
|
InitConfig();
|
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
|
new MasterKeyPatch().Enable();
|
2022-09-19 00:12:56 +01:00
|
|
|
|
}
|
2023-08-08 19:34:27 +01:00
|
|
|
|
|
|
|
|
|
private void InitConfig()
|
|
|
|
|
{
|
|
|
|
|
Key = Config.Bind(
|
|
|
|
|
KeyConfigName,"Key",
|
|
|
|
|
DefaultKey, "This will be used as the key to open doors");
|
|
|
|
|
}
|
2022-05-14 19:53:00 +01:00
|
|
|
|
}
|
2022-10-19 17:27:45 +01:00
|
|
|
|
}
|