/// Skeld = 0, MiraHQ = 1, Polus = 2.
/// </remarks>
public byte MapId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the map selected for this lobby
+ /// </summary>
+ public MapTypes Map
+ {
+ get => (MapTypes)MapId;
+ set => MapId = (byte)value;
+ }
/// <summary>
/// Gets or sets the Player speed modifier.
-namespace Impostor.Api.Innersloth
+using System;
+
+namespace Impostor.Api.Innersloth
{
+ [Obsolete("Use Map property instead of MapId, and compare with MapTypes enum.")]
public static class MapId
{
- // TODO: Not sure if correct, check
public const int Skeld = 0;
public const int MiraHQ = 1;
public const int Polus = 2;
--- /dev/null
+namespace Impostor.Api.Innersloth
+{
+ public enum MapTypes
+ {
+ Skeld = 0,
+ MiraHQ = 1,
+ Polus = 2,
+ }
+}
\ No newline at end of file
public DoorsSystemType(IGame game)
{
// TODO: Check
- var doorCount = game.Options.MapId switch
+ var doorCount = game.Options.Map switch
{
- MapId.Skeld => 13,
- MapId.MiraHQ => 2,
- MapId.Polus => 12,
+ MapTypes.Skeld => 13,
+ MapTypes.MiraHQ => 2,
+ MapTypes.Polus => 12,
_ => throw new ArgumentOutOfRangeException()
};