increase room diversity, improve ui

This commit is contained in:
2023-05-13 13:06:08 +02:00
parent ec094f410f
commit 033989a85e
21 changed files with 736 additions and 83 deletions

View File

@@ -17,6 +17,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// Whether to store the taken measurements in the database. Disable for test runs.
/// </summary>
public static bool Store { get; set; }
public static bool PreferLessPlayed => GameControl.Instance.preferLessPlayed.Value;
private static Dictionary<int, PuzzleMeasurement> _runningMeasurements;
private static Session _currentSession;
@@ -52,6 +53,12 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// <remarks>This only counts puzzles already placed in a room.</remarks>
public static float EstimateTime(Room room) =>
room.puzzles.Sum(puzzle => EstimateTime((PuzzleModuleDescription)puzzle.description));
/// <summary>
/// How often a specific puzzle has been played before.
/// </summary>
public static int TimesPlayed(PuzzleModuleDescription puzzle) =>
PuzzleStorage.Instance.LoadOrNew(puzzle).Measurements.Count;
/// <summary>
/// The estimated percentile the current player is placed in.