Omega Cartridges Uplink rounds for CHIMP. (#15755)

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
brainfood1183
2023-05-02 07:11:04 +01:00
committed by GitHub
parent e30c3ec5ad
commit d598ada16f
15 changed files with 114 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
using Content.Server.Anomaly.Components;
using Content.Server.Anomaly.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Audio;
using Content.Server.Explosion.EntitySystems;
@@ -75,15 +75,15 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
// small function to randomize because it's easier to read like this
float VaryValue(float v) => v * Random.NextFloat(MinParticleVariation, MaxParticleVariation);
if (particle.ParticleType == component.DestabilizingParticleType)
if (particle.ParticleType == component.DestabilizingParticleType || particle.DestabilzingOverride)
{
ChangeAnomalyStability(uid, VaryValue(particle.StabilityPerDestabilizingHit), component);
}
else if (particle.ParticleType == component.SeverityParticleType)
if (particle.ParticleType == component.SeverityParticleType || particle.SeverityOverride)
{
ChangeAnomalySeverity(uid, VaryValue(particle.SeverityPerSeverityHit), component);
}
else if (particle.ParticleType == component.WeakeningParticleType)
if (particle.ParticleType == component.WeakeningParticleType || particle.WeakeningOverride)
{
ChangeAnomalyHealth(uid, VaryValue(particle.HealthPerWeakeningeHit), component);
ChangeAnomalyStability(uid, VaryValue(particle.StabilityPerWeakeningeHit), component);

View File

@@ -1,4 +1,4 @@
using Content.Shared.Anomaly;
using Content.Shared.Anomaly;
using Content.Shared.Anomaly.Components;
namespace Content.Server.Anomaly.Components;
@@ -49,4 +49,22 @@ public sealed class AnomalousParticleComponent : Component
/// </summary>
[DataField("stabilityPerWeakeningeHit")]
public float StabilityPerWeakeningeHit = -0.1f;
/// <summary>
/// If this is true then the particle will always affect the stability of the anomaly.
/// </summary>
[DataField("destabilzingOverride")]
public bool DestabilzingOverride = false;
/// <summary>
/// If this is true then the particle will always affect the weakeness of the anomaly.
/// </summary>
[DataField("weakeningOverride")]
public bool WeakeningOverride = false;
/// <summary>
/// If this is true then the particle will always affect the severity of the anomaly.
/// </summary>
[DataField("severityOverride")]
public bool SeverityOverride = false;
}