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 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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user