Network StationMember properly (#39509)

This commit is contained in:
Nemanja
2025-08-09 16:13:14 -04:00
committed by GitHub
parent 450ff99bac
commit a4e5d1b211
2 changed files with 3 additions and 2 deletions

View File

@@ -343,6 +343,7 @@ public sealed partial class StationSystem : SharedStationSystem
stationMember.Station = station;
stationData.Grids.Add(mapGrid);
Dirty(station, stationData);
Dirty(mapGrid, stationMember);
RaiseLocalEvent(station, new StationGridAddedEvent(mapGrid, station, false), true);

View File

@@ -5,12 +5,12 @@ namespace Content.Shared.Station.Components;
/// <summary>
/// Indicates that a grid is a member of the given station.
/// </summary>
[RegisterComponent, NetworkedComponent]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class StationMemberComponent : Component
{
/// <summary>
/// Station that this grid is a part of.
/// </summary>
[DataField]
[DataField, AutoNetworkedField]
public EntityUid Station = EntityUid.Invalid;
}