fix spawning on expedition ship
This commit is contained in:
@@ -68,6 +68,8 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
|
||||
_spawnerCallbacks = new Dictionary<SpawnPriorityPreference, Action<PlayerSpawningEvent>>()
|
||||
{
|
||||
{ SpawnPriorityPreference.Arrivals, _CP14expedition.HandlePlayerSpawning }, //CP14 expedition system replaced
|
||||
{ SpawnPriorityPreference.Cryosleep, _CP14expedition.HandlePlayerSpawning }, //CP14 expedition system replaced
|
||||
/*
|
||||
{
|
||||
SpawnPriorityPreference.Cryosleep, ev =>
|
||||
{
|
||||
@@ -76,7 +78,7 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
|
||||
else
|
||||
_containerSpawnPointSystem.HandlePlayerSpawning(ev);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public sealed class CP14ExpeditionSystem : EntitySystem
|
||||
|
||||
SubscribeLocalEvent<CP14StationExpeditionTargetComponent, StationPostInitEvent>(OnPostInitSetupExpeditionShip);
|
||||
|
||||
SubscribeLocalEvent<CP14StationExpeditionTargetComponent, FTLCompletedEvent>(OnArrivalsDocked);
|
||||
SubscribeLocalEvent<CP14StationExpeditionTargetComponent, FTLCompletedEvent>(OnExpeditionShipLanded);
|
||||
|
||||
ArrivalTime = _cfgManager.GetCVar(CCVars.CP14ExpeditionArrivalTime);
|
||||
_cfgManager.OnValueChanged(CCVars.CP14ExpeditionArrivalTime, time => ArrivalTime = time, true);
|
||||
@@ -76,7 +76,7 @@ public sealed class CP14ExpeditionSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnArrivalsDocked(Entity<CP14StationExpeditionTargetComponent> ent, ref FTLCompletedEvent args)
|
||||
private void OnExpeditionShipLanded(Entity<CP14StationExpeditionTargetComponent> ent, ref FTLCompletedEvent args)
|
||||
{
|
||||
//Some announsement logic?
|
||||
}
|
||||
@@ -114,8 +114,10 @@ public sealed class CP14ExpeditionSystem : EntitySystem
|
||||
var possiblePositions = new List<EntityCoordinates>();
|
||||
while (points.MoveNext(out var uid, out var spawnPoint, out var xform))
|
||||
{
|
||||
if (ev.Job != null && spawnPoint.Job != ev.Job.Prototype)
|
||||
continue;
|
||||
|
||||
if (spawnPoint.SpawnType != SpawnPointType.LateJoin || xform.GridUid != gridUid)
|
||||
if (xform.GridUid != gridUid)
|
||||
continue;
|
||||
|
||||
possiblePositions.Add(xform.Coordinates);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Content.Shared.CCVar
|
||||
#region CP14
|
||||
|
||||
public static readonly CVarDef<float> CP14ExpeditionArrivalTime =
|
||||
CVarDef.Create("cp14.arrival_time", 60f, CVar.SERVERONLY);
|
||||
CVarDef.Create("cp14.arrival_time", 180f, CVar.SERVERONLY);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user