Remove obsolete system event unsubscriptions (#4190)
This commit is contained in:
parent
e9d8c56ad1
commit
e44663e99f
31 changed files with 0 additions and 206 deletions
|
|
@ -52,9 +52,6 @@ namespace Content.Client.Construction
|
|||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<PlayerAttachSysMessage>();
|
||||
UnsubscribeNetworkEvent<AckStructureConstructionMessage>();
|
||||
|
||||
CommandBinds.Unregister<ConstructionSystem>();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,12 +39,6 @@ namespace Content.Client.DoAfter
|
|||
SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
UnsubscribeLocalEvent<PlayerAttachSysMessage>();
|
||||
}
|
||||
|
||||
private void HandlePlayerAttached(PlayerAttachSysMessage message)
|
||||
{
|
||||
_attachedEntity = message.AttachedEntity;
|
||||
|
|
|
|||
|
|
@ -47,13 +47,6 @@ namespace Content.Client.HealthOverlay
|
|||
SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<PlayerAttachSysMessage>();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
foreach (var gui in _guis.Values)
|
||||
|
|
|
|||
|
|
@ -29,16 +29,6 @@ namespace Content.Client.IconSmoothing
|
|||
SubscribeLocalEvent<IconSmoothComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<IconSmoothDirtyEvent>();
|
||||
|
||||
UnsubscribeLocalEvent<IconSmoothComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
public override void FrameUpdate(float frameTime)
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
|
|
|||
|
|
@ -16,13 +16,5 @@ namespace Content.Client.Pulling
|
|||
SubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
|
||||
SubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
|
||||
UnsubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,9 +63,6 @@ namespace Content.Client.Verbs
|
|||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeNetworkEvent<VerbSystemMessages.VerbsResponseMessage>();
|
||||
UnsubscribeNetworkEvent<PlayerContainerVisibilityMessage>();
|
||||
UnsubscribeLocalEvent<MoveEvent>();
|
||||
_contextMenuPresenter?.Dispose();
|
||||
|
||||
CommandBinds.Unregister<VerbSystem>();
|
||||
|
|
|
|||
|
|
@ -17,14 +17,6 @@ namespace Content.Client.Window
|
|||
SubscribeLocalEvent<WindowComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<WindowSmoothDirtyEvent>();
|
||||
UnsubscribeLocalEvent<WindowComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
private void HandleDirtyEvent(WindowSmoothDirtyEvent ev)
|
||||
{
|
||||
if (ev.Sender.HasComponent<WindowComponent>())
|
||||
|
|
|
|||
|
|
@ -455,13 +455,6 @@ namespace Content.IntegrationTests.Tests.Networking
|
|||
SubscribeLocalEvent<SetFooMessage>(HandleMessage);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
UnsubscribeNetworkEvent<SetFooMessage>();
|
||||
UnsubscribeLocalEvent<SetFooMessage>();
|
||||
}
|
||||
|
||||
private void HandleMessage(SetFooMessage message, EntitySessionEventArgs args)
|
||||
{
|
||||
var entity = EntityManager.GetEntity(message.Uid);
|
||||
|
|
|
|||
|
|
@ -42,13 +42,6 @@ namespace Content.Server.AI.EntitySystems
|
|||
SubscribeLocalEvent<MobStateChangedMessage>(MobStateChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
UnsubscribeLocalEvent<SleepAiMessage>();
|
||||
UnsubscribeLocalEvent<MobStateChangedMessage>();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -99,10 +99,6 @@ namespace Content.Server.AI.Pathfinding.Accessible
|
|||
_queuedCacheDeletions.Clear();
|
||||
|
||||
_mapManager.OnGridRemoved -= GridRemoved;
|
||||
|
||||
UnsubscribeLocalEvent<PathfindingChunkUpdateMessage>();
|
||||
UnsubscribeNetworkEvent<SharedAiDebug.SubscribeReachableMessage>();
|
||||
UnsubscribeNetworkEvent<SharedAiDebug.UnsubscribeReachableMessage>();
|
||||
}
|
||||
|
||||
private void GridRemoved(MapId mapId, GridId gridId)
|
||||
|
|
|
|||
|
|
@ -215,9 +215,6 @@ namespace Content.Server.AI.Pathfinding
|
|||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
UnsubscribeLocalEvent<CollisionChangeMessage>();
|
||||
UnsubscribeLocalEvent<MoveEvent>();
|
||||
UnsubscribeLocalEvent<AccessReaderChangeMessage>();
|
||||
|
||||
_mapManager.OnGridRemoved -= HandleGridRemoval;
|
||||
_mapManager.GridChanged -= QueueGridChange;
|
||||
|
|
|
|||
|
|
@ -21,14 +21,6 @@ namespace Content.Server.Body.Surgery.Components
|
|||
SubscribeLocalEvent<SurgeryWindowCloseMessage>(OnSurgeryWindowClose);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<SurgeryWindowOpenMessage>();
|
||||
UnsubscribeLocalEvent<SurgeryWindowCloseMessage>();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
_openSurgeryUIs.Clear();
|
||||
|
|
|
|||
|
|
@ -33,14 +33,6 @@ namespace Content.Server.Cloning
|
|||
SubscribeLocalEvent<BeingClonedComponent, MindAddedMessage>(HandleMindAdded);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<CloningPodComponent, ActivateInWorldEvent>(HandleActivate);
|
||||
UnsubscribeLocalEvent<BeingClonedComponent, MindAddedMessage>(HandleMindAdded);
|
||||
}
|
||||
|
||||
internal void TransferMindToClone(Mind.Mind mind)
|
||||
{
|
||||
if (!ClonesWaitingForMind.TryGetValue(mind, out var entityUid) ||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,6 @@ namespace Content.Server.Disposal.Mailing
|
|||
SubscribeLocalEvent<DisposalMailingUnitComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<DisposalMailingUnitComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void BodyTypeChanged(
|
||||
EntityUid uid,
|
||||
DisposalMailingUnitComponent component,
|
||||
|
|
|
|||
|
|
@ -12,13 +12,6 @@ namespace Content.Server.Disposal.Tube
|
|||
SubscribeLocalEvent<DisposalTubeComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<DisposalTubeComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void BodyTypeChanged(
|
||||
EntityUid uid,
|
||||
DisposalTubeComponent component,
|
||||
|
|
|
|||
|
|
@ -12,13 +12,6 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
|||
SubscribeLocalEvent<DisposalUnitComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<DisposalUnitComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void BodyTypeChanged(
|
||||
EntityUid uid,
|
||||
DisposalUnitComponent component,
|
||||
|
|
|
|||
|
|
@ -19,13 +19,6 @@ namespace Content.Server.Engineering.EntitySystems
|
|||
SubscribeLocalEvent<DisassembleOnActivateComponent, ActivateInWorldEvent>(HandleActivateInWorld);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<DisassembleOnActivateComponent, ActivateInWorldEvent>(HandleActivateInWorld);
|
||||
}
|
||||
|
||||
private async void HandleActivateInWorld(EntityUid uid, DisassembleOnActivateComponent component, ActivateInWorldEvent args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(component.Prototype))
|
||||
|
|
|
|||
|
|
@ -25,13 +25,6 @@ namespace Content.Server.Engineering.EntitySystems
|
|||
SubscribeLocalEvent<SpawnAfterInteractComponent, AfterInteractEvent>(HandleAfterInteract);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<SpawnAfterInteractComponent, AfterInteractEvent>(HandleAfterInteract);
|
||||
}
|
||||
|
||||
private async void HandleAfterInteract(EntityUid uid, SpawnAfterInteractComponent component, AfterInteractEvent args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(component.Prototype))
|
||||
|
|
|
|||
|
|
@ -120,9 +120,6 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||
base.Shutdown();
|
||||
|
||||
_mapManager.MapCreated -= OnMapCreated;
|
||||
|
||||
UnsubscribeLocalEvent<RotateEvent>();
|
||||
UnsubscribeLocalEvent<AirtightComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
|
||||
}
|
||||
|
||||
private void RotateEvent(RotateEvent ev)
|
||||
|
|
|
|||
|
|
@ -14,13 +14,6 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||
SubscribeLocalEvent<GasCanisterComponent, PhysicsBodyTypeChangedEvent>(OnBodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<GasCanisterComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void OnBodyTypeChanged(
|
||||
EntityUid uid,
|
||||
GasCanisterComponent component,
|
||||
|
|
|
|||
|
|
@ -16,14 +16,6 @@ namespace Content.Server.Ghost
|
|||
SubscribeLocalEvent<GhostComponent, MindUnvisitedMessage>(OnMindUnvisitedMessage);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<GhostComponent, MindRemovedMessage>(OnMindRemovedMessage);
|
||||
UnsubscribeLocalEvent<GhostComponent, MindUnvisitedMessage>(OnMindUnvisitedMessage);
|
||||
}
|
||||
|
||||
private void OnMindRemovedMessage(EntityUid uid, GhostComponent component, MindRemovedMessage args)
|
||||
{
|
||||
DeleteEntity(uid);
|
||||
|
|
|
|||
|
|
@ -36,13 +36,6 @@ namespace Content.Server.Ghost.Roles
|
|||
SubscribeLocalEvent<PlayerAttachedEvent>(OnPlayerAttached);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<PlayerAttachedEvent>();
|
||||
}
|
||||
|
||||
private uint GetNextRoleIdentifier()
|
||||
{
|
||||
return unchecked(_nextRoleIdentifier++);
|
||||
|
|
|
|||
|
|
@ -26,14 +26,6 @@ namespace Content.Server.Gravity.EntitySystems
|
|||
SubscribeLocalEvent<EntParentChangedMessage>(EntParentChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<GravityChangedMessage>();
|
||||
UnsubscribeLocalEvent<EntParentChangedMessage>();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
_alerts.Clear();
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ namespace Content.Server.Light.EntitySystems
|
|||
{
|
||||
base.Shutdown();
|
||||
_activeLights.Clear();
|
||||
UnsubscribeLocalEvent<ActivateHandheldLightMessage>();
|
||||
UnsubscribeLocalEvent<DeactivateHandheldLightMessage>();
|
||||
}
|
||||
|
||||
private void HandleActivate(ActivateHandheldLightMessage message)
|
||||
|
|
|
|||
|
|
@ -19,14 +19,6 @@ namespace Content.Server.Light.EntitySystems
|
|||
SubscribeLocalEvent<LightReplacerComponent, AfterInteractEvent>(HandleAfterInteract);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<LightReplacerComponent, InteractUsingEvent>(HandleInteract);
|
||||
UnsubscribeLocalEvent<LightReplacerComponent, AfterInteractEvent>(HandleAfterInteract);
|
||||
}
|
||||
|
||||
private void HandleAfterInteract(EntityUid uid, LightReplacerComponent component, AfterInteractEvent eventArgs)
|
||||
{
|
||||
// standard interaction checks
|
||||
|
|
|
|||
|
|
@ -15,15 +15,6 @@ namespace Content.Server.NodeContainer.EntitySystems
|
|||
SubscribeLocalEvent<NodeContainerComponent, RotateEvent>(OnRotateEvent);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
|
||||
UnsubscribeLocalEvent<NodeContainerComponent, PhysicsBodyTypeChangedEvent>(OnBodyTypeChanged);
|
||||
UnsubscribeLocalEvent<NodeContainerComponent, RotateEvent>(OnRotateEvent);
|
||||
}
|
||||
|
||||
private void OnBodyTypeChanged(EntityUid uid, NodeContainerComponent component, PhysicsBodyTypeChangedEvent args)
|
||||
{
|
||||
component.AnchorUpdate();
|
||||
|
|
|
|||
|
|
@ -16,13 +16,6 @@ namespace Content.Server.ParticleAccelerator
|
|||
SubscribeLocalEvent<ParticleAcceleratorPartComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<ParticleAcceleratorPartComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void BodyTypeChanged(
|
||||
EntityUid uid,
|
||||
ParticleAcceleratorPartComponent component,
|
||||
|
|
|
|||
|
|
@ -12,13 +12,6 @@ namespace Content.Server.Power.EntitySystems
|
|||
SubscribeLocalEvent<PowerReceiverComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<PowerReceiverComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void BodyTypeChanged(
|
||||
EntityUid uid,
|
||||
PowerReceiverComponent component,
|
||||
|
|
|
|||
|
|
@ -16,13 +16,5 @@ namespace Content.Server.Pulling
|
|||
SubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
|
||||
SubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
|
||||
UnsubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,13 +12,6 @@ namespace Content.Server.Singularity.EntitySystems
|
|||
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<ContainmentFieldGeneratorComponent, PhysicsBodyTypeChangedEvent>();
|
||||
}
|
||||
|
||||
private static void BodyTypeChanged(
|
||||
EntityUid uid,
|
||||
ContainmentFieldGeneratorComponent component,
|
||||
|
|
|
|||
|
|
@ -22,14 +22,6 @@ namespace Content.Server.Storage
|
|||
SubscribeLocalEvent<EntInsertedIntoContainerMessage>(HandleEntityInsertedIntoContainer);
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeLocalEvent<EntRemovedFromContainerMessage>();
|
||||
UnsubscribeLocalEvent<EntInsertedIntoContainerMessage>();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue