Implement stage skipping

This commit is contained in:
Mikhail
2024-07-14 19:07:42 -04:00
parent 367cd64b8e
commit 5134ac187b
15 changed files with 558 additions and 49 deletions

View File

@@ -1,6 +1,7 @@
using ASodium;
using Newtonsoft.Json;
using nksrv.LobbyServer;
using nksrv.LobbyServer.Msgs.Stage;
using nksrv.StaticInfo;
using Swan.Logging;
using System;
@@ -135,6 +136,24 @@ namespace nksrv.Utils
return num;
}
public bool IsStageCompleted(int id, bool isNorm)
{
foreach (var item in FieldInfo)
{
if (item.Key.Contains("hard") && isNorm) continue;
if (item.Key.Contains("normal") && !isNorm) continue;
foreach (var s in item.Value.CompletedStages)
{
if (s.StageId == id)
{
return true;
}
}
}
return false;
}
}
public class CoreInfo
{