Update for collision events by-ref (#10933)
This commit is contained in:
@@ -4,6 +4,7 @@ using Robust.Client.Graphics;
|
|||||||
using Robust.Client.Input;
|
using Robust.Client.Input;
|
||||||
using Robust.Shared.Input;
|
using Robust.Shared.Input;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Client.Maps;
|
namespace Content.Client.Maps;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Robust.Client.Animations;
|
|||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Client.Movement.Systems;
|
namespace Content.Client.Movement.Systems;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Content.Shared.Movement.Systems;
|
|||||||
using Content.Shared.Pulling.Components;
|
using Content.Shared.Pulling.Components;
|
||||||
using Robust.Client.Player;
|
using Robust.Client.Player;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Client.Physics.Controllers
|
namespace Content.Client.Physics.Controllers
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Robust.Client.UserInterface.Controls;
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision.Shapes;
|
using Robust.Shared.Physics.Collision.Shapes;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using Robust.Client.UserInterface;
|
|||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.XAML;
|
using Robust.Client.UserInterface.XAML;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Shared.Weapons.Ranged.Systems;
|
|||||||
using Robust.Client.Player;
|
using Robust.Client.Player;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ public sealed class FlyBySoundSystem : SharedFlyBySoundSystem
|
|||||||
SubscribeLocalEvent<FlyBySoundComponent, StartCollideEvent>(OnCollide);
|
SubscribeLocalEvent<FlyBySoundComponent, StartCollideEvent>(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;
|
var attachedEnt = _player.LocalPlayer?.ControlledEntity;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Robust.Client.Graphics;
|
|||||||
using Robust.Client.Input;
|
using Robust.Client.Input;
|
||||||
using Robust.Shared.Input;
|
using Robust.Shared.Input;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Client.Weapons.Ranged.Systems;
|
namespace Content.Client.Weapons.Ranged.Systems;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.IntegrationTests.Tests
|
namespace Content.IntegrationTests.Tests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.IntegrationTests.Tests.Utility
|
namespace Content.IntegrationTests.Tests.Utility
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ using Content.Shared.Verbs;
|
|||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Server.Physics;
|
using Robust.Server.Physics;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Server.Administration.Systems;
|
namespace Content.Server.Administration.Systems;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Content.Shared.Physics;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Server.Doors.Systems;
|
|||||||
using Content.Shared.Atmos;
|
using Content.Shared.Atmos;
|
||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Server.NodeContainer.NodeGroups;
|
|||||||
using Content.Shared.Atmos;
|
using Content.Shared.Atmos;
|
||||||
using Content.Shared.Maps;
|
using Content.Shared.Maps;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.Atmos.EntitySystems
|
namespace Content.Server.Atmos.EntitySystems
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using JetBrains.Annotations;
|
|||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.Atmos.EntitySystems;
|
namespace Content.Server.Atmos.EntitySystems;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using Content.Server.Atmos.Components;
|
|||||||
using Content.Server.Shuttles.Systems;
|
using Content.Server.Shuttles.Systems;
|
||||||
using Content.Shared.Maps;
|
using Content.Shared.Maps;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.Atmos.EntitySystems;
|
namespace Content.Server.Atmos.EntitySystems;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Server.Atmos.EntitySystems
|
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;
|
var otherFixture = args.OtherFixture.Body.Owner;
|
||||||
|
|
||||||
@@ -116,7 +119,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
args.Handled = true;
|
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;
|
var otherUid = args.OtherFixture.Body.Owner;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Content.Shared.Examine;
|
|||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.Atmos.Miasma
|
namespace Content.Server.Atmos.Miasma
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Server.Chemistry.Components.SolutionManager;
|
|||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
|||||||
.EnsureComponentWarn<SolutionContainerManagerComponent>($"{nameof(SolutionInjectOnCollideComponent)} requires a SolutionContainerManager on {component.Owner}!");
|
.EnsureComponentWarn<SolutionContainerManagerComponent>($"{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;
|
var target = args.OtherFixture.Body.Owner;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ using Content.Shared.Throwing;
|
|||||||
using Content.Shared.Vapor;
|
using Content.Shared.Vapor;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Server.Chemistry.EntitySystems
|
namespace Content.Server.Chemistry.EntitySystems
|
||||||
@@ -30,7 +32,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
|||||||
SubscribeLocalEvent<VaporComponent, StartCollideEvent>(HandleCollide);
|
SubscribeLocalEvent<VaporComponent, StartCollideEvent>(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;
|
if (!EntityManager.TryGetComponent(uid, out SolutionContainerManagerComponent? contents)) return;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ using Robust.Shared.Configuration;
|
|||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision.Shapes;
|
using Robust.Shared.Physics.Collision.Shapes;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using SharpZstd.Interop;
|
using SharpZstd.Interop;
|
||||||
|
|
||||||
@@ -221,7 +224,7 @@ public sealed class ClimbSystem : SharedClimbSystem
|
|||||||
return true;
|
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
|
if (args.OurFixture.ID != ClimbingFixtureName
|
||||||
|| !component.IsClimbing
|
|| !component.IsClimbing
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ using Robust.Shared.Prototypes;
|
|||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
|
|
||||||
namespace Content.Server.Cloning.Systems
|
namespace Content.Server.Cloning.Systems
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using Content.Shared.Examine;
|
|||||||
using Content.Shared.Pulling.Components;
|
using Content.Shared.Pulling.Components;
|
||||||
using Content.Shared.Tools.Components;
|
using Content.Shared.Tools.Components;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.Construction
|
namespace Content.Server.Construction
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using Content.Shared.Damage;
|
|||||||
using Content.Shared.MobState.EntitySystems;
|
using Content.Shared.MobState.EntitySystems;
|
||||||
using Content.Shared.MobState.Components;
|
using Content.Shared.MobState.Components;
|
||||||
using Content.Server.Damage.Components;
|
using Content.Server.Damage.Components;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.Contests
|
namespace Content.Server.Contests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Shared.Damage;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
@@ -25,7 +26,7 @@ namespace Content.Server.Damage.Systems
|
|||||||
SubscribeLocalEvent<DamageOnHighSpeedImpactComponent, StartCollideEvent>(HandleCollide);
|
SubscribeLocalEvent<DamageOnHighSpeedImpactComponent, StartCollideEvent>(HandleCollide);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleCollide(EntityUid uid, DamageOnHighSpeedImpactComponent component, StartCollideEvent args)
|
private void HandleCollide(EntityUid uid, DamageOnHighSpeedImpactComponent component, ref StartCollideEvent args)
|
||||||
{
|
{
|
||||||
if (!EntityManager.HasComponent<DamageableComponent>(uid)) return;
|
if (!EntityManager.HasComponent<DamageableComponent>(uid)) return;
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using Robust.Shared.Player;
|
|||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
|
|
||||||
namespace Content.Server.Damage.Systems;
|
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;
|
if (!args.OurFixture.ID.Equals(CollideFixture)) return;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Content.Server.UserInterface;
|
|||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using static Content.Shared.Disposal.Components.SharedDisposalTaggerComponent;
|
using static Content.Shared.Disposal.Components.SharedDisposalTaggerComponent;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ using Content.Shared.Verbs;
|
|||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Server.Doors.Systems;
|
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
|
/// 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.
|
/// generate "access denied" sounds as you fire at a door.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
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
|
// TODO ACCESS READER move access reader to shared and predict door opening/closing
|
||||||
// Then this can be moved to the shared system without mispredicting.
|
// Then this can be moved to the shared system without mispredicting.
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using Content.Shared.Tag;
|
|||||||
using Content.Shared.Weapons.Melee;
|
using Content.Shared.Weapons.Melee;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
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)
|
if (!electrified.OnBump)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Content.Server.Explosion.EntitySystems;
|
using Content.Server.Explosion.EntitySystems;
|
||||||
using Robust.Shared.Physics.Collision.Shapes;
|
using Robust.Shared.Physics.Collision.Shapes;
|
||||||
using Content.Shared.Explosion;
|
using Content.Shared.Explosion;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.Explosion.Components
|
namespace Content.Server.Explosion.Components
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Shared.Maps;
|
|||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System.Linq;
|
|||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Content.Shared.Explosion;
|
using Content.Shared.Explosion;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.Explosion.EntitySystems;
|
namespace Content.Server.Explosion.EntitySystems;
|
||||||
@@ -12,7 +13,7 @@ namespace Content.Server.Explosion.EntitySystems;
|
|||||||
public sealed partial class ExplosionSystem : EntitySystem
|
public sealed partial class ExplosionSystem : EntitySystem
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the main explosion generating function.
|
/// This is the main explosion generating function.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="epicenter">The center of the explosion</param>
|
/// <param name="epicenter">The center of the explosion</param>
|
||||||
/// <param name="typeID">The explosion type. this determines the explosion damage</param>
|
/// <param name="typeID">The explosion type. this determines the explosion damage</param>
|
||||||
@@ -124,7 +125,7 @@ public sealed partial class ExplosionSystem : EntitySystem
|
|||||||
if (totalIntensity < stepSize)
|
if (totalIntensity < stepSize)
|
||||||
// Bit anticlimactic. All that set up for nothing....
|
// Bit anticlimactic. All that set up for nothing....
|
||||||
return (1, new List<float> { totalIntensity }, spaceData, gridData, spaceMatrix);
|
return (1, new List<float> { totalIntensity }, spaceData, gridData, spaceMatrix);
|
||||||
|
|
||||||
// These variables keep track of the total intensity we have distributed
|
// These variables keep track of the total intensity we have distributed
|
||||||
List<int> tilesInIteration = new() { 1 };
|
List<int> tilesInIteration = new() { 1 };
|
||||||
List<float> iterationIntensity = new() {stepSize};
|
List<float> iterationIntensity = new() {stepSize};
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using Content.Server.Explosion.Components;
|
using Content.Server.Explosion.Components;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Trigger;
|
using Content.Shared.Trigger;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Explosion.EntitySystems;
|
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;
|
if (args.OurFixture.ID != TriggerOnProximityComponent.FixtureID) return;
|
||||||
|
|
||||||
@@ -72,7 +74,7 @@ public sealed partial class TriggerSystem
|
|||||||
component.Colliding.Add(args.OtherFixture.Body);
|
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;
|
if (args.OurFixture.ID != TriggerOnProximityComponent.FixtureID) return;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Content.Server.Explosion.Components;
|
using Content.Server.Explosion.Components;
|
||||||
using Content.Server.Explosion.EntitySystems;
|
using Content.Server.Explosion.EntitySystems;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Server.Explosion.EntitySystems;
|
namespace Content.Server.Explosion.EntitySystems;
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ public sealed partial class TriggerSystem
|
|||||||
SubscribeLocalEvent<TriggerOnTimedCollideComponent, ComponentRemove>(OnComponentRemove);
|
SubscribeLocalEvent<TriggerOnTimedCollideComponent, ComponentRemove>(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
|
//Ensures the entity trigger will have an active component
|
||||||
EnsureComp<ActiveTriggerOnTimedCollideComponent>(uid);
|
EnsureComp<ActiveTriggerOnTimedCollideComponent>(uid);
|
||||||
@@ -24,7 +25,7 @@ public sealed partial class TriggerSystem
|
|||||||
component.Colliding.Add(otherUID, 0);
|
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;
|
var otherUID = args.OtherFixture.Body.Owner;
|
||||||
component.Colliding.Remove(otherUID);
|
component.Colliding.Remove(otherUID);
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ using Content.Shared.Payload.Components;
|
|||||||
using Content.Shared.StepTrigger.Systems;
|
using Content.Shared.StepTrigger.Systems;
|
||||||
using Robust.Server.Containers;
|
using Robust.Server.Containers;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Server.Explosion.EntitySystems
|
namespace Content.Server.Explosion.EntitySystems
|
||||||
{
|
{
|
||||||
@@ -86,7 +88,7 @@ namespace Content.Server.Explosion.EntitySystems
|
|||||||
args.Handled = true;
|
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)
|
if(args.OurFixture.ID == component.FixtureID)
|
||||||
Trigger(component.Owner);
|
Trigger(component.Owner);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using Content.Shared.Movement.Events;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.Ghost
|
namespace Content.Server.Ghost
|
||||||
@@ -195,7 +196,7 @@ namespace Content.Server.Ghost
|
|||||||
_followerSystem.StartFollowingEntity(ghost.Owner, msg.Target);
|
_followerSystem.StartFollowingEntity(ghost.Owner, msg.Target);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var xform = Transform(ghost.Owner);
|
var xform = Transform(ghost.Owner);
|
||||||
xform.Coordinates = Transform(msg.Target).Coordinates;
|
xform.Coordinates = Transform(msg.Target).Coordinates;
|
||||||
xform.AttachToGridOrMap();
|
xform.AttachToGridOrMap();
|
||||||
@@ -231,7 +232,7 @@ namespace Content.Server.Ghost
|
|||||||
if (player.AttachedEntity is {Valid: true} attached)
|
if (player.AttachedEntity is {Valid: true} attached)
|
||||||
{
|
{
|
||||||
if (attached == except) continue;
|
if (attached == except) continue;
|
||||||
|
|
||||||
TryComp<MindComponent>(attached, out var mind);
|
TryComp<MindComponent>(attached, out var mind);
|
||||||
|
|
||||||
string playerInfo = $"{EntityManager.GetComponent<MetaDataComponent>(attached).EntityName} ({mind?.Mind?.CurrentJob?.Name ?? "Unknown"})";
|
string playerInfo = $"{EntityManager.GetComponent<MetaDataComponent>(attached).EntityName} ({mind?.Mind?.CurrentJob?.Name ?? "Unknown"})";
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ using Content.Shared.Examine;
|
|||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
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;
|
var ent = args.OtherFixture.Body.Owner;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Content.Shared.Spawners.Components;
|
|||||||
using Content.Shared.Storage;
|
using Content.Shared.Storage;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Robust.Server.Console;
|
|||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.Maps;
|
namespace Content.Server.Maps;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using Robust.Shared.Player;
|
|||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.Medical.BiomassReclaimer
|
namespace Content.Server.Medical.BiomassReclaimer
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Content.Shared.Inventory;
|
|||||||
using Content.Shared.Mousetrap;
|
using Content.Shared.Mousetrap;
|
||||||
using Content.Shared.StepTrigger;
|
using Content.Shared.StepTrigger;
|
||||||
using Content.Shared.StepTrigger.Systems;
|
using Content.Shared.StepTrigger.Systems;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.Mousetrap;
|
namespace Content.Server.Mousetrap;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Server.NPC.Pathfinding;
|
|||||||
using Content.Server.NPC.Pathfinding.Pathfinders;
|
using Content.Server.NPC.Pathfinding.Pathfinders;
|
||||||
using Content.Server.NPC.Systems;
|
using Content.Server.NPC.Systems;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
|
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ using Content.Shared.Access.Systems;
|
|||||||
using Content.Shared.GameTicking;
|
using Content.Shared.GameTicking;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.NPC.Pathfinding;
|
namespace Content.Server.NPC.Pathfinding;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Server.NPC.Pathfinding.Pathfinders;
|
|||||||
using Content.Shared.Access.Systems;
|
using Content.Shared.Access.Systems;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.NPC.Pathfinding
|
namespace Content.Server.NPC.Pathfinding
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using Content.Server.NPC.Components;
|
|||||||
using Content.Shared.CombatMode;
|
using Content.Shared.CombatMode;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.NPC.Systems;
|
namespace Content.Server.NPC.Systems;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ using Content.Shared.CCVar;
|
|||||||
using Content.Shared.Movement.Components;
|
using Content.Shared.Movement.Components;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.NPC.Systems
|
namespace Content.Server.NPC.Systems
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using Content.Server.Projectiles;
|
|||||||
using Content.Server.Projectiles.Components;
|
using Content.Server.Projectiles.Components;
|
||||||
using Content.Server.Singularity.Components;
|
using Content.Server.Singularity.Components;
|
||||||
using Content.Shared.Singularity.Components;
|
using Content.Shared.Singularity.Components;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.ParticleAccelerator.Components
|
namespace Content.Server.ParticleAccelerator.Components
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using Content.Server.ParticleAccelerator.Components;
|
using Content.Server.ParticleAccelerator.Components;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Server.ParticleAccelerator.EntitySystems
|
namespace Content.Server.ParticleAccelerator.EntitySystems
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,8 +14,11 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision.Shapes;
|
using Robust.Shared.Physics.Collision.Shapes;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Controllers;
|
using Robust.Shared.Physics.Controllers;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Server.Physics.Controllers
|
namespace Content.Server.Physics.Controllers
|
||||||
{
|
{
|
||||||
@@ -43,7 +46,7 @@ namespace Content.Server.Physics.Controllers
|
|||||||
base.Initialize();
|
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);
|
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;
|
var otherUid = args.OtherFixture.Body.Owner;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Content.Shared.Movement.Systems;
|
|||||||
using Content.Shared.Shuttles.Components;
|
using Content.Shared.Shuttles.Components;
|
||||||
using Content.Shared.Shuttles.Systems;
|
using Content.Shared.Shuttles.Systems;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.Physics.Controllers
|
namespace Content.Server.Physics.Controllers
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Content.Shared.Pulling.Components;
|
using Content.Shared.Pulling.Components;
|
||||||
using Content.Shared.Rotatable;
|
using Content.Shared.Rotatable;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Controllers;
|
using Robust.Shared.Physics.Controllers;
|
||||||
|
|
||||||
namespace Content.Server.Physics.Controllers
|
namespace Content.Server.Physics.Controllers
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Content.Server.Singularity.Components;
|
using Content.Server.Singularity.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Controllers;
|
using Robust.Shared.Physics.Controllers;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using Content.Server.Polymorph.Components;
|
|||||||
using Content.Shared.Projectiles;
|
using Content.Shared.Projectiles;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.Polymorph.Systems;
|
namespace Content.Server.Polymorph.Systems;
|
||||||
@@ -35,7 +36,7 @@ public partial class PolymorphableSystem
|
|||||||
SubscribeLocalEvent<PolymorphOnCollideComponent, StartCollideEvent>(OnPolymorphCollide);
|
SubscribeLocalEvent<PolymorphOnCollideComponent, StartCollideEvent>(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)
|
if (args.OurFixture.ID != SharedProjectileSystem.ProjectileFixture)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis;
|
|||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.Power.EntitySystems
|
namespace Content.Server.Power.EntitySystems
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using GunSystem = Content.Server.Weapon.Ranged.Systems.GunSystem;
|
using GunSystem = Content.Server.Weapon.Ranged.Systems.GunSystem;
|
||||||
|
|
||||||
namespace Content.Server.Projectiles
|
namespace Content.Server.Projectiles
|
||||||
@@ -35,7 +36,7 @@ namespace Content.Server.Projectiles
|
|||||||
args.State = new ProjectileComponentState(component.Shooter, component.IgnoreShooter);
|
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.
|
// This is so entities that shouldn't get a collision are ignored.
|
||||||
if (args.OurFixture.ID != ProjectileFixture || !args.OtherFixture.Hard || component.DamagedEntity)
|
if (args.OurFixture.ID != ProjectileFixture || !args.OtherFixture.Hard || component.DamagedEntity)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using Content.Shared.Tag;
|
|||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
@@ -80,7 +81,7 @@ namespace Content.Server.Recycling
|
|||||||
_ambience.SetAmbience(component.Owner, false);
|
_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;
|
if (component.Enabled && args.OurFixture.ID != "brrt") return;
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ using Content.Server.Emag;
|
|||||||
using Content.Server.Store.Components;
|
using Content.Server.Store.Components;
|
||||||
using Content.Shared.CharacterAppearance.Components;
|
using Content.Shared.CharacterAppearance.Components;
|
||||||
using Content.Shared.FixedPoint;
|
using Content.Shared.FixedPoint;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Revenant.EntitySystems;
|
namespace Content.Server.Revenant.EntitySystems;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Content.Server.Shuttles.Components;
|
using Content.Server.Shuttles.Components;
|
||||||
using Content.Shared.Shuttles.Components;
|
using Content.Shared.Shuttles.Components;
|
||||||
using Content.Shared.Shuttles.Events;
|
using Content.Shared.Shuttles.Events;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ using Content.Shared.Shuttles.Events;
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision.Shapes;
|
using Robust.Shared.Physics.Collision.Shapes;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
using Robust.Shared.Physics.Dynamics.Joints;
|
using Robust.Shared.Physics.Dynamics.Joints;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Shuttles.Systems
|
namespace Content.Server.Shuttles.Systems
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Content.Shared.Shuttles.Systems;
|
|||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using Robust.Shared.Player;
|
|||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Content.Server.Shuttles.Events;
|
using Content.Server.Shuttles.Events;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.Shuttles.Systems;
|
namespace Content.Server.Shuttles.Systems;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Server.Shuttles.Systems
|
namespace Content.Server.Shuttles.Systems
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Content.Server.Shuttles.Components;
|
using Content.Server.Shuttles.Components;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Server.Shuttles.Systems;
|
namespace Content.Server.Shuttles.Systems;
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ public sealed class SpaceGarbageSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<SpaceGarbageComponent, StartCollideEvent>(OnCollide);
|
SubscribeLocalEvent<SpaceGarbageComponent, StartCollideEvent>(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;
|
if (args.OtherFixture.Body.BodyType != BodyType.Static) return;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision.Shapes;
|
using Robust.Shared.Physics.Collision.Shapes;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Shuttles.Systems
|
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;
|
if (args.OurFixture.ID != BurnFixture) return;
|
||||||
|
|
||||||
@@ -426,7 +429,7 @@ namespace Content.Server.Shuttles.Systems
|
|||||||
component.Colliding.Add((args.OtherFixture.Body).Owner);
|
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;
|
if (args.OurFixture.ID != BurnFixture) return;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ using Content.Shared.Examine;
|
|||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.Singularity.EntitySystems;
|
namespace Content.Server.Singularity.EntitySystems;
|
||||||
@@ -58,7 +60,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A generator receives power from a source colliding with it.
|
/// A generator receives power from a source colliding with it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
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))
|
if (_tags.HasTag(args.OtherFixture.Body.Owner, component.IDTag))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ using Content.Shared.Popups;
|
|||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.Singularity.EntitySystems;
|
namespace Content.Server.Singularity.EntitySystems;
|
||||||
@@ -22,7 +24,7 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<ContainmentFieldComponent, StartCollideEvent>(HandleFieldCollide);
|
SubscribeLocalEvent<ContainmentFieldComponent, StartCollideEvent>(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;
|
var otherBody = args.OtherFixture.Body.Owner;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using Content.Shared.Singularity.Components;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Content.Server.Singularity.Components;
|
using Content.Server.Singularity.Components;
|
||||||
using Content.Shared.Singularity.Components;
|
using Content.Shared.Singularity.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Server.Singularity.EntitySystems;
|
namespace Content.Server.Singularity.EntitySystems;
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ public sealed class SingularityGeneratorSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<ParticleProjectileComponent, StartCollideEvent>(HandleParticleCollide);
|
SubscribeLocalEvent<ParticleProjectileComponent, StartCollideEvent>(HandleParticleCollide);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleParticleCollide(EntityUid uid, ParticleProjectileComponent component, StartCollideEvent args)
|
private void HandleParticleCollide(EntityUid uid, ParticleProjectileComponent component, ref StartCollideEvent args)
|
||||||
{
|
{
|
||||||
if (EntityManager.TryGetComponent<SingularityGeneratorComponent?>(args.OtherFixture.Body.Owner, out var singularityGeneratorComponent))
|
if (EntityManager.TryGetComponent<SingularityGeneratorComponent?>(args.OtherFixture.Body.Owner, out var singularityGeneratorComponent))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ using Robust.Server.GameStates;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Server.Singularity.EntitySystems
|
namespace Content.Server.Singularity.EntitySystems
|
||||||
{
|
{
|
||||||
@@ -44,9 +46,9 @@ namespace Content.Server.Singularity.EntitySystems
|
|||||||
_pvs.AddGlobalOverride(uid);
|
_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;
|
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 it's not cancelled then we'll cancel if we can't immediately destroy it on collision
|
||||||
if (!CanDestroy(component, otherUid))
|
if (!CanDestroy(component, otherUid))
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
|
|
||||||
return 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;
|
if (args.OurFixture.ID != "DeleteCircle") return;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Shared.GameTicking;
|
|||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.Solar.EntitySystems
|
namespace Content.Server.Solar.EntitySystems
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using Content.Shared.Hands.Components;
|
|||||||
using Content.Shared.Hands.EntitySystems;
|
using Content.Shared.Hands.EntitySystems;
|
||||||
using Content.Shared.Standing;
|
using Content.Shared.Standing;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.Standing;
|
namespace Content.Server.Standing;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Content.Server.GameTicking;
|
using Content.Server.GameTicking;
|
||||||
using Content.Shared.Spawners.Components;
|
using Content.Shared.Spawners.Components;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Server.StationEvents.Events
|
namespace Content.Server.StationEvents.Events
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Shared.StatusEffect;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Server.Stunnable
|
namespace Content.Server.Stunnable
|
||||||
{
|
{
|
||||||
@@ -39,7 +40,7 @@ namespace Content.Server.Stunnable
|
|||||||
component.WalkSpeedMultiplier, component.RunSpeedMultiplier, status);
|
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;
|
if (args.OurFixture.ID != component.FixtureID) return;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Content.Shared.Physics;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using SharedGunSystem = Content.Shared.Weapons.Ranged.Systems.SharedGunSystem;
|
using SharedGunSystem = Content.Shared.Weapons.Ranged.Systems.SharedGunSystem;
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ using Robust.Server.Player;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics.Joints;
|
using Robust.Shared.Physics.Dynamics.Joints;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ using Content.Shared.Toggleable;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Shared.Movement.Events;
|
|||||||
using Content.Shared.Standing;
|
using Content.Shared.Standing;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Shared.Buckle
|
namespace Content.Shared.Buckle
|
||||||
@@ -105,13 +106,13 @@ namespace Content.Shared.Buckle
|
|||||||
args.Cancel();
|
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 (args.BodyB.Owner != component.LastEntityBuckledTo) return;
|
||||||
|
|
||||||
if (component.Buckled || component.DontCollide)
|
if (component.Buckled || component.DontCollide)
|
||||||
{
|
{
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Shared.Tag;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Shared.Construction.Conditions
|
namespace Content.Shared.Construction.Conditions
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Content.Shared.Throwing;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Shared.Disposal
|
namespace Content.Shared.Disposal
|
||||||
@@ -28,7 +29,7 @@ namespace Content.Shared.Disposal
|
|||||||
SubscribeLocalEvent<SharedDisposalUnitComponent, CanDragDropOnEvent>(OnCanDragDropOn);
|
SubscribeLocalEvent<SharedDisposalUnitComponent, CanDragDropOnEvent>(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;
|
var otherBody = args.BodyB.Owner;
|
||||||
|
|
||||||
@@ -36,13 +37,13 @@ namespace Content.Shared.Disposal
|
|||||||
if (EntityManager.HasComponent<ItemComponent>(otherBody) &&
|
if (EntityManager.HasComponent<ItemComponent>(otherBody) &&
|
||||||
!EntityManager.HasComponent<ThrownItemComponent>(otherBody))
|
!EntityManager.HasComponent<ThrownItemComponent>(otherBody))
|
||||||
{
|
{
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (component.RecentlyEjected.Contains(otherBody))
|
if (component.RecentlyEjected.Contains(otherBody))
|
||||||
{
|
{
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ using System.Linq;
|
|||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using Content.Shared.Tools.Components;
|
using Content.Shared.Tools.Components;
|
||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Shared.Doors.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))
|
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
|
// TODO ACCESS READER move access reader to shared and predict door opening/closing
|
||||||
// Then this can be moved to the shared system without mispredicting.
|
// Then this can be moved to the shared system without mispredicting.
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ using JetBrains.Annotations;
|
|||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Controllers;
|
using Robust.Shared.Physics.Controllers;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Content.Shared.Movement.Components;
|
|||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
namespace Content.Shared.Gravity
|
namespace Content.Shared.Gravity
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Shared.Item;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Shared.Hands.EntitySystems;
|
namespace Content.Shared.Hands.EntitySystems;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ using Robust.Shared.Input;
|
|||||||
using Robust.Shared.Input.Binding;
|
using Robust.Shared.Input.Binding;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Runtime.CompilerServices;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Shared.Maps
|
namespace Content.Shared.Maps
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Content.Shared.FixedPoint;
|
using Content.Shared.FixedPoint;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Shared.MobState.EntitySystems;
|
namespace Content.Shared.MobState.EntitySystems;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Shared.Inventory;
|
|||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
namespace Content.Shared.Movement.Components
|
namespace Content.Shared.Movement.Components
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ using Robust.Shared.Physics.Controllers;
|
|||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Shared.Movement.Systems
|
namespace Content.Shared.Movement.Systems
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
using Content.Shared.Movement.Components;
|
using Content.Shared.Movement.Components;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Shared.Movement.Systems;
|
namespace Content.Shared.Movement.Systems;
|
||||||
|
|
||||||
@@ -85,14 +88,14 @@ public sealed class SlowContactsSystem : EntitySystem
|
|||||||
_toRemove.Add(uid);
|
_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;
|
var otherUid = args.OtherFixture.Body.Owner;
|
||||||
if (HasComp<MovementSpeedModifierComponent>(otherUid))
|
if (HasComp<MovementSpeedModifierComponent>(otherUid))
|
||||||
_toUpdate.Add(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;
|
var otherUid = args.OtherFixture.Body.Owner;
|
||||||
if (!HasComp<MovementSpeedModifierComponent>(otherUid))
|
if (!HasComp<MovementSpeedModifierComponent>(otherUid))
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
|
||||||
namespace Content.Shared.Physics;
|
namespace Content.Shared.Physics;
|
||||||
|
|
||||||
@@ -27,12 +28,12 @@ public sealed class SharedPreventCollideSystem : EntitySystem
|
|||||||
component.Uid = state.Uid;
|
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;
|
var otherUid = args.BodyB.Owner;
|
||||||
|
|
||||||
if (component.Uid == otherUid)
|
if (component.Uid == otherUid)
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
namespace Content.Shared.Projectiles
|
namespace Content.Shared.Projectiles
|
||||||
@@ -14,12 +15,11 @@ namespace Content.Shared.Projectiles
|
|||||||
SubscribeLocalEvent<SharedProjectileComponent, PreventCollideEvent>(PreventCollision);
|
SubscribeLocalEvent<SharedProjectileComponent, PreventCollideEvent>(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)
|
if (component.IgnoreShooter && args.BodyB.Owner == component.Shooter)
|
||||||
{
|
{
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ using JetBrains.Annotations;
|
|||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Shared.Pulling
|
namespace Content.Shared.Pulling
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Content.Shared.Pulling.Events;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Shared.Pulling
|
namespace Content.Shared.Pulling
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ using Content.Shared.Radiation;
|
|||||||
using Content.Shared.Singularity.Components;
|
using Content.Shared.Singularity.Components;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision.Shapes;
|
using Robust.Shared.Physics.Collision.Shapes;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
using Robust.Shared.Physics.Dynamics;
|
||||||
|
using Robust.Shared.Physics.Events;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Shared.Singularity
|
namespace Content.Shared.Singularity
|
||||||
{
|
{
|
||||||
@@ -49,13 +52,12 @@ namespace Content.Shared.Singularity
|
|||||||
SubscribeLocalEvent<SharedSingularityComponent, PreventCollideEvent>(OnPreventCollide);
|
SubscribeLocalEvent<SharedSingularityComponent, PreventCollideEvent>(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,
|
protected virtual bool PreventCollide(EntityUid uid, SharedSingularityComponent component, ref PreventCollideEvent args)
|
||||||
PreventCollideEvent args)
|
|
||||||
{
|
{
|
||||||
var otherUid = args.BodyB.Owner;
|
var otherUid = args.BodyB.Owner;
|
||||||
|
|
||||||
@@ -63,7 +65,7 @@ namespace Content.Shared.Singularity
|
|||||||
if (EntityManager.HasComponent<IMapGridComponent>(otherUid) ||
|
if (EntityManager.HasComponent<IMapGridComponent>(otherUid) ||
|
||||||
EntityManager.HasComponent<SharedGhostComponent>(otherUid))
|
EntityManager.HasComponent<SharedGhostComponent>(otherUid))
|
||||||
{
|
{
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +76,7 @@ namespace Content.Shared.Singularity
|
|||||||
{
|
{
|
||||||
if (component.Level > 4)
|
if (component.Level > 4)
|
||||||
{
|
{
|
||||||
args.Cancel();
|
args.Cancelled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using JetBrains.Annotations;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
|
using Robust.Shared.Physics.Components;
|
||||||
|
|
||||||
namespace Content.Shared.Slippery
|
namespace Content.Shared.Slippery
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Physics.Systems;
|
||||||
|
|
||||||
namespace Content.Shared.Spawning
|
namespace Content.Shared.Spawning
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user