]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix: auto-update mailing unit + gas canister UIs on state (#39289)
authorPerry Fraser <perryprog@users.noreply.github.com>
Mon, 4 Aug 2025 16:26:52 +0000 (12:26 -0400)
committerGitHub <noreply@github.com>
Mon, 4 Aug 2025 16:26:52 +0000 (18:26 +0200)
* fix: auto-update mailing unit + gas canister UIs

* fix: make FollowerComponent auto handle state

* refactor: kill AfterAutoHandleState for Follower

* flakeops

Content.Shared/Atmos/Piping/Unary/Components/GasCanisterComponent.cs
Content.Shared/Configurable/ConfigurationComponent.cs
Content.Shared/Follower/Components/FollowerComponent.cs
Content.Shared/Follower/FollowerSystem.cs

index 204cbc76d5d4921fb2d411e36185f52f09154227..40d76684ee80d6957064e00b4d42a6e1c2846470 100644 (file)
@@ -6,7 +6,7 @@ using Robust.Shared.GameStates;
 
 namespace Content.Shared.Atmos.Piping.Unary.Components;
 
-[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
+[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
 public sealed partial class GasCanisterComponent : Component, IGasMixtureHolder
 {
     [DataField("port")]
index 63c084508393a7483656233ee515b55de6c06ca7..80affb81f518c1ff96cbf1227b6d7318aa83491f 100644 (file)
@@ -13,7 +13,7 @@ namespace Content.Shared.Configurable
     /// <remarks>
     /// If you want a more detailed description ask the original coder.
     /// </remarks>
-    [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
+    [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
     public sealed partial class ConfigurationComponent : Component
     {
         /// <summary>
index ede810293ff427e05d8bee3d3d9f406fc3c08196..15d23a7037ddd4e041d85faeb148ab79e67db2c4 100644 (file)
@@ -4,7 +4,7 @@ namespace Content.Shared.Follower.Components;
 
 [RegisterComponent]
 [Access(typeof(FollowerSystem))]
-[NetworkedComponent, AutoGenerateComponentState(RaiseAfterAutoHandleState = true)]
+[NetworkedComponent, AutoGenerateComponentState]
 public sealed partial class FollowerComponent : Component
 {
     [AutoNetworkedField, DataField("following")]
index b9c2f4bece05ad7ad965c0fa21f2f3df4ec8be08..07639a1790b3507c467a81f0122f1cc3cbbd17e8 100644 (file)
@@ -44,7 +44,6 @@ public sealed class FollowerSystem : EntitySystem
         SubscribeLocalEvent<FollowerComponent, MoveInputEvent>(OnFollowerMove);
         SubscribeLocalEvent<FollowerComponent, PullStartedMessage>(OnPullStarted);
         SubscribeLocalEvent<FollowerComponent, EntityTerminatingEvent>(OnFollowerTerminating);
-        SubscribeLocalEvent<FollowerComponent, AfterAutoHandleStateEvent>(OnAfterHandleState);
 
         SubscribeLocalEvent<FollowedComponent, ComponentGetStateAttemptEvent>(OnFollowedAttempt);
         SubscribeLocalEvent<FollowerComponent, GotEquippedHandEvent>(OnGotEquippedHand);
@@ -150,11 +149,6 @@ public sealed class FollowerSystem : EntitySystem
         StopFollowingEntity(uid, component.Following, deparent: false);
     }
 
-    private void OnAfterHandleState(Entity<FollowerComponent> entity, ref AfterAutoHandleStateEvent args)
-    {
-        StartFollowingEntity(entity, entity.Comp.Following);
-    }
-
     // Since we parent our observer to the followed entity, we need to detach
     // before they get deleted so that we don't get recursively deleted too.
     private void OnFollowedTerminating(EntityUid uid, FollowedComponent component, ref EntityTerminatingEvent args)