Explosion refactor fixes pt1 (#7375)

This commit is contained in:
Leon Friedrich
2022-04-05 19:22:35 +12:00
committed by GitHub
parent 722a408c41
commit 311450864c
15 changed files with 239 additions and 78 deletions

View File

@@ -51,6 +51,22 @@ public sealed class ExplosiveComponent : Component
[DataField("totalIntensity")]
public float TotalIntensity = 10;
/// <summary>
/// Factor used to scale the explosion intensity when calculating tile break chances. Allows for stronger
/// explosives that don't space tiles, without having to create a new explosion-type prototype.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("tileBreakScale")]
public float TileBreakScale = 1f;
/// <summary>
/// Maximum number of times that an explosive can break a tile. Currently, for normal space ships breaking a
/// tile twice will result in a vacuum.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("maxTileBreak")]
public int MaxTileBreak = int.MaxValue;
/// <summary>
/// Avoid somehow double-triggering this explosion (e.g. by damaging this entity from its own explosion.
/// </summary>