]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix certain foldable items not being possible to store in crates/lockers (#36625)
authorSlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Wed, 16 Apr 2025 11:54:42 +0000 (13:54 +0200)
committerGitHub <noreply@github.com>
Wed, 16 Apr 2025 11:54:42 +0000 (13:54 +0200)
Remove OnStoreThisAttempt

Content.Shared/Foldable/FoldableSystem.cs

index 3ece56720a80f167c915c4d0d15c7bcaa829a74d..3ba4201e79524d4251757b4c34b449982049ae86 100644 (file)
@@ -9,6 +9,7 @@ using Robust.Shared.Utility;
 
 namespace Content.Shared.Foldable;
 
+// TODO: This system could arguably be refactored into a general state system, as it is being utilized for a lot of different objects with various needs.
 public sealed class FoldableSystem : EntitySystem
 {
     [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
@@ -24,7 +25,6 @@ public sealed class FoldableSystem : EntitySystem
 
         SubscribeLocalEvent<FoldableComponent, ComponentInit>(OnFoldableInit);
         SubscribeLocalEvent<FoldableComponent, ContainerGettingInsertedAttemptEvent>(OnInsertEvent);
-        SubscribeLocalEvent<FoldableComponent, InsertIntoEntityStorageAttemptEvent>(OnStoreThisAttempt);
         SubscribeLocalEvent<FoldableComponent, StorageOpenAttemptEvent>(OnFoldableOpenAttempt);
 
         SubscribeLocalEvent<FoldableComponent, StrapAttemptEvent>(OnStrapAttempt);
@@ -46,12 +46,6 @@ public sealed class FoldableSystem : EntitySystem
             args.Cancelled = true;
     }
 
-    public void OnStoreThisAttempt(EntityUid uid, FoldableComponent comp, ref InsertIntoEntityStorageAttemptEvent args)
-    {
-        if (comp.IsFolded)
-            args.Cancelled = true;
-    }
-
     public void OnStrapAttempt(EntityUid uid, FoldableComponent comp, ref StrapAttemptEvent args)
     {
         if (comp.IsFolded)