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:
Cojoke
2024-02-28 15:59:35 -06:00
committed by GitHub
parent a91b445522
commit dddec4dcc6
2 changed files with 10 additions and 1 deletions

View File

@@ -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.