Get test map (#8987)

This commit is contained in:
wrexbe
2022-06-21 07:44:19 -07:00
committed by GitHub
parent 9c5e6e6d7e
commit bee053a38c
18 changed files with 106 additions and 87 deletions

View File

@@ -210,6 +210,12 @@ namespace Content.Server.StationEvents.Events
entityManager.EntitySysManager.Resolve(ref stationSystem);
targetCoords = EntityCoordinates.Invalid;
if (stationSystem.Stations.Count == 0)
{
targetStation = EntityUid.Invalid;
targetGrid = EntityUid.Invalid;
return false;
}
targetStation = robustRandom.Pick(stationSystem.Stations);
var possibleTargets = entityManager.GetComponent<StationDataComponent>(targetStation).Grids;
if (possibleTargets.Count == 0)