Skip to content

Commit 45e91c0

Browse files
committed
add mine version
1 parent 1e0a29a commit 45e91c0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

Quaver.API/Maps/Qua.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ namespace Quaver.API.Maps
2727
public class Qua
2828
{
2929
// 0 versioning added
30+
// 1 mines
3031
public int QuaVersion { get; set; } = 0;
3132

3233
// Max supported version by this client
3334
// This should be incremented whenever breaking changes are made to quas
3435
// DetermineMinimumQuaVersion() should also be updated to allow older clients to load maps without new features
35-
public const int CurrentQuaVersion = 0;
36+
public const int CurrentQuaVersion = 1;
3637

3738
/// <summary>
3839
/// The name of the audio file
@@ -327,7 +328,19 @@ private bool CompareTimingGroups(Dictionary<string, TimingGroup> other)
327328

328329
public int DetermineMinimumQuaVersion()
329330
{
330-
return 0;
331+
int ver = 0;
332+
333+
void Check(int v, Func<bool> f)
334+
{
335+
if (ver < v && f())
336+
{
337+
ver = v;
338+
}
339+
}
340+
341+
Check(1, () => MineCount != 0);
342+
343+
return ver;
331344
}
332345

333346
/// <summary>

0 commit comments

Comments
 (0)