From 78a4ab6eb289467ba651c4139fa79943dc5a87a2 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 14 Sep 2022 17:26:26 +1000 Subject: [PATCH] Update for collision events by-ref (#10933) --- Content.Client/Maps/GridDraggingSystem.cs | 1 + Content.Client/Movement/Systems/JetpackSystem.cs | 1 + .../Physics/Controllers/MoverController.cs | 1 + Content.Client/Shuttles/UI/RadarControl.cs | 1 + .../Shuttles/UI/ShuttleConsoleWindow.xaml.cs | 1 + .../Weapons/Ranged/Systems/FlyBySoundSystem.cs | 3 ++- .../Weapons/Ranged/Systems/TetherGunSystem.cs | 1 + Content.IntegrationTests/Tests/ShuttleTest.cs | 1 + .../Tests/Utility/EntitySystemExtensionsTest.cs | 1 + .../Systems/AdminVerbSystem.Smites.cs | 1 + .../Systems/AdminVerbSystem.Tools.cs | 1 + .../AtmosphereSystem.HighPressureDelta.cs | 1 + .../EntitySystems/AtmosphereSystem.Monstermos.cs | 1 + .../EntitySystems/AtmosphereSystem.Processing.cs | 1 + .../Atmos/EntitySystems/AtmosphereSystem.cs | 1 + .../Atmos/EntitySystems/AutomaticAtmosSystem.cs | 1 + .../Atmos/EntitySystems/FlammableSystem.cs | 7 +++++-- Content.Server/Atmos/Miasma/MiasmaSystem.cs | 1 + .../EntitySystems/SolutionInjectOnCollideSystem.cs | 3 ++- .../Chemistry/EntitySystems/VaporSystem.cs | 4 +++- Content.Server/Climbing/ClimbSystem.cs | 5 ++++- Content.Server/Cloning/CloningSystem.cs | 1 + Content.Server/Construction/AnchorableSystem.cs | 1 + Content.Server/Contests/ContestsSystem.cs | 1 + .../Systems/DamageOnHighSpeedImpactSystem.cs | 3 ++- Content.Server/Damage/Systems/StaminaSystem.cs | 3 ++- .../Tube/Components/DisposalTaggerComponent.cs | 1 + .../Unit/EntitySystems/DisposalUnitSystem.cs | 2 ++ Content.Server/Doors/Systems/DoorSystem.cs | 4 +++- .../Electrocution/ElectrocutionSystem.cs | 3 ++- .../Components/TriggerOnProximityComponent.cs | 1 + .../EntitySystems/ExplosionSystem.Processing.cs | 1 + .../EntitySystems/ExplosionSystem.TileFill.cs | 5 +++-- .../EntitySystems/TriggerSystem.Proximity.cs | 6 ++++-- .../EntitySystems/TriggerSystem.TimedCollide.cs | 5 +++-- .../Explosion/EntitySystems/TriggerSystem.cs | 4 +++- Content.Server/Ghost/GhostSystem.cs | 5 +++-- Content.Server/ImmovableRod/ImmovableRodSystem.cs | 4 +++- Content.Server/Magic/MagicSystem.cs | 1 + Content.Server/Maps/GridDraggingSystem.cs | 1 + .../BiomassReclaimer/BiomassReclaimerSystem.cs | 1 + Content.Server/Mousetrap/MousetrapSystem.cs | 1 + .../HTN/PrimitiveTasks/Operators/MoveToOperator.cs | 1 + .../NPC/Pathfinding/PathfindingSystem.Grid.cs | 2 ++ .../NPC/Pathfinding/PathfindingSystem.cs | 1 + .../NPC/Systems/NPCCombatSystem.Ranged.cs | 1 + Content.Server/NPC/Systems/NPCSteeringSystem.cs | 3 +++ .../Components/ParticleProjectileComponent.cs | 1 + .../ParticleAcceleratorSystem.Parts.cs | 2 ++ .../Physics/Controllers/ConveyorController.cs | 7 +++++-- .../Physics/Controllers/MoverController.cs | 1 + .../Physics/Controllers/PullController.cs | 1 + .../Physics/Controllers/SingularityController.cs | 1 + .../Systems/PolymorphableSystem.Collide.cs | 3 ++- .../Power/EntitySystems/ExtensionCableSystem.cs | 1 + .../Projectiles/SharedProjectileSystem.cs | 3 ++- Content.Server/Recycling/RecyclerSystem.cs | 3 ++- .../EntitySystems/RevenantSystem.Abilities.cs | 1 + .../Shuttles/Systems/DockingSystem.AutoDock.cs | 1 + Content.Server/Shuttles/Systems/DockingSystem.cs | 2 ++ .../Shuttles/Systems/ShuttleConsoleSystem.cs | 1 + .../Systems/ShuttleSystem.EmergencyShuttle.cs | 1 + .../Systems/ShuttleSystem.FasterThanLight.cs | 1 + Content.Server/Shuttles/Systems/ShuttleSystem.cs | 2 ++ .../Shuttles/Systems/SpaceGarbageSystem.cs | 3 ++- Content.Server/Shuttles/Systems/ThrusterSystem.cs | 7 +++++-- .../ContainmentFieldGeneratorSystem.cs | 4 +++- .../EntitySystems/ContainmentFieldSystem.cs | 4 +++- .../Singularity/EntitySystems/EmitterSystem.cs | 1 + .../EntitySystems/SingularityGeneratorSystem.cs | 3 ++- .../Singularity/EntitySystems/SingularitySystem.cs | 10 ++++++---- .../Solar/EntitySystems/PowerSolarSystem.cs | 1 + Content.Server/Standing/StandingStateSystem.cs | 1 + Content.Server/StationEvents/Events/MeteorSwarm.cs | 1 + .../Stunnable/Systems/StunOnCollideSystem.cs | 3 ++- Content.Server/Tiles/FloorTileSystem.cs | 1 + Content.Server/Weapon/Melee/MeleeWeaponSystem.cs | 1 + Content.Server/Weapon/Ranged/Systems/GunSystem.cs | 1 + .../Weapon/Ranged/Systems/TetherGunSystem.cs | 2 ++ Content.Shared/Blocking/BlockingSystem.cs | 2 ++ Content.Shared/Buckle/SharedBuckleSystem.cs | 5 +++-- .../Construction/Conditions/WallmountCondition.cs | 1 + .../Disposal/SharedDisposalUnitSystem.cs | 7 ++++--- Content.Shared/Doors/Systems/SharedDoorSystem.cs | 9 ++++++--- Content.Shared/Friction/TileFrictionController.cs | 2 ++ Content.Shared/Gravity/SharedGravitySystem.cs | 1 + .../EntitySystems/SharedHandsSystem.Pickup.cs | 1 + .../Interaction/SharedInteractionSystem.cs | 2 ++ Content.Shared/Maps/TurfHelpers.cs | 1 + .../EntitySystems/SharedMobStateSystem.Dead.cs | 1 + .../Components/MovementIgnoreGravityComponent.cs | 1 + .../Movement/Systems/SharedMoverController.cs | 2 ++ .../Movement/Systems/SlowContactsSystem.cs | 7 +++++-- .../Physics/SharedPreventCollideSystem.cs | 5 +++-- .../Projectiles/SharedProjectileSystem.cs | 6 +++--- .../Systems/SharedPullingStateManagementSystem.cs | 2 ++ .../Pulling/Systems/SharedPullingSystem.Actions.cs | 1 + .../Singularity/SharedSingularitySystem.cs | 14 ++++++++------ Content.Shared/Slippery/SlipperySystem.cs | 1 + Content.Shared/Spawning/EntitySystemExtensions.cs | 1 + .../StepTrigger/Systems/StepTriggerSystem.cs | 4 +++- Content.Shared/Throwing/ThrowingSystem.cs | 1 + Content.Shared/Throwing/ThrownItemSystem.cs | 11 +++++++---- .../Ranged/Systems/SharedFlyBySoundSystem.cs | 2 ++ .../Weapons/Ranged/Systems/SharedGunSystem.cs | 1 + 105 files changed, 204 insertions(+), 62 deletions(-) diff --git a/Content.Client/Maps/GridDraggingSystem.cs b/Content.Client/Maps/GridDraggingSystem.cs index 843f7bf5c5..3ea4838d33 100644 --- a/Content.Client/Maps/GridDraggingSystem.cs +++ b/Content.Client/Maps/GridDraggingSystem.cs @@ -4,6 +4,7 @@ using Robust.Client.Graphics; using Robust.Client.Input; using Robust.Shared.Input; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Client.Maps; diff --git a/Content.Client/Movement/Systems/JetpackSystem.cs b/Content.Client/Movement/Systems/JetpackSystem.cs index 8c48b55694..8f5da00399 100644 --- a/Content.Client/Movement/Systems/JetpackSystem.cs +++ b/Content.Client/Movement/Systems/JetpackSystem.cs @@ -7,6 +7,7 @@ using Robust.Client.Animations; using Robust.Client.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Client.Movement.Systems; diff --git a/Content.Client/Physics/Controllers/MoverController.cs b/Content.Client/Physics/Controllers/MoverController.cs index b023b835c6..85068682bf 100644 --- a/Content.Client/Physics/Controllers/MoverController.cs +++ b/Content.Client/Physics/Controllers/MoverController.cs @@ -3,6 +3,7 @@ using Content.Shared.Movement.Systems; using Content.Shared.Pulling.Components; using Robust.Client.Player; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Client.Physics.Controllers diff --git a/Content.Client/Shuttles/UI/RadarControl.cs b/Content.Client/Shuttles/UI/RadarControl.cs index bae89116cb..08e8ec4a74 100644 --- a/Content.Client/Shuttles/UI/RadarControl.cs +++ b/Content.Client/Shuttles/UI/RadarControl.cs @@ -7,6 +7,7 @@ using Robust.Client.UserInterface.Controls; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision.Shapes; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs b/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs index c467d2780e..634920b41a 100644 --- a/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs @@ -9,6 +9,7 @@ using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs b/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs index 1c82c5ed05..d92fc587f7 100644 --- a/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Weapons.Ranged.Systems; using Robust.Client.Player; using Robust.Shared.Audio; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; using Robust.Shared.Random; @@ -21,7 +22,7 @@ public sealed class FlyBySoundSystem : SharedFlyBySoundSystem SubscribeLocalEvent(OnCollide); } - private void OnCollide(EntityUid uid, FlyBySoundComponent component, StartCollideEvent args) + private void OnCollide(EntityUid uid, FlyBySoundComponent component, ref StartCollideEvent args) { var attachedEnt = _player.LocalPlayer?.ControlledEntity; diff --git a/Content.Client/Weapons/Ranged/Systems/TetherGunSystem.cs b/Content.Client/Weapons/Ranged/Systems/TetherGunSystem.cs index 02e06617a1..c9cb6eb0fd 100644 --- a/Content.Client/Weapons/Ranged/Systems/TetherGunSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/TetherGunSystem.cs @@ -5,6 +5,7 @@ using Robust.Client.Graphics; using Robust.Client.Input; using Robust.Shared.Input; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Client.Weapons.Ranged.Systems; diff --git a/Content.IntegrationTests/Tests/ShuttleTest.cs b/Content.IntegrationTests/Tests/ShuttleTest.cs index e886257177..262dacd7a2 100644 --- a/Content.IntegrationTests/Tests/ShuttleTest.cs +++ b/Content.IntegrationTests/Tests/ShuttleTest.cs @@ -6,6 +6,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; namespace Content.IntegrationTests.Tests { diff --git a/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs b/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs index 95d326f2d4..da8524ce34 100644 --- a/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs +++ b/Content.IntegrationTests/Tests/Utility/EntitySystemExtensionsTest.cs @@ -7,6 +7,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Systems; namespace Content.IntegrationTests.Tests.Utility { diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs index 9c5e9ac94c..8ba5cea1fa 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs @@ -45,6 +45,7 @@ using Content.Shared.Verbs; using Robust.Server.GameObjects; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Utility; diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs index c0fbe24696..8536da79cf 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs @@ -31,6 +31,7 @@ using Robust.Server.GameObjects; using Robust.Server.Physics; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Prototypes; namespace Content.Server.Administration.Systems; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs index 1ce6ee0002..b18b30bbaf 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs @@ -6,6 +6,7 @@ using Content.Shared.Physics; using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Utility; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs index 7be214e184..c054946b41 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs @@ -4,6 +4,7 @@ using Content.Server.Doors.Systems; using Content.Shared.Atmos; using Content.Shared.Database; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Random; using Robust.Shared.Utility; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs index b479241a69..9a3b4534e6 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs @@ -4,6 +4,7 @@ using Content.Server.NodeContainer.NodeGroups; using Content.Shared.Atmos; using Content.Shared.Maps; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Server.Atmos.EntitySystems diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs index 901154ba22..c05768c6a9 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs @@ -8,6 +8,7 @@ using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Containers; using Robust.Shared.Map; +using Robust.Shared.Physics.Systems; using Robust.Shared.Random; namespace Content.Server.Atmos.EntitySystems; diff --git a/Content.Server/Atmos/EntitySystems/AutomaticAtmosSystem.cs b/Content.Server/Atmos/EntitySystems/AutomaticAtmosSystem.cs index bdd7c943cd..aabe4a598f 100644 --- a/Content.Server/Atmos/EntitySystems/AutomaticAtmosSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AutomaticAtmosSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Atmos.Components; using Content.Server.Shuttles.Systems; using Content.Shared.Maps; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; namespace Content.Server.Atmos.EntitySystems; diff --git a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs index 8957481e12..9d4b21020d 100644 --- a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs +++ b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs @@ -20,7 +20,10 @@ using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; namespace Content.Server.Atmos.EntitySystems { @@ -73,7 +76,7 @@ namespace Content.Server.Atmos.EntitySystems } - private void IgniteOnCollide(EntityUid uid, IgniteOnCollideComponent component, StartCollideEvent args) + private void IgniteOnCollide(EntityUid uid, IgniteOnCollideComponent component, ref StartCollideEvent args) { var otherFixture = args.OtherFixture.Body.Owner; @@ -116,7 +119,7 @@ namespace Content.Server.Atmos.EntitySystems args.Handled = true; } - private void OnCollideEvent(EntityUid uid, FlammableComponent flammable, StartCollideEvent args) + private void OnCollideEvent(EntityUid uid, FlammableComponent flammable, ref StartCollideEvent args) { var otherUid = args.OtherFixture.Body.Owner; diff --git a/Content.Server/Atmos/Miasma/MiasmaSystem.cs b/Content.Server/Atmos/Miasma/MiasmaSystem.cs index 3e5ba01e02..fb3c225c87 100644 --- a/Content.Server/Atmos/Miasma/MiasmaSystem.cs +++ b/Content.Server/Atmos/Miasma/MiasmaSystem.cs @@ -8,6 +8,7 @@ using Content.Shared.Examine; using Robust.Server.GameObjects; using Content.Shared.Tag; using Robust.Shared.Containers; +using Robust.Shared.Physics.Components; using Robust.Shared.Random; namespace Content.Server.Atmos.Miasma diff --git a/Content.Server/Chemistry/EntitySystems/SolutionInjectOnCollideSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionInjectOnCollideSystem.cs index 82c407777e..588cfb84fc 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionInjectOnCollideSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionInjectOnCollideSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Chemistry.Components.SolutionManager; using Content.Shared.Inventory; using JetBrains.Annotations; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Prototypes; @@ -31,7 +32,7 @@ namespace Content.Server.Chemistry.EntitySystems .EnsureComponentWarn($"{nameof(SolutionInjectOnCollideComponent)} requires a SolutionContainerManager on {component.Owner}!"); } - private void HandleInjection(EntityUid uid, SolutionInjectOnCollideComponent component, StartCollideEvent args) + private void HandleInjection(EntityUid uid, SolutionInjectOnCollideComponent component, ref StartCollideEvent args) { var target = args.OtherFixture.Body.Owner; diff --git a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs index 89f0d54058..75cffa6270 100644 --- a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs @@ -9,7 +9,9 @@ using Content.Shared.Throwing; using Content.Shared.Vapor; using JetBrains.Annotations; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Prototypes; namespace Content.Server.Chemistry.EntitySystems @@ -30,7 +32,7 @@ namespace Content.Server.Chemistry.EntitySystems SubscribeLocalEvent(HandleCollide); } - private void HandleCollide(EntityUid uid, VaporComponent component, StartCollideEvent args) + private void HandleCollide(EntityUid uid, VaporComponent component, ref StartCollideEvent args) { if (!EntityManager.TryGetComponent(uid, out SolutionContainerManagerComponent? contents)) return; diff --git a/Content.Server/Climbing/ClimbSystem.cs b/Content.Server/Climbing/ClimbSystem.cs index d389859df4..e1459adf96 100644 --- a/Content.Server/Climbing/ClimbSystem.cs +++ b/Content.Server/Climbing/ClimbSystem.cs @@ -25,7 +25,10 @@ using Robust.Shared.Configuration; using Robust.Shared.GameStates; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision.Shapes; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using SharpZstd.Interop; @@ -221,7 +224,7 @@ public sealed class ClimbSystem : SharedClimbSystem return true; } - private void OnClimbEndCollide(EntityUid uid, ClimbingComponent component, EndCollideEvent args) + private void OnClimbEndCollide(EntityUid uid, ClimbingComponent component, ref EndCollideEvent args) { if (args.OurFixture.ID != ClimbingFixtureName || !component.IsClimbing diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 354c442434..e8c01ca3de 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -30,6 +30,7 @@ using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Configuration; using Robust.Shared.Containers; +using Robust.Shared.Physics.Components; namespace Content.Server.Cloning.Systems diff --git a/Content.Server/Construction/AnchorableSystem.cs b/Content.Server/Construction/AnchorableSystem.cs index 65a6803919..93b8b1acf4 100644 --- a/Content.Server/Construction/AnchorableSystem.cs +++ b/Content.Server/Construction/AnchorableSystem.cs @@ -11,6 +11,7 @@ using Content.Shared.Examine; using Content.Shared.Pulling.Components; using Content.Shared.Tools.Components; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; namespace Content.Server.Construction diff --git a/Content.Server/Contests/ContestsSystem.cs b/Content.Server/Contests/ContestsSystem.cs index 5598716280..5850d68d02 100644 --- a/Content.Server/Contests/ContestsSystem.cs +++ b/Content.Server/Contests/ContestsSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Damage; using Content.Shared.MobState.EntitySystems; using Content.Shared.MobState.Components; using Content.Server.Damage.Components; +using Robust.Shared.Physics.Components; namespace Content.Server.Contests { diff --git a/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs b/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs index 054844e13c..3bc08d4bb3 100644 --- a/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs +++ b/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Damage; using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Timing; @@ -25,7 +26,7 @@ namespace Content.Server.Damage.Systems SubscribeLocalEvent(HandleCollide); } - private void HandleCollide(EntityUid uid, DamageOnHighSpeedImpactComponent component, StartCollideEvent args) + private void HandleCollide(EntityUid uid, DamageOnHighSpeedImpactComponent component, ref StartCollideEvent args) { if (!EntityManager.HasComponent(uid)) return; diff --git a/Content.Server/Damage/Systems/StaminaSystem.cs b/Content.Server/Damage/Systems/StaminaSystem.cs index c5ed27f303..4c34746bde 100644 --- a/Content.Server/Damage/Systems/StaminaSystem.cs +++ b/Content.Server/Damage/Systems/StaminaSystem.cs @@ -16,6 +16,7 @@ using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Audio; using Robust.Shared.Random; +using Robust.Shared.Physics.Events; namespace Content.Server.Damage.Systems; @@ -130,7 +131,7 @@ public sealed class StaminaSystem : EntitySystem } } - private void OnCollide(EntityUid uid, StaminaDamageOnCollideComponent component, StartCollideEvent args) + private void OnCollide(EntityUid uid, StaminaDamageOnCollideComponent component, ref StartCollideEvent args) { if (!args.OurFixture.ID.Equals(CollideFixture)) return; diff --git a/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs b/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs index cd31691e32..a60062fa79 100644 --- a/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs +++ b/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs @@ -3,6 +3,7 @@ using Content.Server.UserInterface; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using static Content.Shared.Disposal.Components.SharedDisposalTaggerComponent; diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 41eaf72b64..40f3e6cac2 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -25,6 +25,8 @@ using Content.Shared.Verbs; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Containers; +using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Random; diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs index c92030db92..b8efec801b 100644 --- a/Content.Server/Doors/Systems/DoorSystem.cs +++ b/Content.Server/Doors/Systems/DoorSystem.cs @@ -21,6 +21,8 @@ using Robust.Shared.Containers; using Robust.Shared.Physics.Dynamics; using Robust.Shared.Player; using System.Linq; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Events; namespace Content.Server.Doors.Systems; @@ -256,7 +258,7 @@ public sealed class DoorSystem : SharedDoorSystem /// Open a door if a player or door-bumper (PDA, ID-card) collide with the door. Sadly, bullets no longer /// generate "access denied" sounds as you fire at a door. /// - protected override void HandleCollide(EntityUid uid, DoorComponent door, StartCollideEvent args) + protected override void HandleCollide(EntityUid uid, DoorComponent door, ref StartCollideEvent args) { // TODO ACCESS READER move access reader to shared and predict door opening/closing // Then this can be moved to the shared system without mispredicting. diff --git a/Content.Server/Electrocution/ElectrocutionSystem.cs b/Content.Server/Electrocution/ElectrocutionSystem.cs index 1fb7bbaf51..9d725ad6fe 100644 --- a/Content.Server/Electrocution/ElectrocutionSystem.cs +++ b/Content.Server/Electrocution/ElectrocutionSystem.cs @@ -23,6 +23,7 @@ using Content.Shared.Tag; using Content.Shared.Weapons.Melee; using Robust.Shared.Audio; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -115,7 +116,7 @@ namespace Content.Server.Electrocution } } - private void OnElectrifiedStartCollide(EntityUid uid, ElectrifiedComponent electrified, StartCollideEvent args) + private void OnElectrifiedStartCollide(EntityUid uid, ElectrifiedComponent electrified, ref StartCollideEvent args) { if (!electrified.OnBump) return; diff --git a/Content.Server/Explosion/Components/TriggerOnProximityComponent.cs b/Content.Server/Explosion/Components/TriggerOnProximityComponent.cs index 10361e4d8e..760f6a444a 100644 --- a/Content.Server/Explosion/Components/TriggerOnProximityComponent.cs +++ b/Content.Server/Explosion/Components/TriggerOnProximityComponent.cs @@ -1,6 +1,7 @@ using Content.Server.Explosion.EntitySystems; using Robust.Shared.Physics.Collision.Shapes; using Content.Shared.Explosion; +using Robust.Shared.Physics.Components; namespace Content.Server.Explosion.Components { diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs index ef0612ec5e..99f83587c1 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs @@ -5,6 +5,7 @@ using Content.Shared.Maps; using Content.Shared.Physics; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Random; using Robust.Shared.Timing; diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs index cd3d037efd..c4586d7004 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs @@ -2,6 +2,7 @@ using System.Linq; using Content.Shared.Administration; using Content.Shared.Explosion; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Server.Explosion.EntitySystems; @@ -12,7 +13,7 @@ namespace Content.Server.Explosion.EntitySystems; public sealed partial class ExplosionSystem : EntitySystem { /// - /// This is the main explosion generating function. + /// This is the main explosion generating function. /// /// The center of the explosion /// The explosion type. this determines the explosion damage @@ -124,7 +125,7 @@ public sealed partial class ExplosionSystem : EntitySystem if (totalIntensity < stepSize) // Bit anticlimactic. All that set up for nothing.... return (1, new List { totalIntensity }, spaceData, gridData, spaceMatrix); - + // These variables keep track of the total intensity we have distributed List tilesInIteration = new() { 1 }; List iterationIntensity = new() {stepSize}; diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.Proximity.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.Proximity.cs index 7fa019a105..bbdc577d1f 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.Proximity.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.Proximity.cs @@ -1,7 +1,9 @@ using Content.Server.Explosion.Components; using Content.Shared.Physics; using Content.Shared.Trigger; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Utility; namespace Content.Server.Explosion.EntitySystems; @@ -64,7 +66,7 @@ public sealed partial class TriggerSystem }); } - private void OnProximityStartCollide(EntityUid uid, TriggerOnProximityComponent component, StartCollideEvent args) + private void OnProximityStartCollide(EntityUid uid, TriggerOnProximityComponent component, ref StartCollideEvent args) { if (args.OurFixture.ID != TriggerOnProximityComponent.FixtureID) return; @@ -72,7 +74,7 @@ public sealed partial class TriggerSystem component.Colliding.Add(args.OtherFixture.Body); } - private static void OnProximityEndCollide(EntityUid uid, TriggerOnProximityComponent component, EndCollideEvent args) + private static void OnProximityEndCollide(EntityUid uid, TriggerOnProximityComponent component, ref EndCollideEvent args) { if (args.OurFixture.ID != TriggerOnProximityComponent.FixtureID) return; diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs index 3251702469..2c3ecc605a 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.TimedCollide.cs @@ -2,6 +2,7 @@ using Content.Server.Explosion.Components; using Content.Server.Explosion.EntitySystems; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; namespace Content.Server.Explosion.EntitySystems; @@ -14,7 +15,7 @@ public sealed partial class TriggerSystem SubscribeLocalEvent(OnComponentRemove); } - private void OnTimerCollide(EntityUid uid, TriggerOnTimedCollideComponent component, StartCollideEvent args) + private void OnTimerCollide(EntityUid uid, TriggerOnTimedCollideComponent component, ref StartCollideEvent args) { //Ensures the entity trigger will have an active component EnsureComp(uid); @@ -24,7 +25,7 @@ public sealed partial class TriggerSystem component.Colliding.Add(otherUID, 0); } - private void OnTimerEndCollide(EntityUid uid, TriggerOnTimedCollideComponent component, EndCollideEvent args) + private void OnTimerEndCollide(EntityUid uid, TriggerOnTimedCollideComponent component, ref EndCollideEvent args) { var otherUID = args.OtherFixture.Body.Owner; component.Colliding.Remove(otherUID); diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs index 57541b289a..cd02f5321a 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs @@ -19,6 +19,8 @@ using Content.Shared.Payload.Components; using Content.Shared.StepTrigger.Systems; using Robust.Server.Containers; using Robust.Shared.Containers; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; namespace Content.Server.Explosion.EntitySystems { @@ -86,7 +88,7 @@ namespace Content.Server.Explosion.EntitySystems args.Handled = true; } - private void OnTriggerCollide(EntityUid uid, TriggerOnCollideComponent component, StartCollideEvent args) + private void OnTriggerCollide(EntityUid uid, TriggerOnCollideComponent component, ref StartCollideEvent args) { if(args.OurFixture.ID == component.FixtureID) Trigger(component.Owner); diff --git a/Content.Server/Ghost/GhostSystem.cs b/Content.Server/Ghost/GhostSystem.cs index b92b8e298e..cea7bb30c1 100644 --- a/Content.Server/Ghost/GhostSystem.cs +++ b/Content.Server/Ghost/GhostSystem.cs @@ -16,6 +16,7 @@ using Content.Shared.Movement.Events; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Server.Player; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Server.Ghost @@ -195,7 +196,7 @@ namespace Content.Server.Ghost _followerSystem.StartFollowingEntity(ghost.Owner, msg.Target); return; } - + var xform = Transform(ghost.Owner); xform.Coordinates = Transform(msg.Target).Coordinates; xform.AttachToGridOrMap(); @@ -231,7 +232,7 @@ namespace Content.Server.Ghost if (player.AttachedEntity is {Valid: true} attached) { if (attached == except) continue; - + TryComp(attached, out var mind); string playerInfo = $"{EntityManager.GetComponent(attached).EntityName} ({mind?.Mind?.CurrentJob?.Name ?? "Unknown"})"; diff --git a/Content.Server/ImmovableRod/ImmovableRodSystem.cs b/Content.Server/ImmovableRod/ImmovableRodSystem.cs index 4889ac31bd..b1c2acbca6 100644 --- a/Content.Server/ImmovableRod/ImmovableRodSystem.cs +++ b/Content.Server/ImmovableRod/ImmovableRodSystem.cs @@ -4,7 +4,9 @@ using Content.Shared.Examine; using Content.Shared.Popups; using Robust.Shared.Audio; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; using Robust.Shared.Random; @@ -64,7 +66,7 @@ public sealed class ImmovableRodSystem : EntitySystem } } - private void OnCollide(EntityUid uid, ImmovableRodComponent component, StartCollideEvent args) + private void OnCollide(EntityUid uid, ImmovableRodComponent component, ref StartCollideEvent args) { var ent = args.OtherFixture.Body.Owner; diff --git a/Content.Server/Magic/MagicSystem.cs b/Content.Server/Magic/MagicSystem.cs index ddb0afc1d5..e34d99dcd6 100644 --- a/Content.Server/Magic/MagicSystem.cs +++ b/Content.Server/Magic/MagicSystem.cs @@ -20,6 +20,7 @@ using Content.Shared.Spawners.Components; using Content.Shared.Storage; using Robust.Shared.Audio; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; diff --git a/Content.Server/Maps/GridDraggingSystem.cs b/Content.Server/Maps/GridDraggingSystem.cs index 3c6ebf005e..55c8fbea46 100644 --- a/Content.Server/Maps/GridDraggingSystem.cs +++ b/Content.Server/Maps/GridDraggingSystem.cs @@ -3,6 +3,7 @@ using Robust.Server.Console; using Robust.Server.Player; using Robust.Shared.Players; using Robust.Shared.Utility; +using Robust.Shared.Physics.Components; namespace Content.Server.Maps; diff --git a/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs b/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs index c0c0e93a20..899dda2065 100644 --- a/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs +++ b/Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs @@ -23,6 +23,7 @@ using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Configuration; using Robust.Server.Player; +using Robust.Shared.Physics.Components; namespace Content.Server.Medical.BiomassReclaimer { diff --git a/Content.Server/Mousetrap/MousetrapSystem.cs b/Content.Server/Mousetrap/MousetrapSystem.cs index 3d32130433..f10eb1747f 100644 --- a/Content.Server/Mousetrap/MousetrapSystem.cs +++ b/Content.Server/Mousetrap/MousetrapSystem.cs @@ -6,6 +6,7 @@ using Content.Shared.Inventory; using Content.Shared.Mousetrap; using Content.Shared.StepTrigger; using Content.Shared.StepTrigger.Systems; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; namespace Content.Server.Mousetrap; diff --git a/Content.Server/NPC/HTN/PrimitiveTasks/Operators/MoveToOperator.cs b/Content.Server/NPC/HTN/PrimitiveTasks/Operators/MoveToOperator.cs index 73b1d595d4..c16b1ae445 100644 --- a/Content.Server/NPC/HTN/PrimitiveTasks/Operators/MoveToOperator.cs +++ b/Content.Server/NPC/HTN/PrimitiveTasks/Operators/MoveToOperator.cs @@ -5,6 +5,7 @@ using Content.Server.NPC.Pathfinding; using Content.Server.NPC.Pathfinding.Pathfinders; using Content.Server.NPC.Systems; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators; diff --git a/Content.Server/NPC/Pathfinding/PathfindingSystem.Grid.cs b/Content.Server/NPC/Pathfinding/PathfindingSystem.Grid.cs index 4ff7eef4bf..a233af262a 100644 --- a/Content.Server/NPC/Pathfinding/PathfindingSystem.Grid.cs +++ b/Content.Server/NPC/Pathfinding/PathfindingSystem.Grid.cs @@ -3,6 +3,8 @@ using Content.Shared.Access.Systems; using Content.Shared.GameTicking; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Events; using Robust.Shared.Utility; namespace Content.Server.NPC.Pathfinding; diff --git a/Content.Server/NPC/Pathfinding/PathfindingSystem.cs b/Content.Server/NPC/Pathfinding/PathfindingSystem.cs index 73be3ba3c3..046e631b4f 100644 --- a/Content.Server/NPC/Pathfinding/PathfindingSystem.cs +++ b/Content.Server/NPC/Pathfinding/PathfindingSystem.cs @@ -5,6 +5,7 @@ using Content.Server.NPC.Pathfinding.Pathfinders; using Content.Shared.Access.Systems; using Content.Shared.Physics; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; namespace Content.Server.NPC.Pathfinding { diff --git a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs index 8ed27051f5..42b0011bbb 100644 --- a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs +++ b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs @@ -2,6 +2,7 @@ using Content.Server.NPC.Components; using Content.Shared.CombatMode; using Content.Shared.Interaction; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; namespace Content.Server.NPC.Systems; diff --git a/Content.Server/NPC/Systems/NPCSteeringSystem.cs b/Content.Server/NPC/Systems/NPCSteeringSystem.cs index fc50262218..48a63e51e2 100644 --- a/Content.Server/NPC/Systems/NPCSteeringSystem.cs +++ b/Content.Server/NPC/Systems/NPCSteeringSystem.cs @@ -9,6 +9,9 @@ using Content.Shared.CCVar; using Content.Shared.Movement.Components; using Robust.Shared.Configuration; using Robust.Shared.Map; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; using Robust.Shared.Timing; namespace Content.Server.NPC.Systems diff --git a/Content.Server/ParticleAccelerator/Components/ParticleProjectileComponent.cs b/Content.Server/ParticleAccelerator/Components/ParticleProjectileComponent.cs index 1d69f7d08e..7018d10bda 100644 --- a/Content.Server/ParticleAccelerator/Components/ParticleProjectileComponent.cs +++ b/Content.Server/ParticleAccelerator/Components/ParticleProjectileComponent.cs @@ -2,6 +2,7 @@ using Content.Server.Projectiles; using Content.Server.Projectiles.Components; using Content.Server.Singularity.Components; using Content.Shared.Singularity.Components; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Server.ParticleAccelerator.Components diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs index dcfeff5985..771d2a2d9a 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs @@ -1,5 +1,7 @@ using Content.Server.ParticleAccelerator.Components; using JetBrains.Annotations; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Events; namespace Content.Server.ParticleAccelerator.EntitySystems { diff --git a/Content.Server/Physics/Controllers/ConveyorController.cs b/Content.Server/Physics/Controllers/ConveyorController.cs index d84922bf7b..0574c9d62a 100644 --- a/Content.Server/Physics/Controllers/ConveyorController.cs +++ b/Content.Server/Physics/Controllers/ConveyorController.cs @@ -14,8 +14,11 @@ using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision.Shapes; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Controllers; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; namespace Content.Server.Physics.Controllers { @@ -43,7 +46,7 @@ namespace Content.Server.Physics.Controllers base.Initialize(); } - private void OnConveyorEndCollide(EntityUid uid, ConveyorComponent component, EndCollideEvent args) + private void OnConveyorEndCollide(EntityUid uid, ConveyorComponent component, ref EndCollideEvent args) { component.Intersecting.Remove(args.OtherFixture.Body.Owner); @@ -53,7 +56,7 @@ namespace Content.Server.Physics.Controllers } } - private void OnConveyorStartCollide(EntityUid uid, ConveyorComponent component, StartCollideEvent args) + private void OnConveyorStartCollide(EntityUid uid, ConveyorComponent component, ref StartCollideEvent args) { var otherUid = args.OtherFixture.Body.Owner; diff --git a/Content.Server/Physics/Controllers/MoverController.cs b/Content.Server/Physics/Controllers/MoverController.cs index a8fc3e298d..7a95f14f05 100644 --- a/Content.Server/Physics/Controllers/MoverController.cs +++ b/Content.Server/Physics/Controllers/MoverController.cs @@ -6,6 +6,7 @@ using Content.Shared.Movement.Systems; using Content.Shared.Shuttles.Components; using Content.Shared.Shuttles.Systems; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; namespace Content.Server.Physics.Controllers diff --git a/Content.Server/Physics/Controllers/PullController.cs b/Content.Server/Physics/Controllers/PullController.cs index 4254b6cc3d..cec6851e87 100644 --- a/Content.Server/Physics/Controllers/PullController.cs +++ b/Content.Server/Physics/Controllers/PullController.cs @@ -2,6 +2,7 @@ using Content.Shared.Pulling.Components; using Content.Shared.Rotatable; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Controllers; namespace Content.Server.Physics.Controllers diff --git a/Content.Server/Physics/Controllers/SingularityController.cs b/Content.Server/Physics/Controllers/SingularityController.cs index dd2b3437bf..3ab436b77d 100644 --- a/Content.Server/Physics/Controllers/SingularityController.cs +++ b/Content.Server/Physics/Controllers/SingularityController.cs @@ -1,5 +1,6 @@ using Content.Server.Singularity.Components; using Robust.Server.GameObjects; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Controllers; using Robust.Shared.Random; diff --git a/Content.Server/Polymorph/Systems/PolymorphableSystem.Collide.cs b/Content.Server/Polymorph/Systems/PolymorphableSystem.Collide.cs index 894cb2c5a9..82cda8355c 100644 --- a/Content.Server/Polymorph/Systems/PolymorphableSystem.Collide.cs +++ b/Content.Server/Polymorph/Systems/PolymorphableSystem.Collide.cs @@ -2,6 +2,7 @@ using Content.Server.Polymorph.Components; using Content.Shared.Projectiles; using Robust.Shared.Audio; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; namespace Content.Server.Polymorph.Systems; @@ -35,7 +36,7 @@ public partial class PolymorphableSystem SubscribeLocalEvent(OnPolymorphCollide); } - private void OnPolymorphCollide(EntityUid uid, PolymorphOnCollideComponent component, StartCollideEvent args) + private void OnPolymorphCollide(EntityUid uid, PolymorphOnCollideComponent component, ref StartCollideEvent args) { if (args.OurFixture.ID != SharedProjectileSystem.ProjectileFixture) return; diff --git a/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs b/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs index b9518ca244..b2e544a5a3 100644 --- a/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs +++ b/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs @@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Server.Power.Components; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; namespace Content.Server.Power.EntitySystems { diff --git a/Content.Server/Projectiles/SharedProjectileSystem.cs b/Content.Server/Projectiles/SharedProjectileSystem.cs index a85d92be00..97c816a852 100644 --- a/Content.Server/Projectiles/SharedProjectileSystem.cs +++ b/Content.Server/Projectiles/SharedProjectileSystem.cs @@ -11,6 +11,7 @@ using Robust.Server.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.Physics.Dynamics; using Robust.Shared.Player; +using Robust.Shared.Physics.Events; using GunSystem = Content.Server.Weapon.Ranged.Systems.GunSystem; namespace Content.Server.Projectiles @@ -35,7 +36,7 @@ namespace Content.Server.Projectiles args.State = new ProjectileComponentState(component.Shooter, component.IgnoreShooter); } - private void OnStartCollide(EntityUid uid, ProjectileComponent component, StartCollideEvent args) + private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref StartCollideEvent args) { // This is so entities that shouldn't get a collision are ignored. if (args.OurFixture.ID != ProjectileFixture || !args.OtherFixture.Hard || component.DamagedEntity) diff --git a/Content.Server/Recycling/RecyclerSystem.cs b/Content.Server/Recycling/RecyclerSystem.cs index 1f42cdefc5..42bd20af69 100644 --- a/Content.Server/Recycling/RecyclerSystem.cs +++ b/Content.Server/Recycling/RecyclerSystem.cs @@ -15,6 +15,7 @@ using Content.Shared.Tag; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; using Robust.Shared.Timing; @@ -80,7 +81,7 @@ namespace Content.Server.Recycling _ambience.SetAmbience(component.Owner, false); } - private void OnCollide(EntityUid uid, RecyclerComponent component, StartCollideEvent args) + private void OnCollide(EntityUid uid, RecyclerComponent component, ref StartCollideEvent args) { if (component.Enabled && args.OurFixture.ID != "brrt") return; diff --git a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs index 84b7697494..131e9ef8b9 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs @@ -26,6 +26,7 @@ using Content.Server.Emag; using Content.Server.Store.Components; using Content.Shared.CharacterAppearance.Components; using Content.Shared.FixedPoint; +using Robust.Shared.Physics.Components; using Robust.Shared.Utility; namespace Content.Server.Revenant.EntitySystems; diff --git a/Content.Server/Shuttles/Systems/DockingSystem.AutoDock.cs b/Content.Server/Shuttles/Systems/DockingSystem.AutoDock.cs index 0f04e3503e..d120ca2b71 100644 --- a/Content.Server/Shuttles/Systems/DockingSystem.AutoDock.cs +++ b/Content.Server/Shuttles/Systems/DockingSystem.AutoDock.cs @@ -1,6 +1,7 @@ using Content.Server.Shuttles.Components; using Content.Shared.Shuttles.Components; using Content.Shared.Shuttles.Events; +using Robust.Shared.Physics.Components; using Robust.Shared.Players; using Robust.Shared.Utility; diff --git a/Content.Server/Shuttles/Systems/DockingSystem.cs b/Content.Server/Shuttles/Systems/DockingSystem.cs index eed5a47b87..0df06f5271 100644 --- a/Content.Server/Shuttles/Systems/DockingSystem.cs +++ b/Content.Server/Shuttles/Systems/DockingSystem.cs @@ -8,8 +8,10 @@ using Content.Shared.Shuttles.Events; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision.Shapes; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; using Robust.Shared.Physics.Dynamics.Joints; +using Robust.Shared.Physics.Systems; using Robust.Shared.Utility; namespace Content.Server.Shuttles.Systems diff --git a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs index 740376a666..9ea7fad4fa 100644 --- a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs @@ -13,6 +13,7 @@ using Content.Shared.Shuttles.Systems; using Content.Shared.Tag; using Robust.Server.GameObjects; using Robust.Shared.GameStates; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs index 5a5f154656..05f7bf653b 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs @@ -17,6 +17,7 @@ using Robust.Shared.Audio; using Robust.Shared.Configuration; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Random; diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index 38a5d3270f..f142a6affd 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -14,6 +14,7 @@ using Robust.Shared.Player; using Robust.Shared.Utility; using System.Diagnostics.CodeAnalysis; using Content.Server.Shuttles.Events; +using Robust.Shared.Physics.Components; namespace Content.Server.Shuttles.Systems; diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.cs index 77ab9ca0cb..f3f60b6315 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.cs @@ -7,6 +7,8 @@ using Robust.Server.GameObjects; using Robust.Shared.Configuration; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; namespace Content.Server.Shuttles.Systems { diff --git a/Content.Server/Shuttles/Systems/SpaceGarbageSystem.cs b/Content.Server/Shuttles/Systems/SpaceGarbageSystem.cs index b6cf554f8a..ca8304e555 100644 --- a/Content.Server/Shuttles/Systems/SpaceGarbageSystem.cs +++ b/Content.Server/Shuttles/Systems/SpaceGarbageSystem.cs @@ -1,6 +1,7 @@ using Content.Server.Shuttles.Components; using Robust.Shared.Physics; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; namespace Content.Server.Shuttles.Systems; @@ -15,7 +16,7 @@ public sealed class SpaceGarbageSystem : EntitySystem SubscribeLocalEvent(OnCollide); } - private void OnCollide(EntityUid uid, SpaceGarbageComponent component, StartCollideEvent args) + private void OnCollide(EntityUid uid, SpaceGarbageComponent component, ref StartCollideEvent args) { if (args.OtherFixture.Body.BodyType != BodyType.Static) return; diff --git a/Content.Server/Shuttles/Systems/ThrusterSystem.cs b/Content.Server/Shuttles/Systems/ThrusterSystem.cs index 6f9948e36a..8fe2760dc7 100644 --- a/Content.Server/Shuttles/Systems/ThrusterSystem.cs +++ b/Content.Server/Shuttles/Systems/ThrusterSystem.cs @@ -15,7 +15,10 @@ using Robust.Server.GameObjects; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision.Shapes; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; using Robust.Shared.Utility; namespace Content.Server.Shuttles.Systems @@ -418,7 +421,7 @@ namespace Content.Server.Shuttles.Systems } } - private void OnStartCollide(EntityUid uid, ThrusterComponent component, StartCollideEvent args) + private void OnStartCollide(EntityUid uid, ThrusterComponent component, ref StartCollideEvent args) { if (args.OurFixture.ID != BurnFixture) return; @@ -426,7 +429,7 @@ namespace Content.Server.Shuttles.Systems component.Colliding.Add((args.OtherFixture.Body).Owner); } - private void OnEndCollide(EntityUid uid, ThrusterComponent component, EndCollideEvent args) + private void OnEndCollide(EntityUid uid, ThrusterComponent component, ref EndCollideEvent args) { if (args.OurFixture.ID != BurnFixture) return; diff --git a/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs b/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs index 1073a58812..c2b8852d46 100644 --- a/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs +++ b/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs @@ -11,6 +11,8 @@ using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Popups; using Content.Shared.Throwing; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; namespace Content.Server.Singularity.EntitySystems; @@ -58,7 +60,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem /// /// A generator receives power from a source colliding with it. /// - private void HandleGeneratorCollide(EntityUid uid, ContainmentFieldGeneratorComponent component, StartCollideEvent args) + private void HandleGeneratorCollide(EntityUid uid, ContainmentFieldGeneratorComponent component, ref StartCollideEvent args) { if (_tags.HasTag(args.OtherFixture.Body.Owner, component.IDTag)) { diff --git a/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs b/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs index d2ea75ce42..36ad1ae746 100644 --- a/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs +++ b/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs @@ -5,7 +5,9 @@ using Content.Shared.Popups; using Content.Shared.Tag; using Content.Shared.Throwing; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Player; namespace Content.Server.Singularity.EntitySystems; @@ -22,7 +24,7 @@ public sealed class ContainmentFieldSystem : EntitySystem SubscribeLocalEvent(HandleFieldCollide); } - private void HandleFieldCollide(EntityUid uid, ContainmentFieldComponent component, StartCollideEvent args) + private void HandleFieldCollide(EntityUid uid, ContainmentFieldComponent component, ref StartCollideEvent args) { var otherBody = args.OtherFixture.Body.Owner; diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs index fca28c7f00..15ffa64847 100644 --- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs @@ -14,6 +14,7 @@ using Content.Shared.Singularity.Components; using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Utility; diff --git a/Content.Server/Singularity/EntitySystems/SingularityGeneratorSystem.cs b/Content.Server/Singularity/EntitySystems/SingularityGeneratorSystem.cs index aa58a4a3a6..d416b075d1 100644 --- a/Content.Server/Singularity/EntitySystems/SingularityGeneratorSystem.cs +++ b/Content.Server/Singularity/EntitySystems/SingularityGeneratorSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Singularity.Components; using Content.Shared.Singularity.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; namespace Content.Server.Singularity.EntitySystems; @@ -14,7 +15,7 @@ public sealed class SingularityGeneratorSystem : EntitySystem SubscribeLocalEvent(HandleParticleCollide); } - private void HandleParticleCollide(EntityUid uid, ParticleProjectileComponent component, StartCollideEvent args) + private void HandleParticleCollide(EntityUid uid, ParticleProjectileComponent component, ref StartCollideEvent args) { if (EntityManager.TryGetComponent(args.OtherFixture.Body.Owner, out var singularityGeneratorComponent)) { diff --git a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs index 919a86a3d3..37c0e44178 100644 --- a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs +++ b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs @@ -8,7 +8,9 @@ using Robust.Server.GameStates; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; namespace Content.Server.Singularity.EntitySystems { @@ -44,9 +46,9 @@ namespace Content.Server.Singularity.EntitySystems _pvs.AddGlobalOverride(uid); } - protected override bool PreventCollide(EntityUid uid, SharedSingularityComponent component, PreventCollideEvent args) + protected override bool PreventCollide(EntityUid uid, SharedSingularityComponent component, ref PreventCollideEvent args) { - if (base.PreventCollide(uid, component, args)) return true; + if (base.PreventCollide(uid, component, ref args)) return true; var otherUid = args.BodyB.Owner; @@ -54,12 +56,12 @@ namespace Content.Server.Singularity.EntitySystems // If it's not cancelled then we'll cancel if we can't immediately destroy it on collision if (!CanDestroy(component, otherUid)) - args.Cancel(); + args.Cancelled = true; return true; } - private void OnCollide(EntityUid uid, ServerSingularityComponent component, StartCollideEvent args) + private void OnCollide(EntityUid uid, ServerSingularityComponent component, ref StartCollideEvent args) { if (args.OurFixture.ID != "DeleteCircle") return; diff --git a/Content.Server/Solar/EntitySystems/PowerSolarSystem.cs b/Content.Server/Solar/EntitySystems/PowerSolarSystem.cs index 833aa24910..74f88bc0d1 100644 --- a/Content.Server/Solar/EntitySystems/PowerSolarSystem.cs +++ b/Content.Server/Solar/EntitySystems/PowerSolarSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.GameTicking; using Content.Shared.Physics; using JetBrains.Annotations; using Robust.Shared.Physics; +using Robust.Shared.Physics.Systems; using Robust.Shared.Random; namespace Content.Server.Solar.EntitySystems diff --git a/Content.Server/Standing/StandingStateSystem.cs b/Content.Server/Standing/StandingStateSystem.cs index 4d4d215bf8..87a127ff62 100644 --- a/Content.Server/Standing/StandingStateSystem.cs +++ b/Content.Server/Standing/StandingStateSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; using Content.Shared.Standing; using Content.Shared.Throwing; +using Robust.Shared.Physics.Components; using Robust.Shared.Random; namespace Content.Server.Standing; diff --git a/Content.Server/StationEvents/Events/MeteorSwarm.cs b/Content.Server/StationEvents/Events/MeteorSwarm.cs index 6fe91db933..525dff4dc8 100644 --- a/Content.Server/StationEvents/Events/MeteorSwarm.cs +++ b/Content.Server/StationEvents/Events/MeteorSwarm.cs @@ -1,6 +1,7 @@ using Content.Server.GameTicking; using Content.Shared.Spawners.Components; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; namespace Content.Server.StationEvents.Events { diff --git a/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs b/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs index d078156abd..f7734622c5 100644 --- a/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs +++ b/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.StatusEffect; using JetBrains.Annotations; using Robust.Shared.Physics.Dynamics; using Content.Shared.Throwing; +using Robust.Shared.Physics.Events; namespace Content.Server.Stunnable { @@ -39,7 +40,7 @@ namespace Content.Server.Stunnable component.WalkSpeedMultiplier, component.RunSpeedMultiplier, status); } } - private void HandleCollide(EntityUid uid, StunOnCollideComponent component, StartCollideEvent args) + private void HandleCollide(EntityUid uid, StunOnCollideComponent component, ref StartCollideEvent args) { if (args.OurFixture.ID != component.FixtureID) return; diff --git a/Content.Server/Tiles/FloorTileSystem.cs b/Content.Server/Tiles/FloorTileSystem.cs index 2ce8786c1e..52fc167283 100644 --- a/Content.Server/Tiles/FloorTileSystem.cs +++ b/Content.Server/Tiles/FloorTileSystem.cs @@ -6,6 +6,7 @@ using Content.Shared.Physics; using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Random; diff --git a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs index 3b7589941c..692c40aee7 100644 --- a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs @@ -22,6 +22,7 @@ using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; diff --git a/Content.Server/Weapon/Ranged/Systems/GunSystem.cs b/Content.Server/Weapon/Ranged/Systems/GunSystem.cs index 3b90ca2a0f..c84ca5da05 100644 --- a/Content.Server/Weapon/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapon/Ranged/Systems/GunSystem.cs @@ -20,6 +20,7 @@ using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Utility; using SharedGunSystem = Content.Shared.Weapons.Ranged.Systems.SharedGunSystem; diff --git a/Content.Server/Weapon/Ranged/Systems/TetherGunSystem.cs b/Content.Server/Weapon/Ranged/Systems/TetherGunSystem.cs index 79283137c5..7195c2de5b 100644 --- a/Content.Server/Weapon/Ranged/Systems/TetherGunSystem.cs +++ b/Content.Server/Weapon/Ranged/Systems/TetherGunSystem.cs @@ -7,7 +7,9 @@ using Robust.Server.Player; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics.Joints; +using Robust.Shared.Physics.Systems; using Robust.Shared.Players; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Shared/Blocking/BlockingSystem.cs b/Content.Shared/Blocking/BlockingSystem.cs index ceeb236359..274626c3cb 100644 --- a/Content.Shared/Blocking/BlockingSystem.cs +++ b/Content.Shared/Blocking/BlockingSystem.cs @@ -13,7 +13,9 @@ using Content.Shared.Toggleable; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Prototypes; diff --git a/Content.Shared/Buckle/SharedBuckleSystem.cs b/Content.Shared/Buckle/SharedBuckleSystem.cs index 31da4dc9bb..5d36039341 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Movement.Events; using Content.Shared.Standing; using Content.Shared.Throwing; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Timing; namespace Content.Shared.Buckle @@ -105,13 +106,13 @@ namespace Content.Shared.Buckle args.Cancel(); } - private void PreventCollision(EntityUid uid, SharedBuckleComponent component, PreventCollideEvent args) + private void PreventCollision(EntityUid uid, SharedBuckleComponent component, ref PreventCollideEvent args) { if (args.BodyB.Owner != component.LastEntityBuckledTo) return; if (component.Buckled || component.DontCollide) { - args.Cancel(); + args.Cancelled = true; } } } diff --git a/Content.Shared/Construction/Conditions/WallmountCondition.cs b/Content.Shared/Construction/Conditions/WallmountCondition.cs index eed6bda482..e44677e8ed 100644 --- a/Content.Shared/Construction/Conditions/WallmountCondition.cs +++ b/Content.Shared/Construction/Conditions/WallmountCondition.cs @@ -4,6 +4,7 @@ using Content.Shared.Tag; using JetBrains.Annotations; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Systems; using Robust.Shared.Utility; namespace Content.Shared.Construction.Conditions diff --git a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs index 01c363459e..a9eaab3168 100644 --- a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs +++ b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs @@ -7,6 +7,7 @@ using Content.Shared.Throwing; using JetBrains.Annotations; using Robust.Shared.Physics; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Timing; namespace Content.Shared.Disposal @@ -28,7 +29,7 @@ namespace Content.Shared.Disposal SubscribeLocalEvent(OnCanDragDropOn); } - private void OnPreventCollide(EntityUid uid, SharedDisposalUnitComponent component, PreventCollideEvent args) + private void OnPreventCollide(EntityUid uid, SharedDisposalUnitComponent component, ref PreventCollideEvent args) { var otherBody = args.BodyB.Owner; @@ -36,13 +37,13 @@ namespace Content.Shared.Disposal if (EntityManager.HasComponent(otherBody) && !EntityManager.HasComponent(otherBody)) { - args.Cancel(); + args.Cancelled = true; return; } if (component.RecentlyEjected.Contains(otherBody)) { - args.Cancel(); + args.Cancelled = true; } } diff --git a/Content.Shared/Doors/Systems/SharedDoorSystem.cs b/Content.Shared/Doors/Systems/SharedDoorSystem.cs index dd25f74af7..b0a33c46ef 100644 --- a/Content.Shared/Doors/Systems/SharedDoorSystem.cs +++ b/Content.Shared/Doors/Systems/SharedDoorSystem.cs @@ -13,6 +13,9 @@ using System.Linq; using Content.Shared.Tag; using Content.Shared.Tools.Components; using Content.Shared.Verbs; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; namespace Content.Shared.Doors.Systems; @@ -447,15 +450,15 @@ public abstract class SharedDoorSystem : EntitySystem } } - private void PreventCollision(EntityUid uid, DoorComponent component, PreventCollideEvent args) + private void PreventCollision(EntityUid uid, DoorComponent component, ref PreventCollideEvent args) { if (component.CurrentlyCrushing.Contains(args.BodyB.Owner)) { - args.Cancel(); + args.Cancelled = true; } } - protected virtual void HandleCollide(EntityUid uid, DoorComponent door, StartCollideEvent args) + protected virtual void HandleCollide(EntityUid uid, DoorComponent door, ref StartCollideEvent args) { // TODO ACCESS READER move access reader to shared and predict door opening/closing // Then this can be moved to the shared system without mispredicting. diff --git a/Content.Shared/Friction/TileFrictionController.cs b/Content.Shared/Friction/TileFrictionController.cs index 9480937427..0e2d4b12c7 100644 --- a/Content.Shared/Friction/TileFrictionController.cs +++ b/Content.Shared/Friction/TileFrictionController.cs @@ -7,8 +7,10 @@ using JetBrains.Annotations; using Robust.Shared.Configuration; using Robust.Shared.GameStates; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Controllers; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Systems; using Robust.Shared.Serialization; using Robust.Shared.Utility; diff --git a/Content.Shared/Gravity/SharedGravitySystem.cs b/Content.Shared/Gravity/SharedGravitySystem.cs index 6952f13ef4..300fb65913 100644 --- a/Content.Shared/Gravity/SharedGravitySystem.cs +++ b/Content.Shared/Gravity/SharedGravitySystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Movement.Components; using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Serialization; namespace Content.Shared.Gravity diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs index 205f1bdab9..8969d9e2a0 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs @@ -4,6 +4,7 @@ using Content.Shared.Item; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; namespace Content.Shared.Hands.EntitySystems; diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index e518a67506..06b6be2bae 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -23,6 +23,8 @@ using Robust.Shared.Input; using Robust.Shared.Input.Binding; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Players; using Robust.Shared.Serialization; diff --git a/Content.Shared/Maps/TurfHelpers.cs b/Content.Shared/Maps/TurfHelpers.cs index fcf5ac1b2c..82b3c28949 100644 --- a/Content.Shared/Maps/TurfHelpers.cs +++ b/Content.Shared/Maps/TurfHelpers.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; using Content.Shared.Physics; using Robust.Shared.Map; +using Robust.Shared.Physics.Components; using Robust.Shared.Random; namespace Content.Shared.Maps diff --git a/Content.Shared/MobState/EntitySystems/SharedMobStateSystem.Dead.cs b/Content.Shared/MobState/EntitySystems/SharedMobStateSystem.Dead.cs index a4fde4ed1e..d8af38d135 100644 --- a/Content.Shared/MobState/EntitySystems/SharedMobStateSystem.Dead.cs +++ b/Content.Shared/MobState/EntitySystems/SharedMobStateSystem.Dead.cs @@ -1,4 +1,5 @@ using Content.Shared.FixedPoint; +using Robust.Shared.Physics.Components; namespace Content.Shared.MobState.EntitySystems; diff --git a/Content.Shared/Movement/Components/MovementIgnoreGravityComponent.cs b/Content.Shared/Movement/Components/MovementIgnoreGravityComponent.cs index 0e28257d3b..19e873ff72 100644 --- a/Content.Shared/Movement/Components/MovementIgnoreGravityComponent.cs +++ b/Content.Shared/Movement/Components/MovementIgnoreGravityComponent.cs @@ -4,6 +4,7 @@ using Content.Shared.Inventory; using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Serialization; namespace Content.Shared.Movement.Components diff --git a/Content.Shared/Movement/Systems/SharedMoverController.cs b/Content.Shared/Movement/Systems/SharedMoverController.cs index fed4a8a8da..633047a4b4 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.cs @@ -17,6 +17,8 @@ using Robust.Shared.Physics.Controllers; using Robust.Shared.Timing; using Robust.Shared.Utility; using System.Diagnostics.CodeAnalysis; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; namespace Content.Shared.Movement.Systems { diff --git a/Content.Shared/Movement/Systems/SlowContactsSystem.cs b/Content.Shared/Movement/Systems/SlowContactsSystem.cs index c036379bc0..44c7bcabb4 100644 --- a/Content.Shared/Movement/Systems/SlowContactsSystem.cs +++ b/Content.Shared/Movement/Systems/SlowContactsSystem.cs @@ -1,6 +1,9 @@ using Content.Shared.Movement.Components; using Robust.Shared.GameStates; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; namespace Content.Shared.Movement.Systems; @@ -85,14 +88,14 @@ public sealed class SlowContactsSystem : EntitySystem _toRemove.Add(uid); } - private void OnEntityExit(EntityUid uid, SlowContactsComponent component, EndCollideEvent args) + private void OnEntityExit(EntityUid uid, SlowContactsComponent component, ref EndCollideEvent args) { var otherUid = args.OtherFixture.Body.Owner; if (HasComp(otherUid)) _toUpdate.Add(otherUid); } - private void OnEntityEnter(EntityUid uid, SlowContactsComponent component, StartCollideEvent args) + private void OnEntityEnter(EntityUid uid, SlowContactsComponent component, ref StartCollideEvent args) { var otherUid = args.OtherFixture.Body.Owner; if (!HasComp(otherUid)) diff --git a/Content.Shared/Physics/SharedPreventCollideSystem.cs b/Content.Shared/Physics/SharedPreventCollideSystem.cs index eb1491a997..b28f900d14 100644 --- a/Content.Shared/Physics/SharedPreventCollideSystem.cs +++ b/Content.Shared/Physics/SharedPreventCollideSystem.cs @@ -1,5 +1,6 @@ using Robust.Shared.GameStates; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; namespace Content.Shared.Physics; @@ -27,12 +28,12 @@ public sealed class SharedPreventCollideSystem : EntitySystem component.Uid = state.Uid; } - private void OnPreventCollide(EntityUid uid, PreventCollideComponent component, PreventCollideEvent args) + private void OnPreventCollide(EntityUid uid, PreventCollideComponent component, ref PreventCollideEvent args) { var otherUid = args.BodyB.Owner; if (component.Uid == otherUid) - args.Cancel(); + args.Cancelled = true; } } diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index 99c1c37f4f..47a66c4853 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -1,5 +1,6 @@ using Robust.Shared.Map; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; using Robust.Shared.Serialization; namespace Content.Shared.Projectiles @@ -14,12 +15,11 @@ namespace Content.Shared.Projectiles SubscribeLocalEvent(PreventCollision); } - private void PreventCollision(EntityUid uid, SharedProjectileComponent component, PreventCollideEvent args) + private void PreventCollision(EntityUid uid, SharedProjectileComponent component, ref PreventCollideEvent args) { if (component.IgnoreShooter && args.BodyB.Owner == component.Shooter) { - args.Cancel(); - return; + args.Cancelled = true; } } diff --git a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs index 763486925d..93e8223b5d 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs @@ -5,6 +5,8 @@ using JetBrains.Annotations; using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; using Robust.Shared.Timing; namespace Content.Shared.Pulling diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs index b1b6f3e431..bdd3767119 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs @@ -7,6 +7,7 @@ using Content.Shared.Pulling.Events; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; namespace Content.Shared.Pulling { diff --git a/Content.Shared/Singularity/SharedSingularitySystem.cs b/Content.Shared/Singularity/SharedSingularitySystem.cs index 39982d9b29..2ec23dee29 100644 --- a/Content.Shared/Singularity/SharedSingularitySystem.cs +++ b/Content.Shared/Singularity/SharedSingularitySystem.cs @@ -3,7 +3,10 @@ using Content.Shared.Radiation; using Content.Shared.Singularity.Components; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision.Shapes; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; namespace Content.Shared.Singularity { @@ -49,13 +52,12 @@ namespace Content.Shared.Singularity SubscribeLocalEvent(OnPreventCollide); } - protected void OnPreventCollide(EntityUid uid, SharedSingularityComponent component, PreventCollideEvent args) + protected void OnPreventCollide(EntityUid uid, SharedSingularityComponent component, ref PreventCollideEvent args) { - PreventCollide(uid, component, args); + PreventCollide(uid, component, ref args); } - protected virtual bool PreventCollide(EntityUid uid, SharedSingularityComponent component, - PreventCollideEvent args) + protected virtual bool PreventCollide(EntityUid uid, SharedSingularityComponent component, ref PreventCollideEvent args) { var otherUid = args.BodyB.Owner; @@ -63,7 +65,7 @@ namespace Content.Shared.Singularity if (EntityManager.HasComponent(otherUid) || EntityManager.HasComponent(otherUid)) { - args.Cancel(); + args.Cancelled = true; return true; } @@ -74,7 +76,7 @@ namespace Content.Shared.Singularity { if (component.Level > 4) { - args.Cancel(); + args.Cancelled = true; } return true; diff --git a/Content.Shared/Slippery/SlipperySystem.cs b/Content.Shared/Slippery/SlipperySystem.cs index 54fab4b3bc..aa1c6caa62 100644 --- a/Content.Shared/Slippery/SlipperySystem.cs +++ b/Content.Shared/Slippery/SlipperySystem.cs @@ -8,6 +8,7 @@ using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.GameStates; +using Robust.Shared.Physics.Components; namespace Content.Shared.Slippery { diff --git a/Content.Shared/Spawning/EntitySystemExtensions.cs b/Content.Shared/Spawning/EntitySystemExtensions.cs index 8fb3d08535..78d56c5b29 100644 --- a/Content.Shared/Spawning/EntitySystemExtensions.cs +++ b/Content.Shared/Spawning/EntitySystemExtensions.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared.Physics; using Robust.Shared.Map; +using Robust.Shared.Physics.Systems; namespace Content.Shared.Spawning { diff --git a/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs b/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs index 6a01bb9d18..89ec548fd5 100644 --- a/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs +++ b/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs @@ -1,7 +1,9 @@ using Content.Shared.StepTrigger.Components; using Robust.Shared.Collections; using Robust.Shared.GameStates; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Events; namespace Content.Shared.StepTrigger.Systems; @@ -97,7 +99,7 @@ public sealed class StepTriggerSystem : EntitySystem return msg.Continue && !msg.Cancelled; } - private void HandleCollide(EntityUid uid, StepTriggerComponent component, StartCollideEvent args) + private void HandleCollide(EntityUid uid, StepTriggerComponent component, ref StartCollideEvent args) { var otherUid = args.OtherFixture.Body.Owner; diff --git a/Content.Shared/Throwing/ThrowingSystem.cs b/Content.Shared/Throwing/ThrowingSystem.cs index 86ae9559ce..661aa383d1 100644 --- a/Content.Shared/Throwing/ThrowingSystem.cs +++ b/Content.Shared/Throwing/ThrowingSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Interaction; using Content.Shared.Movement.Components; using Content.Shared.Tag; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Shared.Throwing; diff --git a/Content.Shared/Throwing/ThrownItemSystem.cs b/Content.Shared/Throwing/ThrownItemSystem.cs index 18d6578ca7..3d2e3f0976 100644 --- a/Content.Shared/Throwing/ThrownItemSystem.cs +++ b/Content.Shared/Throwing/ThrownItemSystem.cs @@ -8,6 +8,9 @@ using Robust.Shared.GameStates; using Robust.Shared.Physics; using Robust.Shared.Physics.Dynamics; using System.Linq; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; namespace Content.Shared.Throwing { @@ -55,7 +58,7 @@ namespace Content.Shared.Throwing if (!EntityManager.TryGetComponent(component.Owner, out FixturesComponent? fixturesComponent) || fixturesComponent.Fixtures.Count != 1) return; if (!EntityManager.TryGetComponent(component.Owner, out PhysicsComponent? physicsComponent)) return; - + if (fixturesComponent.Fixtures.ContainsKey(ThrowingFixture)) { Logger.Error($"Found existing throwing fixture on {component.Owner}"); @@ -67,7 +70,7 @@ namespace Content.Shared.Throwing _fixtures.TryCreateFixture(physicsComponent, throwingFixture, manager: fixturesComponent); } - private void HandleCollision(EntityUid uid, ThrownItemComponent component, StartCollideEvent args) + private void HandleCollision(EntityUid uid, ThrownItemComponent component, ref StartCollideEvent args) { if (args.OtherFixture.Hard == false) return; @@ -79,11 +82,11 @@ namespace Content.Shared.Throwing ThrowCollideInteraction(thrower, args.OurFixture.Body, otherBody); } - private void PreventCollision(EntityUid uid, ThrownItemComponent component, PreventCollideEvent args) + private void PreventCollision(EntityUid uid, ThrownItemComponent component, ref PreventCollideEvent args) { if (args.BodyB.Owner == component.Thrower) { - args.Cancel(); + args.Cancelled = true; } } diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedFlyBySoundSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedFlyBySoundSystem.cs index 01a5580ee3..6919f46426 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedFlyBySoundSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedFlyBySoundSystem.cs @@ -4,7 +4,9 @@ using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Physics; using Robust.Shared.Physics.Collision.Shapes; +using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Physics.Systems; using Robust.Shared.Serialization; namespace Content.Shared.Weapons.Ranged.Systems; diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 0294e1ca42..fa22781e14 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -19,6 +19,7 @@ using Robust.Shared.Containers; using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Network; +using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random;