Add arrivals (#14755)
* Arrivals * More arrivals and shitty uhh preload * cvar * a * clockin + maps * shitter prevention * Placement * a * cvar for tests and dev * weh
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Spawners.Components;
|
||||
using Content.Server.Station.Systems;
|
||||
using Robust.Shared.Random;
|
||||
@@ -20,6 +21,9 @@ public sealed class SpawnPointSystem : EntitySystem
|
||||
|
||||
private void OnSpawnPlayer(PlayerSpawningEvent args)
|
||||
{
|
||||
if (args.SpawnResult != null)
|
||||
return;
|
||||
|
||||
// TODO: Cache all this if it ends up important.
|
||||
var points = EntityQuery<SpawnPointComponent>().ToList();
|
||||
_random.Shuffle(points);
|
||||
@@ -37,9 +41,11 @@ public sealed class SpawnPointSystem : EntitySystem
|
||||
args.HumanoidCharacterProfile,
|
||||
args.Station);
|
||||
|
||||
EnsureComp<ClockedInComponent>(args.SpawnResult.Value);
|
||||
return;
|
||||
}
|
||||
else if (_gameTicker.RunLevel != GameRunLevel.InRound && spawnPoint.SpawnType == SpawnPointType.Job && (args.Job == null || spawnPoint.Job?.ID == args.Job.Prototype.ID))
|
||||
|
||||
if (_gameTicker.RunLevel != GameRunLevel.InRound && spawnPoint.SpawnType == SpawnPointType.Job && (args.Job == null || spawnPoint.Job?.ID == args.Job.Prototype.ID))
|
||||
{
|
||||
args.SpawnResult = _stationSpawning.SpawnPlayerMob(
|
||||
xform.Coordinates,
|
||||
@@ -47,6 +53,7 @@ public sealed class SpawnPointSystem : EntitySystem
|
||||
args.HumanoidCharacterProfile,
|
||||
args.Station);
|
||||
|
||||
EnsureComp<ClockedInComponent>(args.SpawnResult.Value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -62,6 +69,7 @@ public sealed class SpawnPointSystem : EntitySystem
|
||||
args.HumanoidCharacterProfile,
|
||||
args.Station);
|
||||
|
||||
EnsureComp<ClockedInComponent>(args.SpawnResult.Value);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user