Remove obsolete system event unsubscriptions (#4190)

This commit is contained in:
DrSmugleaf
2021-06-16 15:54:00 +02:00
committed by GitHub
parent e9d8c56ad1
commit e44663e99f
31 changed files with 0 additions and 206 deletions

View File

@@ -52,9 +52,6 @@ namespace Content.Client.Construction
{ {
base.Shutdown(); base.Shutdown();
UnsubscribeLocalEvent<PlayerAttachSysMessage>();
UnsubscribeNetworkEvent<AckStructureConstructionMessage>();
CommandBinds.Unregister<ConstructionSystem>(); CommandBinds.Unregister<ConstructionSystem>();
} }

View File

@@ -39,12 +39,6 @@ namespace Content.Client.DoAfter
SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached); SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<PlayerAttachSysMessage>();
}
private void HandlePlayerAttached(PlayerAttachSysMessage message) private void HandlePlayerAttached(PlayerAttachSysMessage message)
{ {
_attachedEntity = message.AttachedEntity; _attachedEntity = message.AttachedEntity;

View File

@@ -47,13 +47,6 @@ namespace Content.Client.HealthOverlay
SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached); SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<PlayerAttachSysMessage>();
}
public void Reset() public void Reset()
{ {
foreach (var gui in _guis.Values) foreach (var gui in _guis.Values)

View File

@@ -29,16 +29,6 @@ namespace Content.Client.IconSmoothing
SubscribeLocalEvent<IconSmoothComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove); SubscribeLocalEvent<IconSmoothComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<IconSmoothDirtyEvent>();
UnsubscribeLocalEvent<IconSmoothComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
}
public override void FrameUpdate(float frameTime) public override void FrameUpdate(float frameTime)
{ {
base.FrameUpdate(frameTime); base.FrameUpdate(frameTime);

View File

@@ -16,13 +16,5 @@ namespace Content.Client.Pulling
SubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove); SubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
SubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove); SubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
UnsubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
}
} }
} }

View File

@@ -63,9 +63,6 @@ namespace Content.Client.Verbs
{ {
base.Shutdown(); base.Shutdown();
UnsubscribeNetworkEvent<VerbSystemMessages.VerbsResponseMessage>();
UnsubscribeNetworkEvent<PlayerContainerVisibilityMessage>();
UnsubscribeLocalEvent<MoveEvent>();
_contextMenuPresenter?.Dispose(); _contextMenuPresenter?.Dispose();
CommandBinds.Unregister<VerbSystem>(); CommandBinds.Unregister<VerbSystem>();

View File

@@ -17,14 +17,6 @@ namespace Content.Client.Window
SubscribeLocalEvent<WindowComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove); SubscribeLocalEvent<WindowComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<WindowSmoothDirtyEvent>();
UnsubscribeLocalEvent<WindowComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
}
private void HandleDirtyEvent(WindowSmoothDirtyEvent ev) private void HandleDirtyEvent(WindowSmoothDirtyEvent ev)
{ {
if (ev.Sender.HasComponent<WindowComponent>()) if (ev.Sender.HasComponent<WindowComponent>())

View File

@@ -455,13 +455,6 @@ namespace Content.IntegrationTests.Tests.Networking
SubscribeLocalEvent<SetFooMessage>(HandleMessage); SubscribeLocalEvent<SetFooMessage>(HandleMessage);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeNetworkEvent<SetFooMessage>();
UnsubscribeLocalEvent<SetFooMessage>();
}
private void HandleMessage(SetFooMessage message, EntitySessionEventArgs args) private void HandleMessage(SetFooMessage message, EntitySessionEventArgs args)
{ {
var entity = EntityManager.GetEntity(message.Uid); var entity = EntityManager.GetEntity(message.Uid);

View File

@@ -42,13 +42,6 @@ namespace Content.Server.AI.EntitySystems
SubscribeLocalEvent<MobStateChangedMessage>(MobStateChanged); SubscribeLocalEvent<MobStateChangedMessage>(MobStateChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<SleepAiMessage>();
UnsubscribeLocalEvent<MobStateChangedMessage>();
}
/// <inheritdoc /> /// <inheritdoc />
public override void Update(float frameTime) public override void Update(float frameTime)
{ {

View File

@@ -99,10 +99,6 @@ namespace Content.Server.AI.Pathfinding.Accessible
_queuedCacheDeletions.Clear(); _queuedCacheDeletions.Clear();
_mapManager.OnGridRemoved -= GridRemoved; _mapManager.OnGridRemoved -= GridRemoved;
UnsubscribeLocalEvent<PathfindingChunkUpdateMessage>();
UnsubscribeNetworkEvent<SharedAiDebug.SubscribeReachableMessage>();
UnsubscribeNetworkEvent<SharedAiDebug.UnsubscribeReachableMessage>();
} }
private void GridRemoved(MapId mapId, GridId gridId) private void GridRemoved(MapId mapId, GridId gridId)

View File

@@ -215,9 +215,6 @@ namespace Content.Server.AI.Pathfinding
public override void Shutdown() public override void Shutdown()
{ {
base.Shutdown(); base.Shutdown();
UnsubscribeLocalEvent<CollisionChangeMessage>();
UnsubscribeLocalEvent<MoveEvent>();
UnsubscribeLocalEvent<AccessReaderChangeMessage>();
_mapManager.OnGridRemoved -= HandleGridRemoval; _mapManager.OnGridRemoved -= HandleGridRemoval;
_mapManager.GridChanged -= QueueGridChange; _mapManager.GridChanged -= QueueGridChange;

View File

@@ -21,14 +21,6 @@ namespace Content.Server.Body.Surgery.Components
SubscribeLocalEvent<SurgeryWindowCloseMessage>(OnSurgeryWindowClose); SubscribeLocalEvent<SurgeryWindowCloseMessage>(OnSurgeryWindowClose);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<SurgeryWindowOpenMessage>();
UnsubscribeLocalEvent<SurgeryWindowCloseMessage>();
}
public void Reset() public void Reset()
{ {
_openSurgeryUIs.Clear(); _openSurgeryUIs.Clear();

View File

@@ -33,14 +33,6 @@ namespace Content.Server.Cloning
SubscribeLocalEvent<BeingClonedComponent, MindAddedMessage>(HandleMindAdded); SubscribeLocalEvent<BeingClonedComponent, MindAddedMessage>(HandleMindAdded);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<CloningPodComponent, ActivateInWorldEvent>(HandleActivate);
UnsubscribeLocalEvent<BeingClonedComponent, MindAddedMessage>(HandleMindAdded);
}
internal void TransferMindToClone(Mind.Mind mind) internal void TransferMindToClone(Mind.Mind mind)
{ {
if (!ClonesWaitingForMind.TryGetValue(mind, out var entityUid) || if (!ClonesWaitingForMind.TryGetValue(mind, out var entityUid) ||

View File

@@ -11,13 +11,6 @@ namespace Content.Server.Disposal.Mailing
SubscribeLocalEvent<DisposalMailingUnitComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged); SubscribeLocalEvent<DisposalMailingUnitComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<DisposalMailingUnitComponent, PhysicsBodyTypeChangedEvent>();
}
private static void BodyTypeChanged( private static void BodyTypeChanged(
EntityUid uid, EntityUid uid,
DisposalMailingUnitComponent component, DisposalMailingUnitComponent component,

View File

@@ -12,13 +12,6 @@ namespace Content.Server.Disposal.Tube
SubscribeLocalEvent<DisposalTubeComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged); SubscribeLocalEvent<DisposalTubeComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<DisposalTubeComponent, PhysicsBodyTypeChangedEvent>();
}
private static void BodyTypeChanged( private static void BodyTypeChanged(
EntityUid uid, EntityUid uid,
DisposalTubeComponent component, DisposalTubeComponent component,

View File

@@ -12,13 +12,6 @@ namespace Content.Server.Disposal.Unit.EntitySystems
SubscribeLocalEvent<DisposalUnitComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged); SubscribeLocalEvent<DisposalUnitComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<DisposalUnitComponent, PhysicsBodyTypeChangedEvent>();
}
private static void BodyTypeChanged( private static void BodyTypeChanged(
EntityUid uid, EntityUid uid,
DisposalUnitComponent component, DisposalUnitComponent component,

View File

@@ -19,13 +19,6 @@ namespace Content.Server.Engineering.EntitySystems
SubscribeLocalEvent<DisassembleOnActivateComponent, ActivateInWorldEvent>(HandleActivateInWorld); SubscribeLocalEvent<DisassembleOnActivateComponent, ActivateInWorldEvent>(HandleActivateInWorld);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<DisassembleOnActivateComponent, ActivateInWorldEvent>(HandleActivateInWorld);
}
private async void HandleActivateInWorld(EntityUid uid, DisassembleOnActivateComponent component, ActivateInWorldEvent args) private async void HandleActivateInWorld(EntityUid uid, DisassembleOnActivateComponent component, ActivateInWorldEvent args)
{ {
if (string.IsNullOrEmpty(component.Prototype)) if (string.IsNullOrEmpty(component.Prototype))

View File

@@ -25,13 +25,6 @@ namespace Content.Server.Engineering.EntitySystems
SubscribeLocalEvent<SpawnAfterInteractComponent, AfterInteractEvent>(HandleAfterInteract); SubscribeLocalEvent<SpawnAfterInteractComponent, AfterInteractEvent>(HandleAfterInteract);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<SpawnAfterInteractComponent, AfterInteractEvent>(HandleAfterInteract);
}
private async void HandleAfterInteract(EntityUid uid, SpawnAfterInteractComponent component, AfterInteractEvent args) private async void HandleAfterInteract(EntityUid uid, SpawnAfterInteractComponent component, AfterInteractEvent args)
{ {
if (string.IsNullOrEmpty(component.Prototype)) if (string.IsNullOrEmpty(component.Prototype))

View File

@@ -120,9 +120,6 @@ namespace Content.Server.GameObjects.EntitySystems
base.Shutdown(); base.Shutdown();
_mapManager.MapCreated -= OnMapCreated; _mapManager.MapCreated -= OnMapCreated;
UnsubscribeLocalEvent<RotateEvent>();
UnsubscribeLocalEvent<AirtightComponent, SnapGridPositionChangedEvent>(HandleSnapGridMove);
} }
private void RotateEvent(RotateEvent ev) private void RotateEvent(RotateEvent ev)

View File

@@ -14,13 +14,6 @@ namespace Content.Server.GameObjects.EntitySystems
SubscribeLocalEvent<GasCanisterComponent, PhysicsBodyTypeChangedEvent>(OnBodyTypeChanged); SubscribeLocalEvent<GasCanisterComponent, PhysicsBodyTypeChangedEvent>(OnBodyTypeChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<GasCanisterComponent, PhysicsBodyTypeChangedEvent>();
}
private static void OnBodyTypeChanged( private static void OnBodyTypeChanged(
EntityUid uid, EntityUid uid,
GasCanisterComponent component, GasCanisterComponent component,

View File

@@ -16,14 +16,6 @@ namespace Content.Server.Ghost
SubscribeLocalEvent<GhostComponent, MindUnvisitedMessage>(OnMindUnvisitedMessage); 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) private void OnMindRemovedMessage(EntityUid uid, GhostComponent component, MindRemovedMessage args)
{ {
DeleteEntity(uid); DeleteEntity(uid);

View File

@@ -36,13 +36,6 @@ namespace Content.Server.Ghost.Roles
SubscribeLocalEvent<PlayerAttachedEvent>(OnPlayerAttached); SubscribeLocalEvent<PlayerAttachedEvent>(OnPlayerAttached);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<PlayerAttachedEvent>();
}
private uint GetNextRoleIdentifier() private uint GetNextRoleIdentifier()
{ {
return unchecked(_nextRoleIdentifier++); return unchecked(_nextRoleIdentifier++);

View File

@@ -26,14 +26,6 @@ namespace Content.Server.Gravity.EntitySystems
SubscribeLocalEvent<EntParentChangedMessage>(EntParentChanged); SubscribeLocalEvent<EntParentChangedMessage>(EntParentChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<GravityChangedMessage>();
UnsubscribeLocalEvent<EntParentChangedMessage>();
}
public void Reset() public void Reset()
{ {
_alerts.Clear(); _alerts.Clear();

View File

@@ -24,8 +24,6 @@ namespace Content.Server.Light.EntitySystems
{ {
base.Shutdown(); base.Shutdown();
_activeLights.Clear(); _activeLights.Clear();
UnsubscribeLocalEvent<ActivateHandheldLightMessage>();
UnsubscribeLocalEvent<DeactivateHandheldLightMessage>();
} }
private void HandleActivate(ActivateHandheldLightMessage message) private void HandleActivate(ActivateHandheldLightMessage message)

View File

@@ -19,14 +19,6 @@ namespace Content.Server.Light.EntitySystems
SubscribeLocalEvent<LightReplacerComponent, AfterInteractEvent>(HandleAfterInteract); 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) private void HandleAfterInteract(EntityUid uid, LightReplacerComponent component, AfterInteractEvent eventArgs)
{ {
// standard interaction checks // standard interaction checks

View File

@@ -15,15 +15,6 @@ namespace Content.Server.NodeContainer.EntitySystems
SubscribeLocalEvent<NodeContainerComponent, RotateEvent>(OnRotateEvent); 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) private void OnBodyTypeChanged(EntityUid uid, NodeContainerComponent component, PhysicsBodyTypeChangedEvent args)
{ {
component.AnchorUpdate(); component.AnchorUpdate();

View File

@@ -16,13 +16,6 @@ namespace Content.Server.ParticleAccelerator
SubscribeLocalEvent<ParticleAcceleratorPartComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged); SubscribeLocalEvent<ParticleAcceleratorPartComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<ParticleAcceleratorPartComponent, PhysicsBodyTypeChangedEvent>();
}
private static void BodyTypeChanged( private static void BodyTypeChanged(
EntityUid uid, EntityUid uid,
ParticleAcceleratorPartComponent component, ParticleAcceleratorPartComponent component,

View File

@@ -12,13 +12,6 @@ namespace Content.Server.Power.EntitySystems
SubscribeLocalEvent<PowerReceiverComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged); SubscribeLocalEvent<PowerReceiverComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<PowerReceiverComponent, PhysicsBodyTypeChangedEvent>();
}
private static void BodyTypeChanged( private static void BodyTypeChanged(
EntityUid uid, EntityUid uid,
PowerReceiverComponent component, PowerReceiverComponent component,

View File

@@ -16,13 +16,5 @@ namespace Content.Server.Pulling
SubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove); SubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
SubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove); SubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<PullableComponent, PullableMoveMessage>(OnPullableMove);
UnsubscribeLocalEvent<PullableComponent, PullableStopMovingMessage>(OnPullableStopMove);
}
} }
} }

View File

@@ -12,13 +12,6 @@ namespace Content.Server.Singularity.EntitySystems
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged); SubscribeLocalEvent<ContainmentFieldGeneratorComponent, PhysicsBodyTypeChangedEvent>(BodyTypeChanged);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<ContainmentFieldGeneratorComponent, PhysicsBodyTypeChangedEvent>();
}
private static void BodyTypeChanged( private static void BodyTypeChanged(
EntityUid uid, EntityUid uid,
ContainmentFieldGeneratorComponent component, ContainmentFieldGeneratorComponent component,

View File

@@ -22,14 +22,6 @@ namespace Content.Server.Storage
SubscribeLocalEvent<EntInsertedIntoContainerMessage>(HandleEntityInsertedIntoContainer); SubscribeLocalEvent<EntInsertedIntoContainerMessage>(HandleEntityInsertedIntoContainer);
} }
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<EntRemovedFromContainerMessage>();
UnsubscribeLocalEvent<EntInsertedIntoContainerMessage>();
}
/// <inheritdoc /> /// <inheritdoc />
public override void Update(float frameTime) public override void Update(float frameTime)
{ {