Makes the e-sword light plasma fires, as intended. (#25665)
* Makes the e-sword light plasma fires, as intended. * remove blank line
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Shared.Item.ItemToggle.Components;
|
||||
using Content.Shared.Temperature;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
@@ -17,12 +18,18 @@ public sealed class IgnitionSourceSystem : EntitySystem
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<IgnitionSourceComponent, IsHotEvent>(OnIsHot);
|
||||
SubscribeLocalEvent<ItemToggleHotComponent, ItemToggledEvent>(OnItemToggle);
|
||||
}
|
||||
|
||||
private void OnIsHot(Entity<IgnitionSourceComponent> ent, ref IsHotEvent args)
|
||||
{
|
||||
SetIgnited((ent.Owner, ent.Comp), args.IsHot);
|
||||
}
|
||||
private void OnItemToggle(Entity<ItemToggleHotComponent> ent, ref ItemToggledEvent args)
|
||||
{
|
||||
if (TryComp<IgnitionSourceComponent>(ent, out var comp))
|
||||
SetIgnited((ent.Owner, comp), args.Activated);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Simply sets the ignited field to the ignited param.
|
||||
|
||||
Reference in New Issue
Block a user