Named fixtures for banana peels (#3822)
* Named fixtures for banana peels * Soaps and PDAs * Update submodule
This commit is contained in:
@@ -8,6 +8,7 @@ using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Collision;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.PA
|
||||
@@ -17,9 +18,9 @@ namespace Content.Server.GameObjects.Components.PA
|
||||
{
|
||||
public override string Name => "ParticleProjectile";
|
||||
private ParticleAcceleratorPowerState _state;
|
||||
void IStartCollide.CollideWith(IPhysBody ourBody, IPhysBody otherBody, in Manifold manifold)
|
||||
void IStartCollide.CollideWith(Fixture ourFixture, Fixture otherFixture, in Manifold manifold)
|
||||
{
|
||||
if (otherBody.Entity.TryGetComponent<ServerSingularityComponent>(out var singularityComponent))
|
||||
if (otherFixture.Body.Owner.TryGetComponent<ServerSingularityComponent>(out var singularityComponent))
|
||||
{
|
||||
var multiplier = _state switch
|
||||
{
|
||||
@@ -33,7 +34,7 @@ namespace Content.Server.GameObjects.Components.PA
|
||||
singularityComponent.Energy += 10 * multiplier;
|
||||
Owner.Delete();
|
||||
}
|
||||
else if (otherBody.Entity.TryGetComponent<SingularityGeneratorComponent>(out var singularityGeneratorComponent))
|
||||
else if (otherFixture.Body.Owner.TryGetComponent<SingularityGeneratorComponent>(out var singularityGeneratorComponent))
|
||||
{
|
||||
singularityGeneratorComponent.Power += _state switch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user