Content update for ECS physics (#13291)
This commit is contained in:
@@ -13,6 +13,7 @@ using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems
|
||||
@@ -22,6 +23,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _protoManager = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
|
||||
@@ -37,7 +39,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
if (!EntityManager.TryGetComponent(uid, out SolutionContainerManagerComponent? contents)) return;
|
||||
|
||||
foreach (var (_, value) in contents.Solutions)
|
||||
foreach (var value in contents.Solutions.Values)
|
||||
{
|
||||
value.DoEntityReaction(args.OtherFixture.Body.Owner, ReactionMethod.Touch);
|
||||
}
|
||||
@@ -58,8 +60,8 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
// Set Move
|
||||
if (EntityManager.TryGetComponent(vapor.Owner, out PhysicsComponent? physics))
|
||||
{
|
||||
physics.LinearDamping = 0f;
|
||||
physics.AngularDamping = 0f;
|
||||
_physics.SetLinearDamping(physics, 0f);
|
||||
_physics.SetAngularDamping(physics, 0f);
|
||||
|
||||
_throwing.TryThrow(vapor.Owner, dir * speed, user: user, pushbackRatio: 50f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user