CI / Go Backend (push) Canceled after 0s
初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器 HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块 Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚 AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
51 lines
1.8 KiB
C#
51 lines
1.8 KiB
C#
using PCL.Core.App;
|
|
using PCL.Core.App.Localization;
|
|
|
|
namespace PCL;
|
|
|
|
public static class AnnouncementService
|
|
{
|
|
public static void Load()
|
|
{
|
|
if (States.System.AnnounceSolution > 1)
|
|
return;
|
|
|
|
var showedAnnounced = States.Hint.ShowedAnnouncements
|
|
.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
|
|
.ToList();
|
|
|
|
var showAnnounce = UpdateManager.remoteServer.GetAnnouncementList().Content
|
|
.Where(x => !showedAnnounced.Contains(x.Id))
|
|
.ToList();
|
|
|
|
ModBase.Log("[System] 需要展示的公告数量:" + showAnnounce.Count);
|
|
|
|
ModBase.RunInNewThread(() =>
|
|
{
|
|
foreach (var item in showAnnounce)
|
|
{
|
|
ModMain.MyMsgBox(item.Detail, item.Title,
|
|
item.Btn1 is null ? "" : item.Btn1.Text,
|
|
item.Btn2 is null ? "" : item.Btn2.Text,
|
|
Lang.Text("Common.Action.Close"),
|
|
button1Action: () =>
|
|
{
|
|
if (EventTypeMapper.TryParse(
|
|
item.Btn1.Command, out var eventType))
|
|
CustomEvent.Raise(eventType, item.Btn1.CommandParameter);
|
|
},
|
|
button2Action: () =>
|
|
{
|
|
if (EventTypeMapper.TryParse(
|
|
item.Btn2.Command, out var eventType))
|
|
CustomEvent.Raise(eventType, item.Btn2.CommandParameter);
|
|
});
|
|
}
|
|
});
|
|
|
|
showedAnnounced.AddRange(showAnnounce.Select(x => x.Id));
|
|
showedAnnounced = showedAnnounced.Distinct().ToList();
|
|
States.Hint.ShowedAnnouncements = showedAnnounced.Join("|");
|
|
}
|
|
}
|