Network StationMember properly (#39509)
This commit is contained in:
@@ -343,6 +343,7 @@ public sealed partial class StationSystem : SharedStationSystem
|
|||||||
stationMember.Station = station;
|
stationMember.Station = station;
|
||||||
stationData.Grids.Add(mapGrid);
|
stationData.Grids.Add(mapGrid);
|
||||||
Dirty(station, stationData);
|
Dirty(station, stationData);
|
||||||
|
Dirty(mapGrid, stationMember);
|
||||||
|
|
||||||
RaiseLocalEvent(station, new StationGridAddedEvent(mapGrid, station, false), true);
|
RaiseLocalEvent(station, new StationGridAddedEvent(mapGrid, station, false), true);
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ namespace Content.Shared.Station.Components;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates that a grid is a member of the given station.
|
/// Indicates that a grid is a member of the given station.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent, NetworkedComponent]
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||||
public sealed partial class StationMemberComponent : Component
|
public sealed partial class StationMemberComponent : Component
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Station that this grid is a part of.
|
/// Station that this grid is a part of.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField, AutoNetworkedField]
|
||||||
public EntityUid Station = EntityUid.Invalid;
|
public EntityUid Station = EntityUid.Invalid;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user