Start rebalancing anomalies - Rock and Flesh anomaly reworked (#24381)

* rework

* bruh

* all fixed

* balance

* bb

* Update TileAnomalySystem.cs

* Update EntityAnomalySystem.cs
This commit is contained in:
Ed
2024-01-23 15:32:05 +03:00
committed by GitHub
parent 1ab06db7ae
commit b02c211e2f
17 changed files with 660 additions and 205 deletions

View File

@@ -2,52 +2,71 @@ using Robust.Shared.Prototypes;
namespace Content.Shared.Anomaly.Effects.Components;
[RegisterComponent]
[RegisterComponent, Access(typeof(SharedEntityAnomalySystem))]
public sealed partial class EntitySpawnAnomalyComponent : Component
{
/// <summary>
/// All types of entity spawns with their settings
/// </summary>
[DataField]
public List<EntitySpawnSettingsEntry> Entries = new();
}
[DataDefinition, Serializable]
public partial record struct EntitySpawnSettingsEntry()
{
/// <summary>
/// A list of entities that are random picked to be spawned on each pulse
/// </summary>
[DataField]
public List<EntProtoId> Spawns = new();
public List<EntProtoId> Spawns { get; set; } = new();
/// <summary>
/// A list of entities that are random picked to be spawned when supercritical;
/// The minimum number of entities that spawn per pulse
/// </summary>
[DataField]
public List<EntProtoId> SuperCriticalSpawns = new();
public int MinAmount { get; set; } = 0;
/// <summary>
/// The maximum number of entities that spawn per pulse
/// scales with severity.
/// </summary>
[DataField("maxSpawnAmount"), ViewVariables(VVAccess.ReadWrite)]
public int MaxSpawnAmount = 7;
[DataField]
public int MaxAmount { get; set; } = 1;
/// <summary>
/// The distance from the anomaly in which the entities will not appear
/// </summary>
[DataField]
public float MinRange { get; set; } = 0f;
/// <summary>
/// The maximum radius the entities will spawn in.
/// Also governs the maximum reach of flesh tiles
/// scales with stability
/// </summary>
[DataField("spawnRange"), ViewVariables(VVAccess.ReadWrite)]
public float SpawnRange = 5f;
[DataField]
public float MaxRange { get; set; } = 1f;
/// <summary>
/// Whether or not anomaly spawns entities on Pulse
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool SpawnOnPulse = true;
[DataField]
public bool SpawnOnPulse { get; set; } = false;
/// <summary>
/// Whether or not anomaly spawns entities on SuperCritical
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool SpawnOnSuperCritical = true;
[DataField]
public bool SpawnOnSuperCritical { get; set; } = false;
/// <summary>
/// Whether or not anomaly spawns entities on StabilityChanged
/// The idea was to spawn entities either on Pulse/Supercritical OR StabilityChanged
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool SpawnOnStabilityChanged = false;
[DataField]
public bool SpawnOnStabilityChanged { get; set; } = false;
/// <summary>
/// Whether or not anomaly spawns entities on SeverityChanged
/// </summary>
[DataField]
public bool SpawnOnSeverityChanged { get; set; } = false;
}