Skip to content

Commit

Permalink
No valid arrival points found! (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 authored Jun 13, 2024
1 parent 3450799 commit 8d26cdd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Content.Server/Shuttles/Systems/ArrivalsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ public List<EntityCoordinates> GetArrivalsSpawnPoints()
public EntityUid? SpawnPlayersOnArrivals(EntityUid? station, JobComponent? job, HumanoidCharacterProfile? profile)
{
var possiblePositions = GetArrivalsSpawnPoints();

if (possiblePositions == null || possiblePositions.Count == 0)
{
Logger.Error("No valid arrival points found!");
return null;
}


var spawnLoc = _random.Pick(possiblePositions);

Expand Down

0 comments on commit 8d26cdd

Please sign in to comment.