Files
tbd-station-14/Content.Server/GameObjects/Components/Singularity/SingularityGenerator.cs
20kdc e88c092c3c Bring singularity back from the brink of "particles don't even hit" (#3963)
* Bring singularity back from the brink of "particles don't even hit anything"

* Remove force-disable-hard from singularity code so it doesn't just ignore containment

Shouldn't this be the prototype's job if they want that so much?
This might have some sorta downside, but this brings singulo back into being containable

* Apply ShadowCommander's suggested layers/masks for particles

Tested, singulo properly spawns and develops with this mask

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
2021-05-23 21:14:15 -07:00

32 lines
864 B
C#

using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Singularity
{
[RegisterComponent]
public class SingularityGeneratorComponent : Component
{
public override string Name => "SingularityGenerator";
[ViewVariables] private int _power;
public int Power
{
get => _power;
set
{
if(_power == value) return;
_power = value;
if (_power > 15)
{
var entityManager = IoCManager.Resolve<IEntityManager>();
entityManager.SpawnEntity("Singularity", Owner.Transform.Coordinates);
//dont delete ourselves, just wait to get eaten
}
}
}
}
}