diff --git a/src/Impostor.Api/Events/Game/Player/IPlayerVentEvent.cs b/src/Impostor.Api/Events/Game/Player/IPlayerVentEvent.cs
index 81f178bc7..b1d6d8bd2 100644
--- a/src/Impostor.Api/Events/Game/Player/IPlayerVentEvent.cs
+++ b/src/Impostor.Api/Events/Game/Player/IPlayerVentEvent.cs
@@ -7,7 +7,7 @@ public interface IPlayerVentEvent : IPlayerEvent
///
/// Gets get the id of the used vent.
///
- public VentLocation VentId { get; }
+ public Vent Vent { get; }
///
/// Gets a value indicating whether the vent was entered or exited.
diff --git a/src/Impostor.Api/Innersloth/Maps/AirshipData.cs b/src/Impostor.Api/Innersloth/Maps/AirshipData.cs
new file mode 100644
index 000000000..04657d00d
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/AirshipData.cs
@@ -0,0 +1,49 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using Impostor.Api.Innersloth.Maps.Vents;
+
+namespace Impostor.Api.Innersloth.Maps
+{
+ public class AirshipData : MapData
+ {
+ public AirshipData()
+ {
+ Vents = new[]
+ {
+ new AirshipVent(AirshipVent.Ids.Vault, new Vector2(-12.6322f, 8.4735f)),
+ new AirshipVent(AirshipVent.Ids.Cockpit, new Vector2(-22.099f, -1.512f)),
+ new AirshipVent(AirshipVent.Ids.ViewingDeck, new Vector2(-15.659f, -11.6991f)),
+ new AirshipVent(AirshipVent.Ids.EngineRoom, new Vector2(0.203f, -2.5361f)),
+ new AirshipVent(AirshipVent.Ids.Kitchen, new Vector2(-2.6019f, -9.338f)),
+ new AirshipVent(AirshipVent.Ids.MainHallBottom, new Vector2(7.021f, -3.730999f)),
+ new AirshipVent(AirshipVent.Ids.GapRight, new Vector2(9.814f, 3.206f)),
+ new AirshipVent(AirshipVent.Ids.GapLeft, new Vector2(12.663f, 5.922f)),
+ new AirshipVent(AirshipVent.Ids.MainHallTop, new Vector2(3.605f, 6.923f)),
+ new AirshipVent(AirshipVent.Ids.Showers, new Vector2(23.9869f, -1.386f)),
+ new AirshipVent(AirshipVent.Ids.Records, new Vector2(23.2799f, 8.259998f)),
+ new AirshipVent(AirshipVent.Ids.CargoBay, new Vector2(30.4409f, -3.577f)),
+ }.ToDictionary(x => x.Id, x => (Vent)x);
+
+ ConnectVents(AirshipVent.Ids.Vault, left: AirshipVent.Ids.Cockpit);
+ ConnectVents(AirshipVent.Ids.Cockpit, left: AirshipVent.Ids.Vault, right: AirshipVent.Ids.ViewingDeck);
+ ConnectVents(AirshipVent.Ids.ViewingDeck, left: AirshipVent.Ids.Cockpit);
+ ConnectVents(AirshipVent.Ids.EngineRoom, left: AirshipVent.Ids.Kitchen, right: AirshipVent.Ids.MainHallBottom);
+ ConnectVents(AirshipVent.Ids.Kitchen, left: AirshipVent.Ids.EngineRoom, right: AirshipVent.Ids.MainHallBottom);
+ ConnectVents(AirshipVent.Ids.MainHallBottom, left: AirshipVent.Ids.EngineRoom, right: AirshipVent.Ids.Kitchen);
+ ConnectVents(AirshipVent.Ids.GapRight, left: AirshipVent.Ids.MainHallTop, right: AirshipVent.Ids.GapLeft);
+ ConnectVents(AirshipVent.Ids.GapLeft, left: AirshipVent.Ids.MainHallTop, right: AirshipVent.Ids.GapRight);
+ ConnectVents(AirshipVent.Ids.MainHallTop, left: AirshipVent.Ids.GapLeft, right: AirshipVent.Ids.GapRight);
+ ConnectVents(AirshipVent.Ids.Showers, left: AirshipVent.Ids.Records, right: AirshipVent.Ids.CargoBay);
+ ConnectVents(AirshipVent.Ids.Records, left: AirshipVent.Ids.Showers, right: AirshipVent.Ids.CargoBay);
+ ConnectVents(AirshipVent.Ids.CargoBay, left: AirshipVent.Ids.Showers, right: AirshipVent.Ids.Records);
+ }
+
+ public override IReadOnlyDictionary Vents { get; }
+
+ private void ConnectVents(AirshipVent.Ids vent, AirshipVent.Ids? left = null, AirshipVent.Ids? center = null, AirshipVent.Ids? right = null)
+ {
+ ConnectVents((int)vent, (int?)left, (int?)center, (int?)right);
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/MapData.cs b/src/Impostor.Api/Innersloth/Maps/MapData.cs
new file mode 100644
index 000000000..53428f59a
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/MapData.cs
@@ -0,0 +1,24 @@
+using System.Collections.Generic;
+
+namespace Impostor.Api.Innersloth.Maps
+{
+ public abstract class MapData
+ {
+ public static IReadOnlyDictionary Maps { get; } = new Dictionary
+ {
+ [MapTypes.Skeld] = new SkeldData(),
+ [MapTypes.MiraHQ] = new MiraData(),
+ [MapTypes.Polus] = new PolusData(),
+ [MapTypes.Airship] = new AirshipData(),
+ };
+
+ public abstract IReadOnlyDictionary Vents { get; }
+
+ protected void ConnectVents(int vent, int? left = null, int? center = null, int? right = null)
+ {
+ Vents[vent].Left = left != null ? Vents[left.Value] : null;
+ Vents[vent].Center = center != null ? Vents[center.Value] : null;
+ Vents[vent].Right = right != null ? Vents[right.Value] : null;
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/MiraData.cs b/src/Impostor.Api/Innersloth/Maps/MiraData.cs
new file mode 100644
index 000000000..41f2c61fe
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/MiraData.cs
@@ -0,0 +1,47 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using Impostor.Api.Innersloth.Maps.Vents;
+
+namespace Impostor.Api.Innersloth.Maps
+{
+ public class MiraData : MapData
+ {
+ public MiraData()
+ {
+ Vents = new[]
+ {
+ new MiraVent(MiraVent.Ids.Balcony, new Vector2(23.77f, -1.94f)),
+ new MiraVent(MiraVent.Ids.Cafeteria, new Vector2(23.9f, 7.18f)),
+ new MiraVent(MiraVent.Ids.Reactor, new Vector2(0.4800001f, 10.697f)),
+ new MiraVent(MiraVent.Ids.Laboratory, new Vector2(11.606f, 13.816f)),
+ new MiraVent(MiraVent.Ids.Office, new Vector2(13.28f, 20.13f)),
+ new MiraVent(MiraVent.Ids.Admin, new Vector2(22.39f, 17.23f)),
+ new MiraVent(MiraVent.Ids.Greenhouse, new Vector2(17.85f, 25.23f)),
+ new MiraVent(MiraVent.Ids.Medbay, new Vector2(15.41f, -1.82f)),
+ new MiraVent(MiraVent.Ids.Decontamination, new Vector2(6.83f, 3.145f)),
+ new MiraVent(MiraVent.Ids.LockerRoom, new Vector2(4.29f, 0.5299997f)),
+ new MiraVent(MiraVent.Ids.Launchpad, new Vector2(-6.18f, 3.56f)),
+ }.ToDictionary(x => x.Id, x => (Vent)x);
+
+ ConnectVents(MiraVent.Ids.Balcony, left: MiraVent.Ids.Medbay, right: MiraVent.Ids.Cafeteria);
+ ConnectVents(MiraVent.Ids.Cafeteria, left: MiraVent.Ids.Admin, right: MiraVent.Ids.Balcony);
+ ConnectVents(MiraVent.Ids.Reactor, left: MiraVent.Ids.Laboratory, center: MiraVent.Ids.Decontamination, right: MiraVent.Ids.Launchpad);
+ ConnectVents(MiraVent.Ids.Laboratory, left: MiraVent.Ids.Reactor, center: MiraVent.Ids.Decontamination, right: MiraVent.Ids.Office);
+ ConnectVents(MiraVent.Ids.Office, left: MiraVent.Ids.Laboratory, center: MiraVent.Ids.Admin, right: MiraVent.Ids.Greenhouse);
+ ConnectVents(MiraVent.Ids.Admin, left: MiraVent.Ids.Greenhouse, center: MiraVent.Ids.Cafeteria, right: MiraVent.Ids.Office);
+ ConnectVents(MiraVent.Ids.Greenhouse, left: MiraVent.Ids.Admin, right: MiraVent.Ids.Office);
+ ConnectVents(MiraVent.Ids.Medbay, left: MiraVent.Ids.Balcony, right: MiraVent.Ids.LockerRoom);
+ ConnectVents(MiraVent.Ids.Decontamination, left: MiraVent.Ids.Reactor, center: MiraVent.Ids.LockerRoom, right: MiraVent.Ids.Laboratory);
+ ConnectVents(MiraVent.Ids.LockerRoom, left: MiraVent.Ids.Medbay, center: MiraVent.Ids.Launchpad, right: MiraVent.Ids.Decontamination);
+ ConnectVents(MiraVent.Ids.Launchpad, left: MiraVent.Ids.Reactor, right: MiraVent.Ids.LockerRoom);
+ }
+
+ public override IReadOnlyDictionary Vents { get; }
+
+ private void ConnectVents(MiraVent.Ids vent, MiraVent.Ids? left = null, MiraVent.Ids? center = null, MiraVent.Ids? right = null)
+ {
+ ConnectVents((int)vent, (int?)left, (int?)center, (int?)right);
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/PolusData.cs b/src/Impostor.Api/Innersloth/Maps/PolusData.cs
new file mode 100644
index 000000000..5748d26f1
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/PolusData.cs
@@ -0,0 +1,49 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using Impostor.Api.Innersloth.Maps.Vents;
+
+namespace Impostor.Api.Innersloth.Maps
+{
+ public class PolusData : MapData
+ {
+ public PolusData()
+ {
+ Vents = new[]
+ {
+ new PolusVent(PolusVent.Ids.Security, new Vector2(1.929f, -9.558001f)),
+ new PolusVent(PolusVent.Ids.Electrical, new Vector2(6.9f, -14.41f)),
+ new PolusVent(PolusVent.Ids.O2, new Vector2(3.51f, -16.58f)),
+ new PolusVent(PolusVent.Ids.Communications, new Vector2(12.304f, -18.898f)),
+ new PolusVent(PolusVent.Ids.Office, new Vector2(16.379f, -19.599f)),
+ new PolusVent(PolusVent.Ids.Admin, new Vector2(20.089f, -25.517f)),
+ new PolusVent(PolusVent.Ids.Laboratory, new Vector2(32.963f, -9.526f)),
+ new PolusVent(PolusVent.Ids.Lava, new Vector2(30.907f, -11.86f)),
+ new PolusVent(PolusVent.Ids.Storage, new Vector2(22f, -12.19f)),
+ new PolusVent(PolusVent.Ids.RightStabilizer, new Vector2(24.02f, -8.39f)),
+ new PolusVent(PolusVent.Ids.LeftStabilizer, new Vector2(9.64f, -7.72f)),
+ new PolusVent(PolusVent.Ids.OutsideAdmin, new Vector2(18.93f, -24.85f)),
+ }.ToDictionary(x => x.Id, x => (Vent)x);
+
+ ConnectVents(PolusVent.Ids.Security, left: PolusVent.Ids.O2, right: PolusVent.Ids.Electrical);
+ ConnectVents(PolusVent.Ids.Electrical, left: PolusVent.Ids.O2, right: PolusVent.Ids.Security);
+ ConnectVents(PolusVent.Ids.O2, left: PolusVent.Ids.Electrical, right: PolusVent.Ids.Security);
+ ConnectVents(PolusVent.Ids.Communications, left: PolusVent.Ids.Storage, right: PolusVent.Ids.Office);
+ ConnectVents(PolusVent.Ids.Office, left: PolusVent.Ids.Communications, right: PolusVent.Ids.Storage);
+ ConnectVents(PolusVent.Ids.Admin, left: PolusVent.Ids.OutsideAdmin, right: PolusVent.Ids.Lava);
+ ConnectVents(PolusVent.Ids.Laboratory, right: PolusVent.Ids.Lava);
+ ConnectVents(PolusVent.Ids.Lava, left: PolusVent.Ids.Laboratory, right: PolusVent.Ids.Admin);
+ ConnectVents(PolusVent.Ids.Storage, left: PolusVent.Ids.Communications, right: PolusVent.Ids.Office);
+ ConnectVents(PolusVent.Ids.RightStabilizer, left: PolusVent.Ids.LeftStabilizer);
+ ConnectVents(PolusVent.Ids.LeftStabilizer, left: PolusVent.Ids.RightStabilizer);
+ ConnectVents(PolusVent.Ids.OutsideAdmin, right: PolusVent.Ids.Admin);
+ }
+
+ public override IReadOnlyDictionary Vents { get; }
+
+ private void ConnectVents(PolusVent.Ids vent, PolusVent.Ids? left = null, PolusVent.Ids? center = null, PolusVent.Ids? right = null)
+ {
+ ConnectVents((int)vent, (int?)left, (int?)center, (int?)right);
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/SkeldData.cs b/src/Impostor.Api/Innersloth/Maps/SkeldData.cs
new file mode 100644
index 000000000..b0bb95d95
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/SkeldData.cs
@@ -0,0 +1,53 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using Impostor.Api.Innersloth.Maps.Vents;
+
+namespace Impostor.Api.Innersloth.Maps
+{
+ public class SkeldData : MapData
+ {
+ public SkeldData()
+ {
+ Vents = new[]
+ {
+ new SkeldVent(SkeldVent.Ids.Admin, new Vector2(2.544f, -9.955201f)),
+ new SkeldVent(SkeldVent.Ids.RightHallway, new Vector2(9.384f, -6.438f)),
+ new SkeldVent(SkeldVent.Ids.Cafeteria, new Vector2(4.2588f, -0.276f)),
+ new SkeldVent(SkeldVent.Ids.Electrical, new Vector2(-9.7764f, -8.034f)),
+ new SkeldVent(SkeldVent.Ids.UpperEngine, new Vector2(-15.288f, 2.52f)),
+ new SkeldVent(SkeldVent.Ids.Security, new Vector2(-12.534f, -6.9492f)),
+ new SkeldVent(SkeldVent.Ids.Medbay, new Vector2(-10.608f, -4.176f)),
+ new SkeldVent(SkeldVent.Ids.Weapons, new Vector2(8.820001f, 3.324f)),
+ new SkeldVent(SkeldVent.Ids.LowerReactor, new Vector2(-20.796f, -6.9528f)),
+ new SkeldVent(SkeldVent.Ids.LowerEngine, new Vector2(-15.2508f, -13.656f)),
+ new SkeldVent(SkeldVent.Ids.Shields, new Vector2(9.5232f, -14.3376f)),
+ new SkeldVent(SkeldVent.Ids.UpperReactor, new Vector2(-21.876f, -3.0516f)),
+ new SkeldVent(SkeldVent.Ids.UpperNavigation, new Vector2(16.008f, -3.168f)),
+ new SkeldVent(SkeldVent.Ids.LowerNavigation, new Vector2(16.008f, -6.384f)),
+ }.ToDictionary(x => x.Id, x => (Vent)x);
+
+ ConnectVents(SkeldVent.Ids.Admin, left: SkeldVent.Ids.Cafeteria, right: SkeldVent.Ids.RightHallway);
+ ConnectVents(SkeldVent.Ids.RightHallway, left: SkeldVent.Ids.Admin, right: SkeldVent.Ids.Cafeteria);
+ ConnectVents(SkeldVent.Ids.Cafeteria, left: SkeldVent.Ids.Admin, right: SkeldVent.Ids.RightHallway);
+ ConnectVents(SkeldVent.Ids.Electrical, left: SkeldVent.Ids.Security, right: SkeldVent.Ids.Medbay);
+ ConnectVents(SkeldVent.Ids.UpperEngine, left: SkeldVent.Ids.UpperReactor);
+ ConnectVents(SkeldVent.Ids.Security, left: SkeldVent.Ids.Medbay, right: SkeldVent.Ids.Electrical);
+ ConnectVents(SkeldVent.Ids.Medbay, left: SkeldVent.Ids.Security, right: SkeldVent.Ids.Electrical);
+ ConnectVents(SkeldVent.Ids.Weapons, right: SkeldVent.Ids.UpperNavigation);
+ ConnectVents(SkeldVent.Ids.LowerReactor, left: SkeldVent.Ids.LowerEngine);
+ ConnectVents(SkeldVent.Ids.LowerEngine, left: SkeldVent.Ids.LowerReactor);
+ ConnectVents(SkeldVent.Ids.Shields, left: SkeldVent.Ids.LowerNavigation);
+ ConnectVents(SkeldVent.Ids.UpperReactor, left: SkeldVent.Ids.UpperEngine);
+ ConnectVents(SkeldVent.Ids.UpperNavigation, right: SkeldVent.Ids.Weapons);
+ ConnectVents(SkeldVent.Ids.LowerNavigation, right: SkeldVent.Ids.Shields);
+ }
+
+ public override IReadOnlyDictionary Vents { get; }
+
+ private void ConnectVents(SkeldVent.Ids vent, SkeldVent.Ids? left = null, SkeldVent.Ids? center = null, SkeldVent.Ids? right = null)
+ {
+ ConnectVents((int)vent, (int?)left, (int?)center, (int?)right);
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/Vents/AirshipVent.cs b/src/Impostor.Api/Innersloth/Maps/Vents/AirshipVent.cs
new file mode 100644
index 000000000..7605504c8
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/Vents/AirshipVent.cs
@@ -0,0 +1,27 @@
+using System.Numerics;
+
+namespace Impostor.Api.Innersloth.Maps.Vents
+{
+ public class AirshipVent : Vent
+ {
+ internal AirshipVent(Ids id, Vector2 position) : base((int)id, id.ToString(), position)
+ {
+ }
+
+ public enum Ids
+ {
+ Vault = 0,
+ Cockpit = 1,
+ ViewingDeck = 2,
+ EngineRoom = 3,
+ Kitchen = 4,
+ MainHallBottom = 5,
+ GapRight = 6,
+ GapLeft = 7,
+ MainHallTop = 8,
+ Showers = 9,
+ Records = 10,
+ CargoBay = 11,
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/Vents/MiraVent.cs b/src/Impostor.Api/Innersloth/Maps/Vents/MiraVent.cs
new file mode 100644
index 000000000..775401a35
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/Vents/MiraVent.cs
@@ -0,0 +1,26 @@
+using System.Numerics;
+
+namespace Impostor.Api.Innersloth.Maps.Vents
+{
+ public class MiraVent : Vent
+ {
+ internal MiraVent(Ids id, Vector2 position) : base((int)id, id.ToString(), position)
+ {
+ }
+
+ public enum Ids
+ {
+ Balcony = 1,
+ Cafeteria = 2,
+ Reactor = 3,
+ Laboratory = 4,
+ Office = 5,
+ Admin = 6,
+ Greenhouse = 7,
+ Medbay = 8,
+ Decontamination = 9,
+ LockerRoom = 10,
+ Launchpad = 11,
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/Vents/PolusVent.cs b/src/Impostor.Api/Innersloth/Maps/Vents/PolusVent.cs
new file mode 100644
index 000000000..8310af07b
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/Vents/PolusVent.cs
@@ -0,0 +1,27 @@
+using System.Numerics;
+
+namespace Impostor.Api.Innersloth.Maps.Vents
+{
+ public class PolusVent : Vent
+ {
+ internal PolusVent(Ids id, Vector2 position) : base((int)id, id.ToString(), position)
+ {
+ }
+
+ public enum Ids
+ {
+ Security = 0,
+ Electrical = 1,
+ O2 = 2,
+ Communications = 3,
+ Office = 4,
+ Admin = 5,
+ Laboratory = 6,
+ Lava = 7,
+ Storage = 8,
+ RightStabilizer = 9,
+ LeftStabilizer = 10,
+ OutsideAdmin = 11,
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Maps/Vents/SkeldVent.cs b/src/Impostor.Api/Innersloth/Maps/Vents/SkeldVent.cs
new file mode 100644
index 000000000..e670a8d3d
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Maps/Vents/SkeldVent.cs
@@ -0,0 +1,29 @@
+using System.Numerics;
+
+namespace Impostor.Api.Innersloth.Maps.Vents
+{
+ public class SkeldVent : Vent
+ {
+ internal SkeldVent(Ids id, Vector2 position) : base((int)id, id.ToString(), position)
+ {
+ }
+
+ public enum Ids
+ {
+ Admin = 0,
+ RightHallway = 1,
+ Cafeteria = 2,
+ Electrical = 3,
+ UpperEngine = 4,
+ Security = 5,
+ Medbay = 6,
+ Weapons = 7,
+ LowerReactor = 8,
+ LowerEngine = 9,
+ Shields = 10,
+ UpperReactor = 11,
+ UpperNavigation = 12,
+ LowerNavigation = 13,
+ }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/Vent.cs b/src/Impostor.Api/Innersloth/Vent.cs
new file mode 100644
index 000000000..723207b28
--- /dev/null
+++ b/src/Impostor.Api/Innersloth/Vent.cs
@@ -0,0 +1,26 @@
+using System.Numerics;
+
+namespace Impostor.Api.Innersloth
+{
+ public abstract class Vent
+ {
+ internal Vent(int id, string name, Vector2 position)
+ {
+ Id = id;
+ Name = name;
+ Position = position;
+ }
+
+ public int Id { get; }
+
+ public string Name { get; }
+
+ public Vector2 Position { get; }
+
+ public Vent? Left { get; internal set; }
+
+ public Vent? Center { get; internal set; }
+
+ public Vent? Right { get; internal set; }
+ }
+}
diff --git a/src/Impostor.Api/Innersloth/VentLocation.cs b/src/Impostor.Api/Innersloth/VentLocation.cs
deleted file mode 100644
index 0092c6960..000000000
--- a/src/Impostor.Api/Innersloth/VentLocation.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-namespace Impostor.Api.Innersloth
-{
- public enum VentLocation : uint
- {
- // Skeld
- SkeldAdmin = 0,
- SkeldRightHallway = 1,
- SkeldCafeteria = 2,
- SkeldElectrical = 3,
- SkeldUpperEngine = 4,
- SkeldSecurity = 5,
- SkeldMedbay = 6,
- SkeldWeapons = 7,
- SkeldLowerReactor = 8,
- SkeldLowerEngine = 9,
- SkeldShields = 10,
- SkeldUpperReactor = 11,
- SkeldUpperNavigation = 12,
- SkeldLowerNavigation = 13,
-
- // Mira HQ
- MiraBalcony = 1,
- MiraCafeteria = 2,
- MiraReactor = 3,
- MiraLaboratory = 4,
- MiraOffice = 5,
- MiraAdmin = 6,
- MiraGreenhouse = 7,
- MiraMedbay = 8,
- MiraDecontamination = 9,
- MiraLockerRoom = 10,
- MiraLaunchpad = 11,
-
- // Polus
- PolusSecurity = 0,
- PolusElectrical = 1,
- PolusO2 = 2,
- PolusCommunications = 3,
- PolusOffice = 4,
- PolusAdmin = 5,
- PolusLaboratory = 6,
- PolusLava = 7,
- PolusStorage = 8,
- PolusRightStabilizer = 9,
- PolusLeftStabilizer = 10,
- PolusOutsideAdmin = 11,
-
- // Airship
- AirshipVault = 0,
- AirshipCockpit = 1,
- AirshipViewingDeck = 2,
- AirshipEngineRoom = 3,
- AirshipKitchen = 4,
- AirshipMainHallBottom = 5,
- AirshipGapRight = 6,
- AirshipGapLeft = 7,
- AirshipMainHallTop = 8,
- AirshipShowers = 9,
- AirshipRecords = 10,
- AirshipCargoBay = 11,
- }
-}
diff --git a/src/Impostor.Server/Events/Game/Player/PlayerVentEvent.cs b/src/Impostor.Server/Events/Game/Player/PlayerVentEvent.cs
index 0798d40b9..e64cec0d9 100644
--- a/src/Impostor.Server/Events/Game/Player/PlayerVentEvent.cs
+++ b/src/Impostor.Server/Events/Game/Player/PlayerVentEvent.cs
@@ -8,12 +8,12 @@ namespace Impostor.Server.Events.Player
{
public class PlayerVentEvent : IPlayerVentEvent
{
- public PlayerVentEvent(IGame game, IClientPlayer sender, IInnerPlayerControl innerPlayerPhysics, VentLocation ventId, bool ventEnter)
+ public PlayerVentEvent(IGame game, IClientPlayer sender, IInnerPlayerControl innerPlayerPhysics, Vent vent, bool ventEnter)
{
Game = game;
ClientPlayer = sender;
PlayerControl = innerPlayerPhysics;
- VentId = ventId;
+ Vent = vent;
VentEnter = ventEnter;
}
@@ -23,7 +23,7 @@ public PlayerVentEvent(IGame game, IClientPlayer sender, IInnerPlayerControl inn
public IInnerPlayerControl PlayerControl { get; }
- public VentLocation VentId { get; }
+ public Vent Vent { get; }
public bool VentEnter { get; }
}
diff --git a/src/Impostor.Server/Net/Inner/Objects/Components/InnerPlayerPhysics.cs b/src/Impostor.Server/Net/Inner/Objects/Components/InnerPlayerPhysics.cs
index 0f20750c6..b51c97a50 100644
--- a/src/Impostor.Server/Net/Inner/Objects/Components/InnerPlayerPhysics.cs
+++ b/src/Impostor.Server/Net/Inner/Objects/Components/InnerPlayerPhysics.cs
@@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Impostor.Api.Events.Managers;
using Impostor.Api.Innersloth;
+using Impostor.Api.Innersloth.Maps;
using Impostor.Api.Net;
using Impostor.Api.Net.Inner;
using Impostor.Api.Net.Messages;
@@ -65,7 +66,7 @@ public override async ValueTask HandleRpcAsync(ClientPlayer sender, Client
throw new ArgumentOutOfRangeException(nameof(call), call, null);
}
- await _eventManager.CallAsync(new PlayerVentEvent(Game, sender, _playerControl, (VentLocation)ventId, call == RpcCalls.EnterVent));
+ await _eventManager.CallAsync(new PlayerVentEvent(Game, sender, _playerControl, Game.GameNet.ShipStatus!.Data.Vents[ventId], call == RpcCalls.EnterVent));
break;
case RpcCalls.ClimbLadder:
diff --git a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerAirshipStatus.cs b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerAirshipStatus.cs
index 7f8562809..84861b1a4 100644
--- a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerAirshipStatus.cs
+++ b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerAirshipStatus.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Numerics;
using Impostor.Api.Innersloth;
+using Impostor.Api.Innersloth.Maps;
using Impostor.Api.Net.Inner.Objects.ShipStatus;
using Impostor.Server.Net.Inner.Objects.Systems;
using Impostor.Server.Net.Inner.Objects.Systems.ShipStatus;
@@ -15,6 +16,8 @@ public InnerAirshipStatus(Game game) : base(game)
{
}
+ public override MapData Data => MapData.Maps[MapTypes.Airship];
+
public override Dictionary Doors { get; } = new Dictionary(21);
public override float SpawnRadius => throw new NotSupportedException();
diff --git a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerMiraShipStatus.cs b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerMiraShipStatus.cs
index 02daf3160..143c98f77 100644
--- a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerMiraShipStatus.cs
+++ b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerMiraShipStatus.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Numerics;
using Impostor.Api.Innersloth;
+using Impostor.Api.Innersloth.Maps;
using Impostor.Api.Net.Inner.Objects.ShipStatus;
using Impostor.Server.Net.Inner.Objects.Systems;
using Impostor.Server.Net.Inner.Objects.Systems.ShipStatus;
@@ -14,6 +15,8 @@ public InnerMiraShipStatus(Game game) : base(game)
{
}
+ public override MapData Data => MapData.Maps[MapTypes.MiraHQ];
+
public override Dictionary Doors { get; } = new Dictionary(0);
public override float SpawnRadius => 1.55f;
diff --git a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerPolusShipStatus.cs b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerPolusShipStatus.cs
index 262b313b8..7301bc44c 100644
--- a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerPolusShipStatus.cs
+++ b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerPolusShipStatus.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Numerics;
using Impostor.Api.Innersloth;
+using Impostor.Api.Innersloth.Maps;
using Impostor.Api.Net.Inner.Objects.ShipStatus;
using Impostor.Server.Net.Inner.Objects.Systems;
using Impostor.Server.Net.Inner.Objects.Systems.ShipStatus;
@@ -14,6 +15,8 @@ public InnerPolusShipStatus(Game game) : base(game)
{
}
+ public override MapData Data => MapData.Maps[MapTypes.Polus];
+
public override Dictionary Doors { get; } = new Dictionary(12);
public override float SpawnRadius => 1f;
diff --git a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerShipStatus.cs b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerShipStatus.cs
index dcfa24f08..0f7a4edd8 100644
--- a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerShipStatus.cs
+++ b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerShipStatus.cs
@@ -5,6 +5,7 @@
using System.Threading.Tasks;
using Impostor.Api;
using Impostor.Api.Innersloth;
+using Impostor.Api.Innersloth.Maps;
using Impostor.Api.Net;
using Impostor.Api.Net.Inner;
using Impostor.Api.Net.Inner.Objects.ShipStatus;
@@ -25,6 +26,8 @@ protected InnerShipStatus(Game game) : base(game)
Components.Add(this);
}
+ public abstract MapData Data { get; }
+
public abstract Dictionary Doors { get; }
public abstract float SpawnRadius { get; }
diff --git a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerSkeldShipStatus.cs b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerSkeldShipStatus.cs
index 9580b7be4..6d04f5bb2 100644
--- a/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerSkeldShipStatus.cs
+++ b/src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerSkeldShipStatus.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Numerics;
using Impostor.Api.Innersloth;
+using Impostor.Api.Innersloth.Maps;
using Impostor.Api.Net.Inner.Objects.ShipStatus;
using Impostor.Server.Net.Inner.Objects.Systems;
using Impostor.Server.Net.Inner.Objects.Systems.ShipStatus;
@@ -14,6 +15,8 @@ public InnerSkeldShipStatus(Game game) : base(game)
{
}
+ public override MapData Data { get; } = MapData.Maps[MapTypes.Skeld];
+
public override Dictionary Doors { get; } = new Dictionary(13);
public override float SpawnRadius => 1.6f;