diff --git a/Content.Server/IgnitionSource/IgnitionEvent.cs b/Content.Server/IgnitionSource/IgnitionEvent.cs
new file mode 100644
index 0000000000..b86bf52b2d
--- /dev/null
+++ b/Content.Server/IgnitionSource/IgnitionEvent.cs
@@ -0,0 +1,7 @@
+namespace Content.Server.IgnitionSource;
+
+///
+/// Raised in order to toggle the ignitionSourceComponent on an entity on or off
+///
+[ByRefEvent]
+public readonly record struct IgnitionEvent(bool Ignite = false);
diff --git a/Content.Server/IgnitionSource/IgnitionSourceSystem.cs b/Content.Server/IgnitionSource/IgnitionSourceSystem.cs
index c20e5207a4..3925cc86b5 100644
--- a/Content.Server/IgnitionSource/IgnitionSourceSystem.cs
+++ b/Content.Server/IgnitionSource/IgnitionSourceSystem.cs
@@ -19,18 +19,25 @@ public sealed class IgnitionSourceSystem : EntitySystem
SubscribeLocalEvent(OnIsHot);
SubscribeLocalEvent(OnItemToggle);
+ SubscribeLocalEvent(OnIgnitionEvent);
}
private void OnIsHot(Entity ent, ref IsHotEvent args)
{
- SetIgnited((ent.Owner, ent.Comp), args.IsHot);
+ args.IsHot = ent.Comp.Ignited;
}
+
private void OnItemToggle(Entity ent, ref ItemToggledEvent args)
{
if (TryComp(ent, out var comp))
SetIgnited((ent.Owner, comp), args.Activated);
}
+ private void OnIgnitionEvent(Entity ent, ref IgnitionEvent args)
+ {
+ SetIgnited((ent.Owner, ent.Comp), args.Ignite);
+ }
+
///
/// Simply sets the ignited field to the ignited param.
///
diff --git a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs
index 571c23c5db..ba44b42ead 100644
--- a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs
+++ b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs
@@ -1,3 +1,4 @@
+using Content.Server.IgnitionSource;
using Content.Server.Light.Components;
using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems;
@@ -99,8 +100,8 @@ namespace Content.Server.Light.EntitySystems
_item.SetHeldPrefix(ent, "lit", component: item);
}
- var isHotEvent = new IsHotEvent() {IsHot = true};
- RaiseLocalEvent(ent, isHotEvent);
+ var ignite = new IgnitionEvent(true);
+ RaiseLocalEvent(ent, ref ignite);
component.CurrentState = ExpendableLightState.Lit;
component.StateExpiryTime = component.GlowDuration;
@@ -134,8 +135,8 @@ namespace Content.Server.Light.EntitySystems
case ExpendableLightState.Dead:
_appearance.SetData(ent, ExpendableLightVisuals.Behavior, string.Empty, appearance);
- var isHotEvent = new IsHotEvent() {IsHot = true};
- RaiseLocalEvent(ent, isHotEvent);
+ var ignite = new IgnitionEvent(false);
+ RaiseLocalEvent(ent, ref ignite);
break;
}
}
diff --git a/Resources/Prototypes/Entities/Objects/Tools/flare.yml b/Resources/Prototypes/Entities/Objects/Tools/flare.yml
index fdf5314863..d36f67d00d 100644
--- a/Resources/Prototypes/Entities/Objects/Tools/flare.yml
+++ b/Resources/Prototypes/Entities/Objects/Tools/flare.yml
@@ -26,7 +26,6 @@
loop: true
volume: -10
maxDistance: 5
-
- type: Sprite
sprite: Objects/Misc/flare.rsi
layers: