]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Network StationMember properly (#39509)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Sat, 9 Aug 2025 20:13:14 +0000 (16:13 -0400)
committerGitHub <noreply@github.com>
Sat, 9 Aug 2025 20:13:14 +0000 (13:13 -0700)
Content.Server/Station/Systems/StationSystem.cs
Content.Shared/Station/Components/StationMemberComponent.cs

index 7100c6144f2d563b5c617206f102df176994f2e4..dc2ec49dce0c4e57b0eb94ca9b0a411cc2f2824d 100644 (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);
 
index ce5d95ad0d2cc45600e8414c0948c43d0880cf98..3f2cd4856ba9a7a8e22e175c22da4a14317a03fa 100644 (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;
 }