fix: auto-update mailing unit + gas canister UIs on state (#39289)
* fix: auto-update mailing unit + gas canister UIs * fix: make FollowerComponent auto handle state * refactor: kill AfterAutoHandleState for Follower * flakeops
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user