Content update for NetEntities (#18935)
This commit is contained in:
@@ -450,7 +450,7 @@ public sealed partial class StationJobsSystem : EntitySystem
|
||||
|
||||
private bool _availableJobsDirty;
|
||||
|
||||
private TickerJobsAvailableEvent _cachedAvailableJobs = new (new Dictionary<EntityUid, string>(), new Dictionary<EntityUid, Dictionary<string, uint?>>());
|
||||
private TickerJobsAvailableEvent _cachedAvailableJobs = new (new Dictionary<NetEntity, string>(), new Dictionary<NetEntity, Dictionary<string, uint?>>());
|
||||
|
||||
/// <summary>
|
||||
/// Assembles an event from the current available-to-play jobs.
|
||||
@@ -461,18 +461,19 @@ public sealed partial class StationJobsSystem : EntitySystem
|
||||
{
|
||||
// If late join is disallowed, return no available jobs.
|
||||
if (_gameTicker.DisallowLateJoin)
|
||||
return new TickerJobsAvailableEvent(new Dictionary<EntityUid, string>(), new Dictionary<EntityUid, Dictionary<string, uint?>>());
|
||||
return new TickerJobsAvailableEvent(new Dictionary<NetEntity, string>(), new Dictionary<NetEntity, Dictionary<string, uint?>>());
|
||||
|
||||
var jobs = new Dictionary<EntityUid, Dictionary<string, uint?>>();
|
||||
var stationNames = new Dictionary<EntityUid, string>();
|
||||
var jobs = new Dictionary<NetEntity, Dictionary<string, uint?>>();
|
||||
var stationNames = new Dictionary<NetEntity, string>();
|
||||
|
||||
var query = EntityQueryEnumerator<StationJobsComponent>();
|
||||
|
||||
while (query.MoveNext(out var station, out var comp))
|
||||
{
|
||||
var netStation = GetNetEntity(station);
|
||||
var list = comp.JobList.ToDictionary(x => x.Key, x => x.Value);
|
||||
jobs.Add(station, list);
|
||||
stationNames.Add(station, Name(station));
|
||||
jobs.Add(netStation, list);
|
||||
stationNames.Add(netStation, Name(station));
|
||||
}
|
||||
return new TickerJobsAvailableEvent(stationNames, jobs);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public sealed class StationSystem : EntitySystem
|
||||
{
|
||||
if (e.NewStatus == SessionStatus.Connected)
|
||||
{
|
||||
RaiseNetworkEvent(new StationsUpdatedEvent(GetStationsSet()), e.Session);
|
||||
RaiseNetworkEvent(new StationsUpdatedEvent(GetNetEntitySet(GetStationsSet())), e.Session);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public sealed class StationSystem : EntitySystem
|
||||
|
||||
private void OnStationAdd(EntityUid uid, StationDataComponent component, ComponentStartup args)
|
||||
{
|
||||
RaiseNetworkEvent(new StationsUpdatedEvent(GetStationsSet()), Filter.Broadcast());
|
||||
RaiseNetworkEvent(new StationsUpdatedEvent(GetNetEntitySet(GetStationsSet())), Filter.Broadcast());
|
||||
|
||||
var metaData = MetaData(uid);
|
||||
RaiseLocalEvent(new StationInitializedEvent(uid));
|
||||
@@ -108,7 +108,7 @@ public sealed class StationSystem : EntitySystem
|
||||
RemComp<StationMemberComponent>(grid);
|
||||
}
|
||||
|
||||
RaiseNetworkEvent(new StationsUpdatedEvent(GetStationsSet()), Filter.Broadcast());
|
||||
RaiseNetworkEvent(new StationsUpdatedEvent(GetNetEntitySet(GetStationsSet())), Filter.Broadcast());
|
||||
}
|
||||
|
||||
private void OnPreGameMapLoad(PreGameMapLoad ev)
|
||||
|
||||
Reference in New Issue
Block a user