]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
ContainmentFieldComponent's garbage destruction can now be disabled (#29376)
authormhamster <81412348+mhamsterr@users.noreply.github.com>
Sun, 23 Jun 2024 15:34:32 +0000 (22:34 +0700)
committerGitHub <noreply@github.com>
Sun, 23 Jun 2024 15:34:32 +0000 (11:34 -0400)
* Garbage Vaporizer 3000

+ DestroyGarbage bool property
+ DestroyGarbage property check when dealing with incoming trash

* Update ContainmentFieldComponent.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs
Content.Shared/Singularity/Components/ContainmentFieldComponent.cs

index 561db76a470f0b625040eac61cf94688051afed9..3944e94c20d8f957b675ea0fa59aa3afd2735cf5 100644 (file)
@@ -26,7 +26,7 @@ public sealed class ContainmentFieldSystem : EntitySystem
     {
         var otherBody = args.OtherEntity;
 
-        if (HasComp<SpaceGarbageComponent>(otherBody))
+        if (component.DestroyGarbage && HasComp<SpaceGarbageComponent>(otherBody))
         {
             _popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), uid, PopupType.LargeCaution);
             QueueDel(otherBody);
index 43163a0c5cd5323abc2e5f86455fea27f9943d60..621bbe8ff942d2b3b39a0b563ca63deb37c2da95 100644 (file)
@@ -18,4 +18,10 @@ public sealed partial class ContainmentFieldComponent : Component
     /// </summary>
     [DataField("maxMass")]
     public float MaxMass = 10000f;
+
+    /// <summary>
+    /// Should field vaporize garbage that collides with it?
+    /// </summary>
+    [DataField]
+    public bool DestroyGarbage = true;
 }