OnPostAsync()
_context.Prerequisites.Add(new Prerequisites() { Puzzle = meta, Prerequisite = intermediate });
_context.Prerequisites.Add(new Prerequisites() { Puzzle = meta, Prerequisite = hard });
_context.Prerequisites.Add(new Prerequisites() { Puzzle = other, Prerequisite = start });
+ _context.Prerequisites.Add(new Prerequisites() { Puzzle = cheat, Prerequisite = start });
+ _context.Prerequisites.Add(new Prerequisites() { Puzzle = lockIntro, Prerequisite = start });
+ _context.Prerequisites.Add(new Prerequisites() { Puzzle = lockPuzzle, Prerequisite = lockIntro });
await _context.SaveChangesAsync();
diff --git a/ServerCore/Pages/Events/Map.cshtml b/ServerCore/Pages/Events/Map.cshtml
index 004bd073..968b47f6 100644
--- a/ServerCore/Pages/Events/Map.cshtml
+++ b/ServerCore/Pages/Events/Map.cshtml
@@ -28,7 +28,7 @@
@foreach (var puzzle in Model.Puzzles)
{
- @(puzzle.Puzzle.Name) (@puzzle.SolveCount)
+ @(puzzle.Puzzle.Name) (@puzzle.SolveCount)
|
}
@@ -41,7 +41,7 @@
@(team.Rank)
- @(team.Team.Name)
+ @(team.Team.Name)
|
@Html.DisplayFor(modelItem => team.SolveCount)
diff --git a/ServerCore/Pages/Events/Map.cshtml.cs b/ServerCore/Pages/Events/Map.cshtml.cs
index 2eff1e5e..98f9a8c6 100644
--- a/ServerCore/Pages/Events/Map.cshtml.cs
+++ b/ServerCore/Pages/Events/Map.cshtml.cs
@@ -67,7 +67,13 @@ public async Task OnGetAsync()
team.SolveCount++;
team.Score += puzzle.Puzzle.SolveValue;
- if (puzzle.Puzzle.IsFinalPuzzle)
+ if (puzzle.Puzzle.IsCheatCode)
+ {
+ team.CheatCodeUsed = true;
+ team.FinalMetaSolveTime = DateTime.MaxValue;
+ }
+
+ if (puzzle.Puzzle.IsFinalPuzzle && !team.CheatCodeUsed)
{
team.FinalMetaSolveTime = state.SolvedTime.Value;
}
@@ -118,6 +124,7 @@ public class TeamStats
public int Score { get; set; }
public int SortOrder { get; set; }
public int? Rank { get; set; }
+ public bool CheatCodeUsed { get; set; }
public DateTime FinalMetaSolveTime { get; set; } = DateTime.MaxValue;
}
diff --git a/ServerCore/Pages/Events/Standings.cshtml.cs b/ServerCore/Pages/Events/Standings.cshtml.cs
index 994ed2e9..d59df570 100644
--- a/ServerCore/Pages/Events/Standings.cshtml.cs
+++ b/ServerCore/Pages/Events/Standings.cshtml.cs
@@ -32,7 +32,9 @@ public async Task OnGetAsync(SortOrder? sort)
Team = g.Key,
SolveCount = g.Count(),
Score = g.Sum(s => s.Puzzle.SolveValue),
- FinalMetaSolveTime = g.Where(s => s.Puzzle.IsFinalPuzzle).Select(s => s.SolvedTime).FirstOrDefault() ?? DateTime.MaxValue
+ FinalMetaSolveTime = g.Where(s => s.Puzzle.IsCheatCode).Any() ?
+ DateTime.MaxValue :
+ (g.Where(s => s.Puzzle.IsFinalPuzzle).Select(s => s.SolvedTime).FirstOrDefault() ?? DateTime.MaxValue)
})
.OrderBy(t => t.FinalMetaSolveTime).ThenByDescending(t => t.Score).ThenBy(t => t.Team.Name)
.ToListAsync();
diff --git a/ServerCore/Pages/Puzzles/Create.cshtml b/ServerCore/Pages/Puzzles/Create.cshtml
index 917ba1dc..4214bad9 100644
--- a/ServerCore/Pages/Puzzles/Create.cshtml
+++ b/ServerCore/Pages/Puzzles/Create.cshtml
@@ -45,6 +45,13 @@
+
@@ -87,6 +94,11 @@
+
+
+
+
+
diff --git a/ServerCore/Pages/Puzzles/Delete.cshtml b/ServerCore/Pages/Puzzles/Delete.cshtml
index 7490f6ab..8bde177c 100644
--- a/ServerCore/Pages/Puzzles/Delete.cshtml
+++ b/ServerCore/Pages/Puzzles/Delete.cshtml
@@ -45,6 +45,12 @@
@Html.DisplayFor(model => model.Puzzle.IsFinalPuzzle)
+
+ @Html.DisplayNameFor(model => model.Puzzle.IsCheatCode)
+
+
+ @Html.DisplayFor(model => model.Puzzle.IsCheatCode)
+
@Html.DisplayNameFor(model => model.Puzzle.SolveValue)
@@ -87,6 +93,12 @@
@Html.DisplayFor(model => model.Puzzle.MinutesToAutomaticallySolve)
+
+ @Html.DisplayNameFor(model => model.Puzzle.MinutesOfEventLockout)
+
+
+ @Html.DisplayFor(model => model.Puzzle.MinutesOfEventLockout)
+
@Html.DisplayNameFor(model => model.Puzzle.MaxAnnotationKey)
diff --git a/ServerCore/Pages/Puzzles/Edit.cshtml b/ServerCore/Pages/Puzzles/Edit.cshtml
index a14596d5..7a7ca5a7 100644
--- a/ServerCore/Pages/Puzzles/Edit.cshtml
+++ b/ServerCore/Pages/Puzzles/Edit.cshtml
@@ -49,6 +49,13 @@
+
@@ -91,6 +98,11 @@
+
+
+
+
+
|