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 Content.Shared.Temperature;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
@@ -17,12 +18,18 @@ public sealed class IgnitionSourceSystem : EntitySystem
base.Initialize(); base.Initialize();
SubscribeLocalEvent<IgnitionSourceComponent, IsHotEvent>(OnIsHot); SubscribeLocalEvent<IgnitionSourceComponent, IsHotEvent>(OnIsHot);
SubscribeLocalEvent<ItemToggleHotComponent, ItemToggledEvent>(OnItemToggle);
} }
private void OnIsHot(Entity<IgnitionSourceComponent> ent, ref IsHotEvent args) private void OnIsHot(Entity<IgnitionSourceComponent> ent, ref IsHotEvent args)
{ {
SetIgnited((ent.Owner, ent.Comp), args.IsHot); 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> /// <summary>
/// Simply sets the ignited field to the ignited param. /// Simply sets the ignited field to the ignited param.

View File

@@ -78,6 +78,8 @@
malus: 0 malus: 0
- type: Reflect - type: Reflect
enabled: false enabled: false
- type: IgnitionSource
temperature: 700
- type: entity - type: entity
name: pen name: pen