From 4c84dba2f226d1c194c8d758909f12064bb6feb5 Mon Sep 17 00:00:00 2001 From: wrexbe <81056464+wrexbe@users.noreply.github.com> Date: Sun, 22 May 2022 20:31:39 -0700 Subject: [PATCH] Fix airlocks on some maps (#8363) * Fix airlocks on some maps * Make MapsLoadableTest say the map that failed --- .../Tests/PostMapInitTest.cs | 21 +++- .../Maps/Salvage/medium-crashed-shuttle.yml | 13 ++ Resources/Maps/nss_pillar.yml | 117 ++++++++++++++++++ Resources/Maps/pirate.yml | 39 ++++++ Resources/Maps/saltern.yml | 26 ++++ 5 files changed, 213 insertions(+), 3 deletions(-) diff --git a/Content.IntegrationTests/Tests/PostMapInitTest.cs b/Content.IntegrationTests/Tests/PostMapInitTest.cs index a4ff5306e7..7b53438f87 100644 --- a/Content.IntegrationTests/Tests/PostMapInitTest.cs +++ b/Content.IntegrationTests/Tests/PostMapInitTest.cs @@ -1,4 +1,5 @@ -using System.IO; +using System; +using System.IO; using System.Linq; using System.Threading.Tasks; using NUnit.Framework; @@ -87,8 +88,22 @@ namespace Content.IntegrationTests.Tests server.Post(() => { var mapId = mapManager.CreateMap(); - mapLoader.LoadMap(mapId, rootedPath.ToString()); - mapManager.DeleteMap(mapId); + try + { + mapLoader.LoadMap(mapId, rootedPath.ToString()); + } + catch (Exception ex) + { + throw new Exception($"Failed to load map {rootedPath}", ex); + } + try + { + mapManager.DeleteMap(mapId); + } + catch (Exception ex) + { + throw new Exception($"Failed to delete map {rootedPath}", ex); + } }); await server.WaitIdleAsync(); } diff --git a/Resources/Maps/Salvage/medium-crashed-shuttle.yml b/Resources/Maps/Salvage/medium-crashed-shuttle.yml index 4f65f3e540..e09c03a953 100644 --- a/Resources/Maps/Salvage/medium-crashed-shuttle.yml +++ b/Resources/Maps/Salvage/medium-crashed-shuttle.yml @@ -677,6 +677,19 @@ entities: parent: 0 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 diff --git a/Resources/Maps/nss_pillar.yml b/Resources/Maps/nss_pillar.yml index 4f1699794a..7a922e5be2 100644 --- a/Resources/Maps/nss_pillar.yml +++ b/Resources/Maps/nss_pillar.yml @@ -114392,6 +114392,19 @@ entities: parent: 131 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -114428,6 +114441,19 @@ entities: parent: 131 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -114604,6 +114630,19 @@ entities: state: Opening type: Door - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -114623,6 +114662,19 @@ entities: state: Opening type: Door - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -137288,6 +137340,19 @@ entities: state: Opening type: Door - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -137308,6 +137373,19 @@ entities: state: Opening type: Door - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -137321,6 +137399,19 @@ entities: parent: 12173 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -137334,6 +137425,19 @@ entities: parent: 12173 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -142172,6 +142276,19 @@ entities: parent: 131 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 diff --git a/Resources/Maps/pirate.yml b/Resources/Maps/pirate.yml index cf30bba5b0..b54235de09 100644 --- a/Resources/Maps/pirate.yml +++ b/Resources/Maps/pirate.yml @@ -1357,6 +1357,19 @@ entities: parent: 25 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -1618,6 +1631,19 @@ entities: parent: 25 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -3923,6 +3949,19 @@ entities: parent: 25 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 diff --git a/Resources/Maps/saltern.yml b/Resources/Maps/saltern.yml index 3818394550..7cc9bacabd 100644 --- a/Resources/Maps/saltern.yml +++ b/Resources/Maps/saltern.yml @@ -7074,6 +7074,19 @@ entities: parent: 852 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2 @@ -7131,6 +7144,19 @@ entities: parent: 852 type: Transform - fixtures: + - shape: !type:PolygonShape + vertices: + - 0.49,-0.49 + - 0.49,0.49 + - -0.49,0.49 + - -0.49,-0.49 + mask: + - Impassable + layer: + - Impassable + - ThrownItem + - Opaque + mass: 100 - shape: !type:PhysShapeCircle position: 0,-0.5 radius: 0.2