From e88c092c3c74ef8b72d500b141c7feebf6309322 Mon Sep 17 00:00:00 2001 From: 20kdc Date: Mon, 24 May 2021 05:14:15 +0100 Subject: [PATCH] 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> --- .../Components/Singularity/ServerSingularityComponent.cs | 1 - .../Components/Singularity/SingularityGenerator.cs | 3 ++- .../Entities/Constructible/Power/Engines/PA/particles.yml | 4 +++- .../Constructible/Power/Engines/Singularity/generator.yml | 1 + .../Constructible/Power/Engines/Singularity/singularity.yml | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameObjects/Components/Singularity/ServerSingularityComponent.cs b/Content.Server/GameObjects/Components/Singularity/ServerSingularityComponent.cs index 085c7a2a83..11a3af885a 100644 --- a/Content.Server/GameObjects/Components/Singularity/ServerSingularityComponent.cs +++ b/Content.Server/GameObjects/Components/Singularity/ServerSingularityComponent.cs @@ -113,7 +113,6 @@ namespace Content.Server.GameObjects.Components.Singularity SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/singularity_form.ogg", Owner); Timer.Spawn(5200,() => _playingSound = SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/singularity.ogg", Owner, audioParams)); - _collidableComponent!.Hard = false; Level = 1; } diff --git a/Content.Server/GameObjects/Components/Singularity/SingularityGenerator.cs b/Content.Server/GameObjects/Components/Singularity/SingularityGenerator.cs index 14bbf23cb1..25cb53a807 100644 --- a/Content.Server/GameObjects/Components/Singularity/SingularityGenerator.cs +++ b/Content.Server/GameObjects/Components/Singularity/SingularityGenerator.cs @@ -1,5 +1,6 @@ using Robust.Shared.GameObjects; using Robust.Shared.IoC; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Singularity { @@ -8,7 +9,7 @@ namespace Content.Server.GameObjects.Components.Singularity { public override string Name => "SingularityGenerator"; - private int _power; + [ViewVariables] private int _power; public int Power { diff --git a/Resources/Prototypes/Entities/Constructible/Power/Engines/PA/particles.yml b/Resources/Prototypes/Entities/Constructible/Power/Engines/PA/particles.yml index 4fbf9d8cde..be8f4d8a31 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/Engines/PA/particles.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/Engines/PA/particles.yml @@ -22,5 +22,7 @@ hard: false layer: [None] mask: - - MobMask + # Has to hit mobs, singularity, and singularity generator + - MobMask + - Opaque - type: ParticleProjectile diff --git a/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/generator.yml b/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/generator.yml index 187cf53c9d..ba9fef0866 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/generator.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/generator.yml @@ -18,6 +18,7 @@ !type:PhysShapeAabb bounds: "-0.5, -0.5, 0.5, 0.5" mass: 25 + # Keep an eye on ParticlesProjectile when adjusting these layer: - Opaque mask: diff --git a/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/singularity.yml b/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/singularity.yml index 3ea0e0654d..bf4691cda7 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/singularity.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/Engines/Singularity/singularity.yml @@ -11,6 +11,7 @@ !type:PhysShapeCircle radius: 0.5 mass: 5 + # Keep an eye on ParticlesProjectile when adjusting these layer: - Impassable mask: