From dddec4dcc66d8ae728c91ff49b5c06ef95545475 Mon Sep 17 00:00:00 2001 From: Cojoke <83733158+Cojoke-dot@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:59:35 -0600 Subject: [PATCH] Makes the e-sword light plasma fires, as intended. (#25665) * Makes the e-sword light plasma fires, as intended. * remove blank line --- Content.Server/IgnitionSource/IgnitionSourceSystem.cs | 9 ++++++++- .../Entities/Objects/Weapons/Melee/e_sword.yml | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Content.Server/IgnitionSource/IgnitionSourceSystem.cs b/Content.Server/IgnitionSource/IgnitionSourceSystem.cs index 0a714063f4..2c0b82613c 100644 --- a/Content.Server/IgnitionSource/IgnitionSourceSystem.cs +++ b/Content.Server/IgnitionSource/IgnitionSourceSystem.cs @@ -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(OnIsHot); + SubscribeLocalEvent(OnItemToggle); } private void OnIsHot(Entity ent, ref IsHotEvent args) { SetIgnited((ent.Owner, ent.Comp), args.IsHot); } + private void OnItemToggle(Entity ent, ref ItemToggledEvent args) + { + if (TryComp(ent, out var comp)) + SetIgnited((ent.Owner, comp), args.Activated); + } /// /// Simply sets the ignited field to the ignited param. diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml index 2dc4db493a..13c8b9cb25 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml @@ -78,6 +78,8 @@ malus: 0 - type: Reflect enabled: false + - type: IgnitionSource + temperature: 700 - type: entity name: pen