mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 20:03:41 +01:00
add AppearCondition.Fools23 for installer category which checks date, remove popup for now
This commit is contained in:
parent
e5204e4876
commit
fd66645f47
3 changed files with 29 additions and 1 deletions
|
|
@ -165,6 +165,12 @@ internal class FoolsManager : IDisposable, IServiceType
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CheckIsApplicableAprilFoolsTime()
|
||||||
|
{
|
||||||
|
var now = DateTime.Now;
|
||||||
|
return now is { Year: 2023, Month: 4, Day: 1 };
|
||||||
|
}
|
||||||
|
|
||||||
public void ActivatePlugin(string plugin)
|
public void ActivatePlugin(string plugin)
|
||||||
{
|
{
|
||||||
if (this.ActivatedPlugins.ContainsKey(plugin))
|
if (this.ActivatedPlugins.ContainsKey(plugin))
|
||||||
|
|
@ -238,10 +244,12 @@ internal class FoolsManager : IDisposable, IServiceType
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
var di = Service<DalamudInterface>.Get();
|
var di = Service<DalamudInterface>.Get();
|
||||||
di.OpenFoolsWindow();
|
di.OpenFoolsWindow();
|
||||||
|
|
||||||
dalamudConfig.HasSeenFools23 = true;
|
dalamudConfig.HasSeenFools23 = true;
|
||||||
dalamudConfig.QueueSave();
|
dalamudConfig.QueueSave();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ internal class PluginCategoryManager
|
||||||
new(11, "special.devIconTester", () => Locs.Category_IconTester),
|
new(11, "special.devIconTester", () => Locs.Category_IconTester),
|
||||||
new(12, "special.dalamud", () => Locs.Category_Dalamud),
|
new(12, "special.dalamud", () => Locs.Category_Dalamud),
|
||||||
new(13, "special.plugins", () => Locs.Category_Plugins),
|
new(13, "special.plugins", () => Locs.Category_Plugins),
|
||||||
new(14, "special.alternateReality", () => "Alternate Reality"),
|
new(14, "special.alternateReality", () => "Alternate Reality", CategoryInfo.AppearCondition.Fools23),
|
||||||
new(FirstTagBasedCategoryId + 0, "other", () => Locs.Category_Other),
|
new(FirstTagBasedCategoryId + 0, "other", () => Locs.Category_Other),
|
||||||
new(FirstTagBasedCategoryId + 1, "jobs", () => Locs.Category_Jobs),
|
new(FirstTagBasedCategoryId + 1, "jobs", () => Locs.Category_Jobs),
|
||||||
new(FirstTagBasedCategoryId + 2, "ui", () => Locs.Category_UI),
|
new(FirstTagBasedCategoryId + 2, "ui", () => Locs.Category_UI),
|
||||||
|
|
@ -362,6 +362,8 @@ internal class PluginCategoryManager
|
||||||
/// Check if plugin testing is enabled.
|
/// Check if plugin testing is enabled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
DoPluginTest,
|
DoPluginTest,
|
||||||
|
|
||||||
|
Fools23,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1150,6 +1150,10 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
if (!Service<DalamudConfiguration>.Get().DoPluginTest)
|
if (!Service<DalamudConfiguration>.Get().DoPluginTest)
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
case PluginCategoryManager.CategoryInfo.AppearCondition.Fools23:
|
||||||
|
if (!Service<FoolsManager>.Get().CheckIsApplicableAprilFoolsTime())
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
|
|
@ -1293,6 +1297,20 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
{
|
{
|
||||||
var manager = Service<FoolsManager>.Get();
|
var manager = Service<FoolsManager>.Get();
|
||||||
|
|
||||||
|
ImGui.TextWrapped(@"
|
||||||
|
A team of scientists and plugin developers have collaborated to create a new
|
||||||
|
version of Dalamud that includes plugins from other realities.
|
||||||
|
|
||||||
|
With our high tech systems, the plugin installer now offers new and unique
|
||||||
|
plugins with endless possibilities.
|
||||||
|
|
||||||
|
We hope you enjoy this new version of Dalamud, and we look forward to your feedback.
|
||||||
|
".Trim());
|
||||||
|
|
||||||
|
ImGuiHelpers.ScaledDummy(8);
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiHelpers.ScaledDummy(8);
|
||||||
|
|
||||||
foreach (var plugin in manager.FoolsPlugins)
|
foreach (var plugin in manager.FoolsPlugins)
|
||||||
{
|
{
|
||||||
// dropdown
|
// dropdown
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue