From: Cojoke <83733158+Cojoke-dot@users.noreply.github.com> Date: Wed, 28 Feb 2024 21:59:35 +0000 (-0600) Subject: Makes the e-sword light plasma fires, as intended. (#25665) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=dddec4dcc66d8ae728c91ff49b5c06ef95545475;p=space-station-14.git Makes the e-sword light plasma fires, as intended. (#25665) * Makes the e-sword light plasma fires, as intended. * remove blank line --- 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