2024-04-14 18:31:23 +03:00
|
|
|
namespace Content.Server._CP14.Temperature;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A component that allows fire to spread to nearby objects. The basic mechanics of a spreading fire
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
2024-04-20 12:45:25 +03:00
|
|
|
[RegisterComponent, Access(typeof(CP14FireSpreadSystem))]
|
|
|
|
|
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-09-24 13:46:26 +03:00
|
|
|
public float Prob = 0.3f;
|
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-09-24 13:46:26 +03:00
|
|
|
public float ProbTile = 0.2f;
|
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-09-24 13:46:26 +03:00
|
|
|
public float SpreadCooldownMin = 4f;
|
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-09-24 13:46:26 +03:00
|
|
|
public float SpreadCooldownMax = 14f;
|
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;
|
|
|
|
|
}
|