Refactor GameMapManager a bit (nukes mapforced) (#11513)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Closes https://github.com/space-wizards/space-station-14/issues/7192 Closes https://github.com/space-wizards/space-station-14/issues/6537 Closes https://github.com/space-wizards/space-station-14/issues/9579
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user