diff --git a/Content.Client/ContextMenu/UI/ContextMenuPresenter.cs b/Content.Client/ContextMenu/UI/ContextMenuPresenter.cs index d85eda0ce8..1ad07c0e9d 100644 --- a/Content.Client/ContextMenu/UI/ContextMenuPresenter.cs +++ b/Content.Client/ContextMenu/UI/ContextMenuPresenter.cs @@ -282,7 +282,7 @@ namespace Content.Client.ContextMenu.UI } } - public void HandleMoveEvent(MoveEvent ev) + public void HandleMoveEvent(ref MoveEvent ev) { if (_contextMenuView.Elements.Count == 0) return; var entity = ev.Sender; diff --git a/Content.Client/IconSmoothing/IconSmoothSystem.cs b/Content.Client/IconSmoothing/IconSmoothSystem.cs index 4fc0ca3794..1fc6a34c0c 100644 --- a/Content.Client/IconSmoothing/IconSmoothSystem.cs +++ b/Content.Client/IconSmoothing/IconSmoothSystem.cs @@ -91,7 +91,7 @@ namespace Content.Client.IconSmoothing } } - private static void HandleAnchorChanged(EntityUid uid, IconSmoothComponent component, AnchorStateChangedEvent args) + private static void HandleAnchorChanged(EntityUid uid, IconSmoothComponent component, ref AnchorStateChangedEvent args) { component.AnchorStateChanged(); } diff --git a/Content.Client/Window/WindowSystem.cs b/Content.Client/Window/WindowSystem.cs index da6c23edff..b43eff1d39 100644 --- a/Content.Client/Window/WindowSystem.cs +++ b/Content.Client/Window/WindowSystem.cs @@ -25,7 +25,7 @@ namespace Content.Client.Window } } - private static void HandleAnchorChanged(EntityUid uid, WindowComponent component, AnchorStateChangedEvent args) + private static void HandleAnchorChanged(EntityUid uid, WindowComponent component, ref AnchorStateChangedEvent args) { component.AnchorStateChanged(); } diff --git a/Content.Server/AI/Pathfinding/PathfindingSystem.cs b/Content.Server/AI/Pathfinding/PathfindingSystem.cs index 98cf1f500c..39f6205276 100644 --- a/Content.Server/AI/Pathfinding/PathfindingSystem.cs +++ b/Content.Server/AI/Pathfinding/PathfindingSystem.cs @@ -289,7 +289,7 @@ namespace Content.Server.AI.Pathfinding _lastKnownPositions.Remove(entity); } - private void QueueMoveEvent(MoveEvent moveEvent) + private void QueueMoveEvent(ref MoveEvent moveEvent) { _moveUpdateQueue.Enqueue(moveEvent); } diff --git a/Content.Server/Atmos/EntitySystems/AirtightSystem.cs b/Content.Server/Atmos/EntitySystems/AirtightSystem.cs index b3b0d4dd5a..284a930e10 100644 --- a/Content.Server/Atmos/EntitySystems/AirtightSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AirtightSystem.cs @@ -26,7 +26,10 @@ namespace Content.Server.Atmos.EntitySystems private void OnAirtightInit(EntityUid uid, AirtightComponent airtight, ComponentInit args) { if (airtight.FixAirBlockedDirectionInitialize) - OnAirtightRotated(uid, airtight, new RotateEvent(airtight.Owner, Angle.Zero, airtight.Owner.Transform.WorldRotation)); + { + var rotateEvent = new RotateEvent(airtight.Owner, Angle.Zero, airtight.Owner.Transform.WorldRotation); + OnAirtightRotated(uid, airtight, ref rotateEvent); + } // Adding this component will immediately anchor the entity, because the atmos system // requires airtight entities to be anchored for performance. @@ -51,7 +54,7 @@ namespace Content.Server.Atmos.EntitySystems { } - private void OnAirtightPositionChanged(EntityUid uid, AirtightComponent airtight, AnchorStateChangedEvent args) + private void OnAirtightPositionChanged(EntityUid uid, AirtightComponent airtight, ref AnchorStateChangedEvent args) { var gridId = airtight.Owner.Transform.GridID; var coords = airtight.Owner.Transform.Coordinates; @@ -64,7 +67,7 @@ namespace Content.Server.Atmos.EntitySystems InvalidatePosition(gridId, tilePos); } - private void OnAirtightRotated(EntityUid uid, AirtightComponent airtight, RotateEvent ev) + private void OnAirtightRotated(EntityUid uid, AirtightComponent airtight, ref RotateEvent ev) { if (!airtight.RotateAirBlocked || airtight.InitialAirBlockedDirection == (int)AtmosDirection.Invalid) return; diff --git a/Content.Server/Atmos/Piping/EntitySystems/AtmosDeviceSystem.cs b/Content.Server/Atmos/Piping/EntitySystems/AtmosDeviceSystem.cs index 12d98e8ff2..997b51dddf 100644 --- a/Content.Server/Atmos/Piping/EntitySystems/AtmosDeviceSystem.cs +++ b/Content.Server/Atmos/Piping/EntitySystems/AtmosDeviceSystem.cs @@ -98,7 +98,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems LeaveAtmosphere(component); } - private void OnDeviceAnchorChanged(EntityUid uid, AtmosDeviceComponent component, AnchorStateChangedEvent args) + private void OnDeviceAnchorChanged(EntityUid uid, AtmosDeviceComponent component, ref AnchorStateChangedEvent args) { // Do nothing if the component doesn't require being anchored to function. if (!component.RequireAnchored) @@ -110,7 +110,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems LeaveAtmosphere(component); } - private void OnDeviceParentChanged(EntityUid uid, AtmosDeviceComponent component, EntParentChangedMessage args) + private void OnDeviceParentChanged(EntityUid uid, AtmosDeviceComponent component, ref EntParentChangedMessage args) { RejoinAtmosphere(component); } diff --git a/Content.Server/Buckle/BuckleSystem.cs b/Content.Server/Buckle/BuckleSystem.cs index 4f262f7e18..23edd6a617 100644 --- a/Content.Server/Buckle/BuckleSystem.cs +++ b/Content.Server/Buckle/BuckleSystem.cs @@ -45,7 +45,7 @@ namespace Content.Server.Buckle } } - private void MoveEvent(EntityUid uid, BuckleComponent buckle, MoveEvent ev) + private void MoveEvent(EntityUid uid, BuckleComponent buckle, ref MoveEvent ev) { var strap = buckle.BuckledTo; @@ -64,7 +64,7 @@ namespace Content.Server.Buckle buckle.TryUnbuckle(buckle.Owner, true); } - private void RotateEvent(EntityUid uid, StrapComponent strap, RotateEvent ev) + private void RotateEvent(EntityUid uid, StrapComponent strap, ref RotateEvent ev) { // On rotation of a strap, reattach all buckled entities. // This fixes buckle offsets and draw depths. diff --git a/Content.Server/Gravity/EntitySystems/WeightlessSystem.cs b/Content.Server/Gravity/EntitySystems/WeightlessSystem.cs index 06e452aea0..4c470b7231 100644 --- a/Content.Server/Gravity/EntitySystems/WeightlessSystem.cs +++ b/Content.Server/Gravity/EntitySystems/WeightlessSystem.cs @@ -97,7 +97,7 @@ namespace Content.Server.Gravity.EntitySystems status.ClearAlert(AlertType.Weightless); } - private void EntParentChanged(EntParentChangedMessage ev) + private void EntParentChanged(ref EntParentChangedMessage ev) { if (!ev.Entity.TryGetComponent(out ServerAlertsComponent? status)) { diff --git a/Content.Server/NodeContainer/EntitySystems/NodeContainerSystem.cs b/Content.Server/NodeContainer/EntitySystems/NodeContainerSystem.cs index ba11446302..9800f3fc78 100644 --- a/Content.Server/NodeContainer/EntitySystems/NodeContainerSystem.cs +++ b/Content.Server/NodeContainer/EntitySystems/NodeContainerSystem.cs @@ -50,7 +50,7 @@ namespace Content.Server.NodeContainer.EntitySystems private static void OnAnchorStateChanged( EntityUid uid, NodeContainerComponent component, - AnchorStateChangedEvent args) + ref AnchorStateChangedEvent args) { foreach (var node in component.Nodes.Values) { @@ -59,7 +59,7 @@ namespace Content.Server.NodeContainer.EntitySystems } } - private static void OnRotateEvent(EntityUid uid, NodeContainerComponent container, RotateEvent ev) + private static void OnRotateEvent(EntityUid uid, NodeContainerComponent container, ref RotateEvent ev) { if (ev.NewRotation == ev.OldRotation) { @@ -69,7 +69,7 @@ namespace Content.Server.NodeContainer.EntitySystems foreach (var node in container.Nodes.Values) { if (node is not IRotatableNode rotatableNode) continue; - rotatableNode.RotateEvent(ev); + rotatableNode.RotateEvent(ref ev); } } } diff --git a/Content.Server/NodeContainer/Nodes/IRotatableNode.cs b/Content.Server/NodeContainer/Nodes/IRotatableNode.cs index 07539ce436..6ca1728e1f 100644 --- a/Content.Server/NodeContainer/Nodes/IRotatableNode.cs +++ b/Content.Server/NodeContainer/Nodes/IRotatableNode.cs @@ -11,6 +11,6 @@ namespace Content.Server.NodeContainer.Nodes /// /// Rotates this . /// - void RotateEvent(RotateEvent ev); + void RotateEvent(ref RotateEvent ev); } } diff --git a/Content.Server/NodeContainer/Nodes/PipeNode.cs b/Content.Server/NodeContainer/Nodes/PipeNode.cs index 83495e05de..8ba8836497 100644 --- a/Content.Server/NodeContainer/Nodes/PipeNode.cs +++ b/Content.Server/NodeContainer/Nodes/PipeNode.cs @@ -121,7 +121,7 @@ namespace Content.Server.NodeContainer.Nodes /// /// Rotates the when the entity is rotated, and re-calculates the . /// - void IRotatableNode.RotateEvent(RotateEvent ev) + void IRotatableNode.RotateEvent(ref RotateEvent ev) { if (!RotationsEnabled) return; var diff = ev.NewRotation - ev.OldRotation; diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorPartSystem.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorPartSystem.cs index 994c9a71b2..0b5709402d 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorPartSystem.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorPartSystem.cs @@ -23,7 +23,7 @@ namespace Content.Server.ParticleAccelerator.EntitySystems component.OnAnchorChanged(); } - private static void RotateEvent(RotateEvent ev) + private static void RotateEvent(ref RotateEvent ev) { if (ev.Sender.TryGetComponent(out ParticleAcceleratorPartComponent? part)) { diff --git a/Content.Server/Shuttles/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/ShuttleConsoleSystem.cs index d31eaf492a..c3d76a9f4d 100644 --- a/Content.Server/Shuttles/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/ShuttleConsoleSystem.cs @@ -58,7 +58,7 @@ namespace Content.Server.Shuttles /// /// If pilot is moved then we'll stop them from piloting. /// - private void HandlePilotMove(EntityUid uid, PilotComponent component, MoveEvent args) + private void HandlePilotMove(EntityUid uid, PilotComponent component, ref MoveEvent args) { if (component.Console == null) return; RemovePilot(component); diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.cs index 19cf1385d9..12d67b3130 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.cs @@ -125,7 +125,7 @@ namespace Content.Shared.Pulling _stoppedMoving.Add(component); } - private void PullerMoved(MoveEvent ev) + private void PullerMoved(ref MoveEvent ev) { var puller = ev.Sender; if (!TryGetPulled(ev.Sender, out var pulled)) diff --git a/Content.Shared/SubFloor/SubFloorHideSystem.cs b/Content.Shared/SubFloor/SubFloorHideSystem.cs index d729e2b31a..43f895bdf1 100644 --- a/Content.Shared/SubFloor/SubFloorHideSystem.cs +++ b/Content.Shared/SubFloor/SubFloorHideSystem.cs @@ -81,7 +81,7 @@ namespace Content.Shared.SubFloor UpdateEntity(uid, true); } - private void HandleAnchorChanged(EntityUid uid, SubFloorHideComponent component, AnchorStateChangedEvent args) + private void HandleAnchorChanged(EntityUid uid, SubFloorHideComponent component, ref AnchorStateChangedEvent args) { var transform = ComponentManager.GetComponent(uid); diff --git a/RobustToolbox b/RobustToolbox index 5594bd7203..e5013d9e3f 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 5594bd7203ac3dc08aa23f9cbeaf72c19437f0ea +Subproject commit e5013d9e3f4e373dffbd5604e14820daa6acd53e