更新新年祝福

This commit is contained in:
ZouJin 2024-02-09 21:30:11 +08:00
parent 956e006156
commit 3b4e8d3f2f
7 changed files with 97 additions and 29 deletions

View File

@ -52,7 +52,7 @@ namespace VPet_Simulator.Core
public bool IsWorking { get; private set; } = false;
public SoundPlayer soundPlayer = new SoundPlayer();
public bool windowMediaPlayerAvailable = true;
public Main(GameCore core, bool loadtouchevent = true)
public Main(GameCore core, bool loadtouchevent = true, IGraph startUPGraph = null)
{
//Console.WriteLine(DateTime.Now.ToString("T:fff"));
InitializeComponent();
@ -74,7 +74,7 @@ namespace VPet_Simulator.Core
}
if (!core.Controller.EnableFunction)
Core.Save.Mode = NoFunctionMOD;
var ig = Core.Graph.FindGraph(Core.Graph.FindName(GraphType.StartUP), AnimatType.Single, core.Save.Mode);
IGraph ig = startUPGraph ?? Core.Graph.FindGraph(Core.Graph.FindName(GraphType.StartUP), AnimatType.Single, core.Save.Mode);
ig ??= Core.Graph.FindGraph(Core.Graph.FindName(GraphType.Default), AnimatType.Single, core.Save.Mode);
//var ig2 = Core.Graph.FindGraph(GraphType.Default, core.GameSave.Mode);
PetGrid2.Visibility = Visibility.Collapsed;
@ -84,11 +84,11 @@ namespace VPet_Simulator.Core
//{
// Thread.Sleep(100);
//}//新功能:等待所有图像加载完成再跑
foreach(var igs in Core.Graph.GraphsList.Values)
foreach (var igs in Core.Graph.GraphsList.Values)
{
foreach(var ig2 in igs.Values)
foreach (var ig2 in igs.Values)
{
foreach(var ig3 in ig2)
foreach (var ig3 in ig2)
{
while (!ig3.IsReady)
{
@ -381,7 +381,7 @@ namespace VPet_Simulator.Core
private DateTime wavespan;
private void MainGrid_MouseWave(object sender, MouseEventArgs e)
{
if(e.LeftButton == MouseButtonState.Pressed)
if (e.LeftButton == MouseButtonState.Pressed)
return;
isPress = false;
if (rasetype >= 0 || State != WorkingState.Nomal)

View File

@ -1,6 +1,7 @@
using LinePutScript;
using LinePutScript.Dictionary;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;
using VPet_Simulator.Core;
@ -146,7 +147,13 @@ namespace VPet_Simulator.Windows.Interface
/// 如果你的mod属于作弊mod/有作弊内容,请在作弊前调用这个方法
/// </summary>
void HashCheckOff();
/// <summary>
/// 游戏打开过的窗口, 会在退出时统一调用退出
/// </summary>
List<Window> Windows { get; set; }
/// <summary>
/// 游戏存档数据
/// </summary>
GameSave_v2 GameSavesData { get; }
}

View File

@ -1440,7 +1440,15 @@ namespace VPet_Simulator.Windows
LoadingText.Content = "尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待".Translate();
Core.Graph = petloader.Graph(Set.Resolution);
Main = new Main(Core);
#if NewYear
//临时更新:新年进入动画,
if (DateTime.Now < new DateTime(2024, 2, 19))
{
Main = new Main(Core, startUPGraph: Core.Graph.FindGraph("newyear", AnimatType.Single, GameSave.ModeType.Nomal));
}
else
Main = new Main(Core);
#endif
Main.NoFunctionMOD = Set.CalFunState;
@ -1782,24 +1790,48 @@ namespace VPet_Simulator.Windows
Main.Say("哼哼~主人,我的考试成绩出炉了哦,快来和我一起看我的成绩单喵".Translate(), "shining");
});
}
#if DEMO
else
#if NewYear
//仅新年功能
if (DateTime.Now < new DateTime(2024, 2, 18))
{
notifyIcon.ShowBalloonTip(10, "正式版更新通知".Translate(), //本次更新内容
"虚拟桌宠模拟器 现已发布正式版, 赶快前往下载吧!", ToolTipIcon.Info);
Process.Start("https://store.steampowered.com/app/1920960/VPet/");
Task.Run(() =>
{
Thread.Sleep(5000);
string sayny;
switch (DateTime.Now.Day)
{
default:
case 9:
sayny = "除夕除夕,燃炮祭祖,贴春联,换窗花,主人来一起吃年夜饭!一起包饺砸!{0}祝主人新年快乐!饺子饺子饺饺子!".Translate(GameSavesData.GameSave.Name);
break;
case 10:
sayny = "初一初一,开门炮仗,主人~恭喜发财,红包拿来~".Translate();
break;
case 11:
sayny = "初二初二,回娘家去,左手一只鸡,右手一只鸭,一起回家吧主人~".Translate();
break;
case 12:
sayny = "初三初三,晚起早睡,不待客,过年辛苦了主人,好好休息吧~".Translate();
break;
case 13:
sayny = "初四初四,接五路,迎灶神,吃折箩,恭迎灶神爷!绝对不是肚子饿了!".Translate();
break;
case 14:
sayny = "初五初五,赶五穷!拿扫帚把垃圾清扫出去!把脏东西都赶出去!今日宜,清屏工作。".Translate();
break;
case 15:
sayny = "初六初六,送穷鬼,辞旧迎新,送走旧日贫穷困苦,迎接新一年!诶诶,别赶我啊。".Translate();
break;
case 16:
sayny = "初七初七,登高出游,戴人胜,人胜是一种头饰,又叫彩胜,华胜,从晋朝开始有剪彩为花、剪彩戴在头发上哦。主人我好看吗~".Translate();
break;
case 17:
sayny = "初八初八,放生祈福,拜谷神,今天是假期最后一天了,和主人过年很开心哦,最后~主人~您还有许多事需要处理,现在还不能休息哦~".Translate();
break;
}
Main.SayRnd(sayny);
});
}
#else
//else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 8, 11) && LocalizeCore.CurrentCulture.StartsWith("cn"))
//{
// if (Set["SingleTips"].GetDateTime("update") > new DateTime(2023, 8, 1)) // 上次更新日期时间
// notifyIcon.ShowBalloonTip(10, "更新通知 08/11", //本次更新内容
// "新增跳舞功能,桌宠会在播放音乐的时候跳舞\n新增不开心大部分系列动画\n更好买支持翻页", ToolTipIcon.Info);
// else// 累计更新内容
// notifyIcon.ShowBalloonTip(10, "更新通知 08/01",
// "更新了新的动画系统\n新增桌宠会在播放音乐的时候跳舞\n新增不开心大部分系列动画\n更好买支持翻页", ToolTipIcon.Info);
// Set["SingleTips"].SetDateTime("update", DateTime.Now);
//}
#endif
//MOD报错
foreach (CoreMOD cm in CoreMODs)

View File

@ -37,20 +37,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;X64</DefineConstants>
<DefineConstants>$(DefineConstants);NewYear</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;X64</DefineConstants>
<DefineConstants>$(DefineConstants);NewYear</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>$(DefineConstants);NewYear</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>$(DefineConstants);NewYear</DefineConstants>
</PropertyGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyTrademarkAttribute">

View File

@ -18,3 +18,12 @@
圣诞草莓奶茶_giftintor#I don't know why it's Christmas cream tea and not Christmas cake, maybe the artist likes Christmas strawberry cream tea:|
萝莉丝姜饼人#Gingerbread Lolis:|
萝莉丝姜饼人_giftintor#Lolis made her own gingerbread man, and Lolis would get mad if she couldn't eat it because it was too cute!:|
初三初三,晚起早睡,不待客,过年辛苦了主人,好好休息吧~#The third day of the first month, get up late and go to bed early, don't wait for guests, happy new year, master, have a good rest~:|
初二初二,回娘家去,左手一只鸡,右手一只鸭,一起回家吧主人~#The second day of the first month, go back to your mother's house, a chicken in your left hand, a duck in your right hand, let's go home together, master~:|
初一初一,开门炮仗,主人~恭喜发财,红包拿来~#The first day of the first month, open the door and set off firecrackers, master~ Congratulations on making a fortune, bring me a red envelope~:|
除夕除夕,燃炮祭祖,贴春联,换窗花,主人来一起吃年夜饭!一起包饺砸!{0}祝主人新年快乐!饺子饺子饺饺子!#New Year's Eve, set off firecrackers to worship ancestors, paste spring couplets, change window flowers, master, come and have a New Year's Eve dinner together! Let's make dumplings together! {0} wishes the master a happy new year! Dumplings dumplings dumplings!:|
初四初四,接五路,迎灶神,吃折箩,恭迎灶神爷!绝对不是肚子饿了!#The fourth day of the first month, meet the five roads, welcome the kitchen god, eat the zheluo, welcome the kitchen god! Absolutely not hungry!:|
初五初五,赶五穷!拿扫帚把垃圾清扫出去!把脏东西都赶出去!今日宜,清屏工作。#The fifth day of the first month, drive away the five poor! Use a broom to sweep away the garbage! Drive away the dirty things! Today is suitable for clearing the screen.:|
初六初六,送穷鬼,辞旧迎新,送走旧日贫穷困苦,迎接新一年!诶诶,别赶我啊。#The sixth day of the first month, send the poor ghost, bid farewell to the old and welcome the new, send away the old poverty and hardship, and welcome the new year! Hey hey, don't drive me away.:|
初七初七,登高出游,戴人胜,人胜是一种头饰,又叫彩胜,华胜,从晋朝开始有剪彩为花、剪彩戴在头发上哦。主人我好看吗~#The seventh day of the first month, go out to climb high, wear a human victory, human victory is a kind of headdress, also called colored victory, Hua victory, from the Jin Dynasty began to cut colored flowers, cut colored hair on the head oh. Master, do I look good~:|
初八初八,放生祈福,拜谷神,今天是假期最后一天了,和主人过年很开心哦,最后~主人~您还有许多事需要处理,现在还不能休息哦~#The eighth day of the first month, release life and pray for blessings, worship the god of grain, today is the last day of the holiday, and I am very happy to spend the New Year with the master, finally~ master~ you still have many things to deal with, you can't rest now~:|

View File

@ -18,3 +18,12 @@
圣诞草莓奶茶_giftintor#我不知道为什么是圣诞奶茶而不是圣诞蛋糕,可能画师喜欢圣诞草莓奶茶吧:|
萝莉丝姜饼人#萝莉丝姜饼人:|
萝莉丝姜饼人_giftintor#萝莉丝做的自己样子的姜饼人,要是因为太可爱舍不得吃萝莉丝会生气的哦:|
初三初三,晚起早睡,不待客,过年辛苦了主人,好好休息吧~#初三初三,晚起早睡,不待客,过年辛苦了主人,好好休息吧~:|
初二初二,回娘家去,左手一只鸡,右手一只鸭,一起回家吧主人~#初二初二,回娘家去,左手一只鸡,右手一只鸭,一起回家吧主人~:|
初一初一,开门炮仗,主人~恭喜发财,红包拿来~#初一初一,开门炮仗,主人~恭喜发财,红包拿来~:|
除夕除夕,燃炮祭祖,贴春联,换窗花,主人来一起吃年夜饭!一起包饺砸!{0}祝主人新年快乐!饺子饺子饺饺子!#除夕除夕,燃炮祭祖,贴春联,换窗花,主人来一起吃年夜饭!一起包饺砸!{0}祝主人新年快乐!饺子饺子饺饺子!:|
初四初四,接五路,迎灶神,吃折箩,恭迎灶神爷!绝对不是肚子饿了!#初四初四,接五路,迎灶神,吃折箩,恭迎灶神爷!绝对不是肚子饿了!:|
初五初五,赶五穷!拿扫帚把垃圾清扫出去!把脏东西都赶出去!今日宜,清屏工作。#初五初五,赶五穷!拿扫帚把垃圾清扫出去!把脏东西都赶出去!今日宜,清屏工作。:|
初六初六,送穷鬼,辞旧迎新,送走旧日贫穷困苦,迎接新一年!诶诶,别赶我啊。#初六初六,送穷鬼,辞旧迎新,送走旧日贫穷困苦,迎接新一年!诶诶,别赶我啊。:|
初七初七,登高出游,戴人胜,人胜是一种头饰,又叫彩胜,华胜,从晋朝开始有剪彩为花、剪彩戴在头发上哦。主人我好看吗~#初七初七,登高出游,戴人胜,人胜是一种头饰,又叫彩胜,华胜,从晋朝开始有剪彩为花、剪彩戴在头发上哦。主人我好看吗~:|
初八初八,放生祈福,拜谷神,今天是假期最后一天了,和主人过年很开心哦,最后~主人~您还有许多事需要处理,现在还不能休息哦~#初八初八,放生祈福,拜谷神,今天是假期最后一天了,和主人过年很开心哦,最后~主人~您还有许多事需要处理,现在还不能休息哦~:|

View File

@ -18,3 +18,12 @@
圣诞草莓奶茶_giftintor#我不知道為什麼是聖誕奶茶而不是聖誕蛋糕,可能繪師喜歡聖誕草莓奶茶吧:|
萝莉丝姜饼人#蘿莉斯薑餅人:|
萝莉丝姜饼人_giftintor#蘿莉絲做的自己樣子的薑餅人,要是因為太可愛捨不得吃蘿莉絲會生氣的哦:|
初三初三,晚起早睡,不待客,过年辛苦了主人,好好休息吧~#初三初三,晚起早睡,不待客,過年辛苦了主人,好好休息吧~:|
初二初二,回娘家去,左手一只鸡,右手一只鸭,一起回家吧主人~#初二初二,回娘家去,左手一只鸡,右手一只鸭,一起回家吧主人~:|
初一初一,开门炮仗,主人~恭喜发财,红包拿来~#初一初一,開門炮仗,主人~恭喜發財,紅包拿來~:|
除夕除夕,燃炮祭祖,贴春联,换窗花,主人来一起吃年夜饭!一起包饺砸!{0}祝主人新年快乐!饺子饺子饺饺子!#除夕除夕,燃炮祭祖,貼春聯,換窗花,主人來一起吃年夜飯!一起包餃砸!{0}祝主人新年快樂!餃子餃子餃餃子!:|
初四初四,接五路,迎灶神,吃折箩,恭迎灶神爷!绝对不是肚子饿了!#初四初四,接五路,迎灶神,吃折箩,恭迎灶神爺!絕對不是肚子餓了!:|
初五初五,赶五穷!拿扫帚把垃圾清扫出去!把脏东西都赶出去!今日宜,清屏工作。#初五初五,趕五窮!拿掃帚把垃圾清掃出去!把髒東西都趕出去!今日宜,清屏工作。:|
初六初六,送穷鬼,辞旧迎新,送走旧日贫穷困苦,迎接新一年!诶诶,别赶我啊。#初六初六,送窮鬼,辭舊迎新,送走舊日貧窮困苦,迎接新一年!誒誒,別趕我啊。:|
初七初七,登高出游,戴人胜,人胜是一种头饰,又叫彩胜,华胜,从晋朝开始有剪彩为花、剪彩戴在头发上哦。主人我好看吗~#初七初七,登高出遊,戴人勝,人勝是一種頭飾,又叫彩勝,華勝,從晉朝開始有剪彩為花、剪彩戴在頭髮上哦。主人我好看嗎~:|
初八初八,放生祈福,拜谷神,今天是假期最后一天了,和主人过年很开心哦,最后~主人~您还有许多事需要处理,现在还不能休息哦~#初八初八,放生祈福,拜穀神,今天是假期最後一天了,和主人過年很開心哦,最後~主人~您還有許多事需要處理,現在還不能休息哦~:|