@@ -1,8 +1,11 @@
|
|||||||
namespace Content.Server.Atmos.Components;
|
namespace Content.Server.Atmos.Components;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Component that can be used to add (or remove) fire stacks when used as a melee weapon.
|
||||||
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed partial class IgniteOnMeleeHitComponent : Component
|
public sealed partial class IgniteOnMeleeHitComponent : Component
|
||||||
{
|
{
|
||||||
[DataField("fireStacks")]
|
[DataField]
|
||||||
public float FireStacks { get; set; }
|
public float FireStacks { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,8 +85,9 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
if (!TryComp<FlammableComponent>(entity, out var flammable))
|
if (!TryComp<FlammableComponent>(entity, out var flammable))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
flammable.FireStacks += component.FireStacks;
|
AdjustFireStacks(entity, component.FireStacks, flammable);
|
||||||
Ignite(entity, args.Weapon, flammable, args.User);
|
if (component.FireStacks >= 0)
|
||||||
|
Ignite(entity, args.Weapon, flammable, args.User);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
- type: Prying
|
- type: Prying
|
||||||
- type: UseDelay
|
- type: UseDelay
|
||||||
delay: 1
|
delay: 1
|
||||||
|
- type: IgniteOnMeleeHit
|
||||||
|
fireStacks: -4
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: FireAxeFlaming
|
id: FireAxeFlaming
|
||||||
|
|||||||
Reference in New Issue
Block a user