28 lines
1.5 KiB
C#
28 lines
1.5 KiB
C#
namespace SoulstormReplayReader.Core.Domain;
|
|
|
|
public sealed class GameSettings(int gameSettingsCount = 8)
|
|
{
|
|
private readonly Dictionary<string, int?> _settings = new(gameSettingsCount);
|
|
public IReadOnlyDictionary<string, int?> Settings => _settings;
|
|
|
|
public int? this[string name] => _settings.GetValueOrDefault(name);
|
|
|
|
internal void AddSetting(string name, int value)
|
|
{
|
|
_settings.Add(name, value);
|
|
}
|
|
|
|
public int? AiDifficulty => _settings.GetValueOrDefault("FDIA"); // FDIA = AIDF = AI Difficulty
|
|
public int? StartResources => _settings.GetValueOrDefault("TSSR"); // TSSR = RSST = Starting Resources
|
|
public int? LockTeams => _settings.GetValueOrDefault("MTKL"); // MTKL = LKTM = Lock Teams
|
|
public int? CheatsOn => _settings.GetValueOrDefault("AEHC"); // AEHC = CHEA = Cheats Enabled
|
|
public int? StartingLocation => _settings.GetValueOrDefault("COLS"); // COLS = SLOC = Starting Location
|
|
public int? GameSpeed => _settings.GetValueOrDefault("DPSG"); // DPSG = GSPD = Game Speed
|
|
public int? ResourceSharing => _settings.GetValueOrDefault("HSSR"); // HSSR = RSSH = Resource Sharing
|
|
public int? ResourceRate => _settings.GetValueOrDefault("TRSR"); // TRSR = RSRT = Resource Rate
|
|
public int? DisableFlyers => _settings.GetValueOrDefault("YLFN"); // YLFN = NFLY = No flyers
|
|
|
|
public bool IsQuickStart => StartResources == 1;
|
|
public bool AreCheatsOn => CheatsOn == 1;
|
|
public bool ArePositionsRandomized => StartingLocation == 0;
|
|
} |