Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Plain Craft Launcher 2/Modules/ModEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,10 @@ public static string[] GetAbsoluteUrls(string relativeUrl, EventType type)

private static bool EventSafetyConfirm(string message)
{
if (ModBase.Setup.Get("HintCustomCommand") == "True")
var skipConfirm = ModBase.Setup.Get("HintCustomCommand");
if (skipConfirm is bool skipConfirmBool && skipConfirmBool)
return true;
if (skipConfirm is string skipConfirmString && string.Equals(skipConfirmString, "True", StringComparison.OrdinalIgnoreCase))
return true;

switch (ModMain.MyMsgBox(
Expand All @@ -441,11 +444,11 @@ private static bool EventSafetyConfirm(string message)
case 1:
return true;
case 2:
ModBase.Setup.Set("HintCustomCommand", "True");
ModBase.Setup.Set("HintCustomCommand", true);
return true;
default:
return false;
}
}
}
}
}
Loading