From: mhamster <81412348+mhamsterr@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:34:32 +0000 (+0700) Subject: ContainmentFieldComponent's garbage destruction can now be disabled (#29376) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=ba164f9e48798f462bf5b6bd0d7b9b80a9022a22;p=space-station-14.git ContainmentFieldComponent's garbage destruction can now be disabled (#29376) * Garbage Vaporizer 3000 + DestroyGarbage bool property + DestroyGarbage property check when dealing with incoming trash * Update ContainmentFieldComponent.cs Co-authored-by: Tayrtahn --------- Co-authored-by: Tayrtahn --- diff --git a/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs b/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs index 561db76a47..3944e94c20 100644 --- a/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs +++ b/Content.Server/Singularity/EntitySystems/ContainmentFieldSystem.cs @@ -26,7 +26,7 @@ public sealed class ContainmentFieldSystem : EntitySystem { var otherBody = args.OtherEntity; - if (HasComp(otherBody)) + if (component.DestroyGarbage && HasComp(otherBody)) { _popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), uid, PopupType.LargeCaution); QueueDel(otherBody); diff --git a/Content.Shared/Singularity/Components/ContainmentFieldComponent.cs b/Content.Shared/Singularity/Components/ContainmentFieldComponent.cs index 43163a0c5c..621bbe8ff9 100644 --- a/Content.Shared/Singularity/Components/ContainmentFieldComponent.cs +++ b/Content.Shared/Singularity/Components/ContainmentFieldComponent.cs @@ -18,4 +18,10 @@ public sealed partial class ContainmentFieldComponent : Component /// [DataField("maxMass")] public float MaxMass = 10000f; + + /// + /// Should field vaporize garbage that collides with it? + /// + [DataField] + public bool DestroyGarbage = true; }