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!;
|
[Dependency] private readonly FixtureSystem _fixtures = default!;
|
||||||
|
|
||||||
public const string DeleteFixture = "DeleteCircle";
|
public const string DeleteFixture = "DeleteCircle";
|
||||||
public const string CollideFixture = "ColliderCircle";
|
|
||||||
|
|
||||||
private float GetFalloff(int level)
|
private float GetFalloff(int level)
|
||||||
{
|
{
|
||||||
@@ -116,10 +115,17 @@ namespace Content.Shared.Singularity
|
|||||||
appearance.SetData(SingularityVisuals.Level, value);
|
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;
|
var fixture = _fixtures.GetFixtureOrNull(physics, DeleteFixture);
|
||||||
collideCircle.Radius = value;
|
|
||||||
|
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))
|
if (EntityManager.TryGetComponent(singularity.Owner, out SingularityDistortionComponent? distortion))
|
||||||
|
|||||||
@@ -19,19 +19,10 @@
|
|||||||
radius: 0.5
|
radius: 0.5
|
||||||
restitution: 0.9
|
restitution: 0.9
|
||||||
mass: 99999
|
mass: 99999
|
||||||
hard: false
|
|
||||||
mask:
|
mask:
|
||||||
- AllMask
|
- AllMask
|
||||||
layer:
|
layer:
|
||||||
- AllMask
|
- AllMask
|
||||||
- id: ColliderCircle
|
|
||||||
shape:
|
|
||||||
!type:PhysShapeCircle
|
|
||||||
radius: 0.5
|
|
||||||
restitution: 0.9
|
|
||||||
mass: 99999
|
|
||||||
mask:
|
|
||||||
- FullTileMask
|
|
||||||
- type: Singularity
|
- type: Singularity
|
||||||
radsPerLevel: 1 # determines RadiationPulse's radiation per second.
|
radsPerLevel: 1 # determines RadiationPulse's radiation per second.
|
||||||
- type: SingularityDistortion
|
- type: SingularityDistortion
|
||||||
@@ -45,10 +36,6 @@
|
|||||||
state: singularity_1
|
state: singularity_1
|
||||||
shader: unshaded
|
shader: unshaded
|
||||||
netsync: false
|
netsync: false
|
||||||
- type: Icon
|
|
||||||
sprite: Structures/Power/Generation/Singularity/singularity_1.rsi
|
|
||||||
state: singularity_1
|
|
||||||
drawdepth: Items
|
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
enabled: true
|
enabled: true
|
||||||
radius: 10
|
radius: 10
|
||||||
|
|||||||
Reference in New Issue
Block a user