]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[HOTFIX] Fix status effect removal from entity effects and buckets not being draggabl...
authorPrincess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Tue, 28 Oct 2025 18:31:53 +0000 (11:31 -0700)
committerGitHub <noreply@github.com>
Tue, 28 Oct 2025 18:31:53 +0000 (14:31 -0400)
just do less work it's that easy!

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Shared/Fluids/EntitySystems/SolutionDumpingSystem.cs
Content.Shared/StatusEffectNew/StatusEffectSystem.API.cs

index b2bbcb2942e7729a543493116a6927265cb21e72..a6f4a8b31f9de2dd6e8cddb50fb13428ab5d7fc1 100644 (file)
@@ -4,7 +4,6 @@ using Content.Shared.Chemistry.Components;
 using Content.Shared.Chemistry.EntitySystems;
 using Content.Shared.DragDrop;
 using Content.Shared.FixedPoint;
-using Content.Shared.Item;
 using Content.Shared.Nutrition.EntitySystems;
 using Content.Shared.Popups;
 using Robust.Shared.Audio.Systems;
@@ -20,7 +19,6 @@ namespace Content.Shared.Fluids.EntitySystems;
 /// </remarks>
 /// <seealso cref="DumpableSolutionComponent" />
 /// <seealso cref="DrainableSolutionComponent" />
-/// <seealso cref="RefillableSolutionComponent" />
 public sealed class SolutionDumpingSystem : EntitySystem
 {
     [Dependency] private readonly IPrototypeManager _protoMan = default!;
@@ -30,8 +28,6 @@ public sealed class SolutionDumpingSystem : EntitySystem
     [Dependency] private readonly SharedPopupSystem _popup = default!;
     [Dependency] private readonly SharedSolutionContainerSystem _solContainer = default!;
 
-    private EntityQuery<ItemComponent> _itemQuery;
-    private EntityQuery<RefillableSolutionComponent> _refillableQuery;
     private EntityQuery<DumpableSolutionComponent> _dumpQuery;
 
     public override void Initialize()
@@ -40,22 +36,17 @@ public sealed class SolutionDumpingSystem : EntitySystem
 
         SubscribeLocalEvent<DrainableSolutionComponent, CanDragEvent>(OnDrainableCanDrag);
         SubscribeLocalEvent<DrainableSolutionComponent, CanDropDraggedEvent>(OnDrainableCanDragDropped);
-
-        //SubscribeLocalEvent<RefillableSolutionComponent, DragDropDraggedEvent>(OnRefillableDragged); For if you want to refill a container by dragging it into another one. Can't find a use for that currently.
         SubscribeLocalEvent<DrainableSolutionComponent, DragDropDraggedEvent>(OnDrainableDragged);
 
         SubscribeLocalEvent<DumpableSolutionComponent, DrainedTargetEvent>(OnDrainedToDumpableDragged);
 
         // We use queries for these since CanDropDraggedEvent gets called pretty rapidly
-        _itemQuery = GetEntityQuery<ItemComponent>();
-        _refillableQuery = GetEntityQuery<RefillableSolutionComponent>();
         _dumpQuery = GetEntityQuery<DumpableSolutionComponent>();
     }
 
     private void OnDrainableCanDrag(Entity<DrainableSolutionComponent> ent, ref CanDragEvent args)
     {
-        if (_itemQuery.HasComp(ent))
-            args.Handled = true;
+        args.Handled = true;
     }
 
     private void OnDrainableCanDragDropped(Entity<DrainableSolutionComponent> ent, ref CanDropDraggedEvent args)
index 0d153ecfaa24b30fa2fb8616329efb4b0fd72b1b..ab6362746cb5791eeb5f348551d1d91ac5faad7a 100644 (file)
@@ -306,7 +306,7 @@ public sealed partial class StatusEffectsSystem
     /// <returns> True if duration was edited successfully, false otherwise.</returns>
     public bool TryRemoveTime(EntityUid uid, EntProtoId effectProto, TimeSpan? time)
     {
-        return time == null ? TryRemoveStatusEffect(uid, effectProto) : TryAddTime(uid, effectProto, time.Value);
+        return time == null ? TryRemoveStatusEffect(uid, effectProto) : TryAddTime(uid, effectProto, time.Value);
     }
 
     /// <summary>