Skip to content

Commit

Permalink
Update InstallationCheckPlugin.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Awbugl committed Dec 29, 2023
1 parent 26712e0 commit c724093
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Compatibility/InstallationCheckPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace ProjectGenesis.Compatibility
/// <summary>
/// special thanks for https://github.com/kremnev8/DSP-Mods/blob/master/Mods/BlueprintTweaks/InstallationChecker.cs
/// </summary>
[BepInPlugin(MODGUID, MODNAME, VERSION)]
[BepInPlugin(MODGUID, MODNAME, ProjectGenesis.VERSION)]
[BepInDependency(DSPBattle.GUID, BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency(BlueprintTweaks.GUID, BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency(Bottleneck.GUID, BepInDependency.DependencyFlags.SoftDependency)]
Expand All @@ -29,7 +29,6 @@ public class InstallationCheckPlugin : BaseUnityPlugin
{
public const string MODGUID = "org.LoShin.GenesisBook.InstallationCheck";
public const string MODNAME = "GenesisBook.InstallationCheck";
public const string VERSION = "1.0.0";

private static bool _shown;

Expand Down Expand Up @@ -73,7 +72,7 @@ public static void OnMainMenuOpen()
if (_shown) return;
_shown = true;

string msg = string.Empty;
string msg = null;

if (!ProjectGenesis.DisableMessageBoxEntry.Value) msg = "GenesisBookLoadMessage";

Expand All @@ -83,9 +82,10 @@ public static void OnMainMenuOpen()

if (!PreloaderInstalled) msg = "PreloaderNotInstalled";

if (!string.IsNullOrEmpty(msg))
UIMessageBox.Show("GenesisBookLoadTitle".TranslateFromJson(), msg.TranslateFromJson(), "确定".TranslateFromJson(),
"跳转交流群".TranslateFromJson(), "跳转日志".TranslateFromJson(), UIMessageBox.INFO, null, OpenBrowser, OpenLog);
if (string.IsNullOrEmpty(msg)) return;

UIMessageBox.Show("GenesisBookLoadTitle".TranslateFromJson(), msg.TranslateFromJson(), "确定".TranslateFromJson(),
"跳转交流群".TranslateFromJson(), "跳转日志".TranslateFromJson(), UIMessageBox.INFO, null, OpenBrowser, OpenLog);
}

public static void OpenBrowser() => Application.OpenURL("创世之书链接".TranslateFromJson());
Expand Down

0 comments on commit c724093

Please sign in to comment.