Revert "Start rebalancing anomalies - Rock and Flesh anomaly reworked" (#24448)

This commit is contained in:
Ed
2024-01-23 15:40:37 +03:00
committed by GitHub
parent a68d0eefe6
commit 05a7eb07c2
17 changed files with 216 additions and 671 deletions

View File

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

View File

@@ -0,0 +1,26 @@
using Content.Shared.Maps;
using Robust.Shared.Prototypes;
namespace Content.Shared.Anomaly.Effects.Components;
[RegisterComponent]
public sealed partial class TileSpawnAnomalyComponent : Component
{
/// <summary>
/// The maximum radius of tiles scales with stability
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float SpawnRange = 5f;
/// <summary>
/// The probability a tile will spawn.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float SpawnChance = 0.33f;
/// <summary>
/// The tile that is spawned by the anomaly's effect
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public ProtoId<ContentTileDefinition> FloorTileId = "FloorFlesh";
}

View File

@@ -1,73 +0,0 @@
using Content.Shared.Maps;
using Robust.Shared.Prototypes;
namespace Content.Shared.Anomaly.Effects.Components;
[RegisterComponent, Access(typeof(SharedTileAnomalySystem))]
public sealed partial class TileSpawnAnomalyComponent : Component
{
/// <summary>
/// All types of floors spawns with their settings
/// </summary>
[DataField]
public List<TileSpawnSettingsEntry> Entries = new();
}
[DataDefinition, Serializable]
public partial record struct TileSpawnSettingsEntry()
{
/// <summary>
/// The tile that is spawned by the anomaly's effect
/// </summary>
[DataField(required: true)]
public ProtoId<ContentTileDefinition> Floor { get; set; } = default!;
/// <summary>
/// The minimum number of tiles that spawn per pulse
/// </summary>
[DataField]
public int MinAmount { get; set; } = 0;
/// <summary>
/// The maximum number of tiles that spawn per pulse
/// scales with severity.
/// </summary>
[DataField]
public int MaxAmount { get; set; } = 1;
/// <summary>
/// The distance from the anomaly in which the tiles will not appear
/// </summary>
[DataField]
public float MinRange { get; set; } = 0f;
/// <summary>
/// The maximum radius the tiles will spawn in.
/// </summary>
[DataField]
public float MaxRange { get; set; } = 1f;
/// <summary>
/// Whether or not anomaly spawns tiles on Pulse
/// </summary>
[DataField]
public bool SpawnOnPulse { get; set; } = false;
/// <summary>
/// Whether or not anomaly spawns tiles on SuperCritical
/// </summary>
[DataField]
public bool SpawnOnSuperCritical { get; set; } = false;
/// <summary>
/// Whether or not anomaly spawns tiles on StabilityChanged
/// </summary>
[DataField]
public bool SpawnOnStabilityChanged { get; set; } = false;
/// <summary>
/// Whether or not anomaly spawns tiles on StabilityChanged
/// </summary>
[DataField]
public bool SpawnOnSeverityChanged { get; set; } = false;
}