Extended access system (#8469)

* Extended access system

Allows jobs to specify "extended" access levels, which will be granted if the round-start crew count is below a certain threshold.

* Extended accesses for jobs

* Spook
This commit is contained in:
Pieter-Jan Briers
2022-05-27 06:01:07 +02:00
committed by GitHub
parent c5982e0b10
commit a4685bab4c
15 changed files with 182 additions and 18 deletions

View File

@@ -31,14 +31,22 @@ public sealed class SpawnPointSystem : EntitySystem
if (_gameTicker.RunLevel == GameRunLevel.InRound && spawnPoint.SpawnType == SpawnPointType.LateJoin)
{
args.SpawnResult = _stationSpawning.SpawnPlayerMob(xform.Coordinates, args.Job,
args.HumanoidCharacterProfile);
args.SpawnResult = _stationSpawning.SpawnPlayerMob(
xform.Coordinates,
args.Job,
args.HumanoidCharacterProfile,
args.Station);
return;
}
else 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, args.Job,
args.HumanoidCharacterProfile);
args.SpawnResult = _stationSpawning.SpawnPlayerMob(
xform.Coordinates,
args.Job,
args.HumanoidCharacterProfile,
args.Station);
return;
}
}
@@ -48,7 +56,12 @@ public sealed class SpawnPointSystem : EntitySystem
foreach (var spawnPoint in points)
{
var xform = Transform(spawnPoint.Owner);
args.SpawnResult = _stationSpawning.SpawnPlayerMob(xform.Coordinates, args.Job, args.HumanoidCharacterProfile);
args.SpawnResult = _stationSpawning.SpawnPlayerMob(
xform.Coordinates,
args.Job,
args.HumanoidCharacterProfile,
args.Station);
return;
}