Files
tbd-station-14/Content.Server/Atmos/Components/FlammableComponent.cs
Ed aa713ea7e6 Candles (#21087)
Co-authored-by: faint <46868845+ficcialfaint@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2023-11-03 22:53:51 -07:00

67 lines
2.3 KiB
C#

using Content.Shared.Damage;
using Robust.Shared.Physics.Collision.Shapes;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
public sealed partial class FlammableComponent : Component
{
[ViewVariables]
public bool Resisting = false;
[ViewVariables]
public readonly List<EntityUid> Collided = new();
[ViewVariables(VVAccess.ReadWrite)]
public bool OnFire { get; set; }
[ViewVariables(VVAccess.ReadWrite)]
public float FireStacks { get; set; }
[ViewVariables(VVAccess.ReadWrite)]
[DataField("fireSpread")]
public bool FireSpread { get; private set; } = false;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("canResistFire")]
public bool CanResistFire { get; private set; } = false;
[DataField("damage", required: true)]
[ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier Damage = new(); // Empty by default, we don't want any funny NREs.
/// <summary>
/// Used for the fixture created to handle passing firestacks when two flammable objects collide.
/// </summary>
[DataField("flammableCollisionShape")]
public IPhysShape FlammableCollisionShape = new PhysShapeCircle(0.35f);
/// <summary>
/// Should the component be set on fire by interactions with isHot entities
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("alwaysCombustible")]
public bool AlwaysCombustible = false;
/// <summary>
/// Can the component anyhow lose its FireStacks?
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("canExtinguish")]
public bool CanExtinguish = true;
/// <summary>
/// How many firestacks should be applied to component when being set on fire?
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("firestacksOnIgnite")]
public float FirestacksOnIgnite = 2.0f;
/// <summary>
/// Determines how quickly the object will fade out. With positive values, the object will flare up instead of going out.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float FirestackFade = -0.1f;
}
}