Mervill
2022-11-07 18:18:21 -08:00
committed by GitHub
parent 01e0f60f81
commit 40b556d206
12 changed files with 181 additions and 99 deletions

View File

@@ -26,35 +26,45 @@ public interface IGameMapManager
IEnumerable<GameMapPrototype> AllMaps();
/// <summary>
/// Attempts to select the given map.
/// Gets the currently selected map
/// </summary>
/// <returns>selected map</returns>
GameMapPrototype? GetSelectedMap();
/// <summary>
/// Clears the selected map, if any
/// </summary>
void ClearSelectedMap();
/// <summary>
/// Attempts to select the given map, checking eligibility criteria
/// </summary>
/// <param name="gameMap">map prototype</param>
/// <returns>success or failure</returns>
bool TrySelectMap(string gameMap);
bool TrySelectMapIfEligible(string gameMap);
/// <summary>
/// Forces the given map, making sure the game map manager won't reselect if conditions are no longer met at round restart.
/// Select the given map regardless of eligibility
/// </summary>
/// <param name="gameMap">map prototype</param>
/// <returns>success or failure</returns>
void ForceSelectMap(string gameMap);
void SelectMap(string gameMap);
/// <summary>
/// Selects a random map.
/// Selects a random map eligible map
/// </summary>
void SelectRandomMap();
void SelectMapRandom();
/// <summary>
/// Gets the currently selected map, without double-checking if it can be used.
/// Selects the map at the front of the rotation queue
/// </summary>
/// <returns>selected map</returns>
GameMapPrototype GetSelectedMap();
void SelectMapFromRotationQueue(bool markAsPlayed = false);
/// <summary>
/// Gets the currently selected map, double-checking if it can be used.
/// Selects the map by following rules set in the config
/// </summary>
/// <returns>selected map</returns>
GameMapPrototype GetSelectedMapChecked(bool loud = false, bool markAsPlayed = false);
public void SelectMapByConfigRules();
/// <summary>
/// Checks if the given map exists