Singularity fixes (#4383)

* Singularity fixes

* Fix the rest

* Woops

* ahh

* Nerf singulo for now

* Final touchups for now

* Review
This commit is contained in:
metalgearsloth
2021-08-23 00:54:03 +10:00
committed by GitHub
parent 106a5078de
commit f472bbab88
17 changed files with 279 additions and 162 deletions

View File

@@ -1,11 +1,12 @@
using Content.Shared.Singularity.Components;
using Robust.Shared.GameObjects;
namespace Content.Server.Singularity.Components
{
[RegisterComponent]
public class ContainmentFieldComponent : Component
[ComponentReference(typeof(SharedContainmentFieldComponent))]
public class ContainmentFieldComponent : SharedContainmentFieldComponent
{
public override string Name => "ContainmentField";
public ContainmentFieldConnection? Parent;
}
}

View File

@@ -2,6 +2,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.Physics;
using Content.Shared.Singularity.Components;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Log;
@@ -13,10 +14,9 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Singularity.Components
{
[RegisterComponent]
public class ContainmentFieldGeneratorComponent : Component
[ComponentReference(typeof(SharedContainmentFieldGeneratorComponent))]
public class ContainmentFieldGeneratorComponent : SharedContainmentFieldGeneratorComponent
{
public override string Name => "ContainmentFieldGenerator";
private int _powerBuffer;
[ViewVariables]

View File

@@ -62,6 +62,8 @@ namespace Content.Server.Singularity.Components
_ => 0
};
public float MoveAccumulator;
// This is an interesting little workaround.
// See, two singularities queuing deletion of each other at the same time will annihilate.
// This is undesirable behaviour, so this flag allows the imperatively first one processed to take priority.
@@ -95,11 +97,6 @@ namespace Content.Server.Singularity.Components
_singularitySystem.ChangeSingularityLevel(this, 1);
}
public void Update(int seconds)
{
Energy -= EnergyDrain * seconds;
}
protected override void OnRemove()
{
_playingSound?.Stop();