2024-11-21 22:01:14 +03:00
|
|
|
namespace Content.Shared._CP14.Temperature;
|
2024-04-14 18:31:23 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A component that allows fire to spread to nearby objects. The basic mechanics of a spreading fire
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
2024-11-21 22:01:14 +03:00
|
|
|
[RegisterComponent, Access(typeof(CP14SharedFireSpreadSystem))]
|
2024-04-20 12:45:25 +03:00
|
|
|
public sealed partial class CP14FireSpreadComponent : Component
|
2024-04-14 18:31:23 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// radius of ignition of neighboring objects
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public float Radius = 1f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// chance of spreading to neighboring properties
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
2024-11-21 22:01:14 +03:00
|
|
|
public float Prob = 0.1f;
|
2024-04-14 18:31:23 +03:00
|
|
|
|
2024-06-09 15:45:27 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// chance of tile spreading to neighboring properties
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
2024-11-21 22:01:14 +03:00
|
|
|
public float ProbTile = 0.1f;
|
2024-06-09 15:45:27 +03:00
|
|
|
|
2024-04-14 18:31:23 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// how often objects will try to set the neighbors on fire. In Seconds
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
2024-11-21 22:01:14 +03:00
|
|
|
public float SpreadCooldownMin = 5f;
|
2024-04-14 18:31:23 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// how often objects will try to set the neighbors on fire. In Seconds
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
2024-11-21 22:01:14 +03:00
|
|
|
public float SpreadCooldownMax = 10f;
|
2024-04-14 18:31:23 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// the time of the next fire spread
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public TimeSpan NextSpreadTime { get; set; } = TimeSpan.Zero;
|
|
|
|
|
}
|