namespace ConfusedPolarBear.Plugin.IntroSkipper; /// /// Warning manager. /// public static class WarningManager { private static PluginWarning warnings; /// /// Set warning. /// /// Warning. public static void SetFlag(PluginWarning warning) { warnings |= warning; } /// /// Clear warnings. /// public static void Clear() { warnings = PluginWarning.None; } /// /// Get warnings. /// /// Warnings. public static string GetWarnings() { return warnings.ToString(); } /// /// Check if a specific warning flag is set. /// /// Warning flag to check. /// True if the flag is set, otherwise false. public static bool HasFlag(PluginWarning warning) { return (warnings & warning) == warning; } }