Fix the singularity (#8890)
* Revert "Fixes the singularity bouncing off the station. (#8452)"
This reverts commit dc186f1e24.
* Fix singulo
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user