Allow stations to specify their own custom emergency shuttles. (#12747)
* Allow individual stations to specify a custom emergency shuttle. * Use better assert message.
This commit is contained in:
@@ -221,9 +221,10 @@ namespace Content.IntegrationTests.Tests
|
||||
// Test shuttle can dock.
|
||||
// This is done inside gamemap test because loading the map takes ages and we already have it.
|
||||
var station = entManager.GetComponent<StationMemberComponent>(targetGrid!.Value).Station;
|
||||
var shuttlePath = entManager.GetComponent<StationDataComponent>(station).EmergencyShuttlePath
|
||||
.ToString();
|
||||
var shuttle = mapLoader.LoadGrid(shuttleMap, entManager.GetComponent<StationDataComponent>(station).EmergencyShuttlePath.ToString());
|
||||
var stationConfig = entManager.GetComponent<StationDataComponent>(station).StationConfig;
|
||||
Assert.IsNotNull(stationConfig, $"{entManager.ToPrettyString(station)} had null StationConfig.");
|
||||
var shuttlePath = stationConfig.EmergencyShuttlePath.ToString();
|
||||
var shuttle = mapLoader.LoadGrid(shuttleMap, shuttlePath);
|
||||
Assert.That(shuttle != null && shuttleSystem.TryFTLDock(entManager.GetComponent<ShuttleComponent>(shuttle.Value), targetGrid.Value), $"Unable to dock {shuttlePath} to {mapProto}");
|
||||
|
||||
mapManager.DeleteMap(shuttleMap);
|
||||
|
||||
Reference in New Issue
Block a user