refactor: use MyPluginInfo for plugin attributes
This commit is contained in:
parent
2619d05374
commit
31e2cda45b
3 changed files with 8 additions and 9 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -1,14 +1,17 @@
|
|||
{
|
||||
"cSpell.words": [
|
||||
"allmaps",
|
||||
"anavoi",
|
||||
"Behaviour",
|
||||
"currentmap",
|
||||
"Dont",
|
||||
"Gaboule",
|
||||
"gamemode",
|
||||
"GBSU",
|
||||
"gmenu",
|
||||
"hlapi",
|
||||
"netstandard",
|
||||
"playercount",
|
||||
"protontricks",
|
||||
"rotationconfig",
|
||||
"serverip",
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ Please refer to the documentation for more information.");
|
|||
{
|
||||
if (menu_shown)
|
||||
{
|
||||
gmenu = GUILayout.Window(121, gmenu, ShowOurWindow, $"{Plugin.PluginName} [{Plugin.PluginVersion}]");
|
||||
gmenu = GUILayout.Window(121, gmenu, ShowOurWindow, $"{MyPluginInfo.PLUGIN_NAME} [{MyPluginInfo.PLUGIN_VERSION}]");
|
||||
}
|
||||
|
||||
if (error_shown)
|
||||
|
|
|
|||
12
Plugin.cs
12
Plugin.cs
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using BepInEx;
|
||||
using BepInEx.Logging;
|
||||
|
|
@ -11,7 +11,7 @@ using UnityEngine;
|
|||
|
||||
namespace GBSU;
|
||||
|
||||
[BepInPlugin(PluginGUID, PluginName, PluginVersion)]
|
||||
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
|
||||
[BepInProcess("Gang Beasts.exe")]
|
||||
public class Plugin : BaseUnityPlugin
|
||||
{
|
||||
|
|
@ -40,10 +40,10 @@ public class Plugin : BaseUnityPlugin
|
|||
{
|
||||
// Plugin startup logic
|
||||
Log = base.Logger;
|
||||
Log.LogInfo($"\n------\nPlugin {PluginName} [{PluginVersion}] is loaded!\n------\n");
|
||||
Log.LogInfo($"\n------\nPlugin {MyPluginInfo.PLUGIN_NAME} [{MyPluginInfo.PLUGIN_VERSION}] is loaded!\n------\n");
|
||||
|
||||
HarmonyFileLog.Enabled = true;
|
||||
var harmony = new Harmony(PluginGUID);
|
||||
var harmony = new Harmony(MyPluginInfo.PLUGIN_GUID);
|
||||
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
||||
|
||||
GBSUCompInit();
|
||||
|
|
@ -81,8 +81,4 @@ public class Plugin : BaseUnityPlugin
|
|||
Log.LogDebug("Adding GBSUServer component");
|
||||
GBSUCompContainer.AddComponent<GBSUServer>();
|
||||
}
|
||||
|
||||
public const string PluginGUID = "com.gaboule.plugins.gbsu";
|
||||
public const string PluginName = "Gang Beasts Server Utility";
|
||||
public const string PluginVersion = "1.0.2";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue