feat: 博士,听说可露希尔小姐的商店里新上架了美酒,要去来一杯吗?

This commit is contained in:
MistEO
2023-04-01 11:45:53 +08:00
parent f53b815a6e
commit aa4e82fe14
4 changed files with 22 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespaces:MaaWpfGui"
@@ -519,6 +519,7 @@
<!-- AutoRecruitSettings -->
<!-- EasterEggs -->
<system:String x:Key="BuyWineOnAprilFoolsDay">Doctor, welcome to this grand celebration! I heard that there is a new wine in Ms Closure's store, want to have a drink?</system:String>
<system:String x:Key="Burping">Ugh... Ehem</system:String>
<system:String x:Key="DrunkAndStaggering">Ah, doctor. Why do you sway, so much in your movement today?</system:String>
<system:String x:Key="Hangover">I must not drink, drink so much next time...</system:String>
@@ -530,4 +531,4 @@
<system:String x:Key="VersionUpdated">Version Updated</system:String>
<system:String x:Key="VersionUpdatedTo">Version:</system:String>
<!-- VersionUpdatePopup -->
</ResourceDictionary>
</ResourceDictionary>

View File

@@ -1,4 +1,4 @@
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespaces:MaaWpfGui"
@@ -527,6 +527,7 @@
<!-- AutoRecruitSettings -->
<!-- EasterEggs -->
<system:String x:Key="BuyWineOnAprilFoolsDay">博士,欢迎加入这盛大的鱼人庆典!听说可露希尔小姐的商店里新上架了美酒,要去来一杯吗?</system:String>
<system:String x:Key="Burping">呃......咳嗯</system:String>
<system:String x:Key="DrunkAndStaggering">呀,博士。你今天走起路来,怎么看着摇摇晃晃的?</system:String>
<system:String x:Key="Hangover">下次不能喝、喝这么多了......</system:String>
@@ -538,4 +539,4 @@
<system:String x:Key="VersionUpdated">版本已更新</system:String>
<system:String x:Key="VersionUpdatedTo">已更新:</system:String>
<!-- VersionUpdatePopup -->
</ResourceDictionary>
</ResourceDictionary>

View File

@@ -2633,12 +2633,23 @@ namespace MaaWpfGui.ViewModels.UI
}
}
public static bool AprilFoolsDay()
{
var yjDate = DateTime.UtcNow.ToYJDate();
return yjDate.Month == 4 && yjDate.Day == 1;
}
/// <summary>
/// Did you buy wine?
/// </summary>
/// <returns>The answer.</returns>
public bool DidYouBuyWine()
{
if (AprilFoolsDay())
{
return true;
}
var wine_list = new[] { "酒", "drink", "wine", "beer", "술", "🍷", "🍸", "🍺", "🍻", "🥃", "🍶" };
foreach (var wine in wine_list)
{

View File

@@ -305,6 +305,11 @@ namespace MaaWpfGui.ViewModels.UI
UpdateDatePrompt();
UpdateStageList(true);
RefreshCustonInfrastPlan();
if (SettingsViewModel.AprilFoolsDay())
{
AddLog(LocalizationHelper.GetString("BuyWineOnAprilFoolsDay"), UiLogColor.Info);
}
}
private DayOfWeek _curDayOfWeek;