Client customization late-join spawner priority for arrivals/cryostorage (#24586)

* Initial commit, requires server restart to take effect

* Exposes callbacks directly instead, takes effect immediately

* Cleaned up control flow, swapped cvar for client customization

* Switched to int, dictionary of callbacks, migration

* Update Content.Shared/Preferences/SpawnPriorityPreference.cs

* krunkle stan

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Krunklehorn
2024-02-01 05:12:09 -05:00
committed by GitHub
parent d76121d470
commit ed0f2aa221
18 changed files with 3654 additions and 20 deletions

View File

@@ -1,5 +1,4 @@
using Content.Server.GameTicking;
using Content.Server.Shuttles.Systems;
using Content.Server.Spawners.Components;
using Content.Server.Station.Systems;
using Robust.Shared.Map;
@@ -16,10 +15,10 @@ public sealed class SpawnPointSystem : EntitySystem
public override void Initialize()
{
SubscribeLocalEvent<PlayerSpawningEvent>(OnSpawnPlayer, after: new[] { typeof(ContainerSpawnPointSystem), typeof(ArrivalsSystem) });
SubscribeLocalEvent<PlayerSpawningEvent>(OnPlayerSpawning);
}
private void OnSpawnPlayer(PlayerSpawningEvent args)
private void OnPlayerSpawning(PlayerSpawningEvent args)
{
if (args.SpawnResult != null)
return;