]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Makes the e-sword light plasma fires, as intended. (#25665)
authorCojoke <83733158+Cojoke-dot@users.noreply.github.com>
Wed, 28 Feb 2024 21:59:35 +0000 (15:59 -0600)
committerGitHub <noreply@github.com>
Wed, 28 Feb 2024 21:59:35 +0000 (16:59 -0500)
* Makes the e-sword light plasma fires, as intended.

* remove blank line

Content.Server/IgnitionSource/IgnitionSourceSystem.cs
Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml

index 0a714063f413764a61802d85c6d7161345873e65..2c0b82613ca019ee9fceba7fd238c63f7f08a5a9 100644 (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 Robust.Server.GameObjects;
 
@@ -17,12 +18,18 @@ public sealed class IgnitionSourceSystem : EntitySystem
         base.Initialize();
 
         SubscribeLocalEvent<IgnitionSourceComponent, IsHotEvent>(OnIsHot);
+        SubscribeLocalEvent<ItemToggleHotComponent, ItemToggledEvent>(OnItemToggle);
     }
 
     private void OnIsHot(Entity<IgnitionSourceComponent> ent, ref IsHotEvent args)
     {
         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>
     /// Simply sets the ignited field to the ignited param.
index 2dc4db493a7b6715cccb331fccc31d004b327875..13c8b9cb25c508a3d5f60831018092cf150bee00 100644 (file)
@@ -78,6 +78,8 @@
     malus: 0
   - type: Reflect
     enabled: false
+  - type: IgnitionSource
+    temperature: 700
 
 - type: entity
   name: pen