From e9d6156d0cf28b75d4c974e8bcc7cd70bec9ae85 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Mon, 27 Jun 2022 15:22:44 +1000 Subject: [PATCH] Fix the singularity (#8890) * Revert "Fixes the singularity bouncing off the station. (#8452)" This reverts commit dc186f1e24fa8d862a756aee0070d5450e589004. * Fix singulo --- .../Singularity/SharedSingularitySystem.cs | 14 ++++++++++---- .../Power/Generation/Singularity/singularity.yml | 13 ------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Content.Shared/Singularity/SharedSingularitySystem.cs b/Content.Shared/Singularity/SharedSingularitySystem.cs index c26bd9055b..1d9c2a53e7 100644 --- a/Content.Shared/Singularity/SharedSingularitySystem.cs +++ b/Content.Shared/Singularity/SharedSingularitySystem.cs @@ -12,7 +12,6 @@ namespace Content.Shared.Singularity [Dependency] private readonly FixtureSystem _fixtures = default!; public const string DeleteFixture = "DeleteCircle"; - public const string CollideFixture = "ColliderCircle"; private float GetFalloff(int level) { @@ -116,10 +115,17 @@ namespace Content.Shared.Singularity appearance.SetData(SingularityVisuals.Level, value); } - if (physics != null && _fixtures.GetFixtureOrNull(physics, DeleteFixture) is {Shape: PhysShapeCircle deleteCircle} && _fixtures.GetFixtureOrNull(physics, CollideFixture) is {Shape: PhysShapeCircle collideCircle}) + if (physics != null) { - deleteCircle.Radius = value - 0.5f; - collideCircle.Radius = value; + var fixture = _fixtures.GetFixtureOrNull(physics, DeleteFixture); + + if (fixture != null) + { + var circle = (PhysShapeCircle) fixture.Shape; + circle.Radius = value - 0.5f; + + fixture.Hard = value <= 4; + } } if (EntityManager.TryGetComponent(singularity.Owner, out SingularityDistortionComponent? distortion)) diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml index 77eff5d717..4abe11bf06 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/Singularity/singularity.yml @@ -19,19 +19,10 @@ radius: 0.5 restitution: 0.9 mass: 99999 - hard: false mask: - AllMask layer: - AllMask - - id: ColliderCircle - shape: - !type:PhysShapeCircle - radius: 0.5 - restitution: 0.9 - mass: 99999 - mask: - - FullTileMask - type: Singularity radsPerLevel: 1 # determines RadiationPulse's radiation per second. - type: SingularityDistortion @@ -45,10 +36,6 @@ state: singularity_1 shader: unshaded netsync: false - - type: Icon - sprite: Structures/Power/Generation/Singularity/singularity_1.rsi - state: singularity_1 - drawdepth: Items - type: PointLight enabled: true radius: 10