SS-28662 Add cvars to support forcing people to departures and making those at departures invincible (#28765)

* SS-28662 Add cvar to force spawn everyone at departures

This cvar means everyone must spawn at departures. This
could be handy for an admin event? But mostly it's so the
tutorial departures terminal can be seen by all newbies on
gateway servers.

* Small fix to ArrivalsSystem flow

* Remove incorrect todo

* Add godmode arrivals cvar
This commit is contained in:
Hannah Giovanna Dawson
2024-06-14 12:15:42 +01:00
committed by GitHub
parent e70131e5b4
commit 3b3163c4f4
3 changed files with 71 additions and 28 deletions

View File

@@ -65,7 +65,15 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
_spawnerCallbacks = new Dictionary<SpawnPriorityPreference, Action<PlayerSpawningEvent>>()
{
{ SpawnPriorityPreference.Arrivals, _arrivalsSystem.HandlePlayerSpawning },
{ SpawnPriorityPreference.Cryosleep, _containerSpawnPointSystem.HandlePlayerSpawning }
{
SpawnPriorityPreference.Cryosleep, ev =>
{
if (_arrivalsSystem.Forced)
_arrivalsSystem.HandlePlayerSpawning(ev);
else
_containerSpawnPointSystem.HandlePlayerSpawning(ev);
}
}
};
}
@@ -308,4 +316,4 @@ public sealed class PlayerSpawningEvent : EntityEventArgs
HumanoidCharacterProfile = humanoidCharacterProfile;
Station = station;
}
}
}