]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix candy bowls (#25514)
authorKrunklehorn <42424291+Krunklehorn@users.noreply.github.com>
Sun, 25 Feb 2024 13:08:14 +0000 (08:08 -0500)
committerGitHub <noreply@github.com>
Sun, 25 Feb 2024 13:08:14 +0000 (00:08 +1100)
* Before SharedItemSystem

* Fixes mispredict, removed unused

* Fix physics

Content.Shared/Storage/EntitySystems/BinSystem.cs
Resources/Prototypes/Entities/Objects/Misc/candy_bowl.yml

index afb1e52881182259569be42a73d38aeea14ff21c..17c3eb4288c0007dd003e2f32ea1727db91b3bc3 100644 (file)
@@ -4,12 +4,11 @@ using Content.Shared.Database;
 using Content.Shared.Examine;
 using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Interaction;
+using Content.Shared.Item;
 using Content.Shared.Storage.Components;
 using Content.Shared.Verbs;
 using Robust.Shared.Containers;
-using Robust.Shared.Map;
 using Robust.Shared.Network;
-using Robust.Shared.Timing;
 
 namespace Content.Shared.Storage.EntitySystems;
 
@@ -18,7 +17,6 @@ namespace Content.Shared.Storage.EntitySystems;
 /// </summary>
 public sealed class BinSystem : EntitySystem
 {
-    [Dependency] private readonly IGameTiming _timing = default!;
     [Dependency] private readonly INetManager _net = default!;
     [Dependency] private readonly ISharedAdminLogManager _admin = default!;
     [Dependency] private readonly SharedContainerSystem _container = default!;
@@ -32,7 +30,7 @@ public sealed class BinSystem : EntitySystem
         SubscribeLocalEvent<BinComponent, ComponentStartup>(OnStartup);
         SubscribeLocalEvent<BinComponent, MapInitEvent>(OnMapInit);
         SubscribeLocalEvent<BinComponent, EntRemovedFromContainerMessage>(OnEntRemoved);
-        SubscribeLocalEvent<BinComponent, InteractHandEvent>(OnInteractHand);
+        SubscribeLocalEvent<BinComponent, InteractHandEvent>(OnInteractHand, before: new[] { typeof(SharedItemSystem) });
         SubscribeLocalEvent<BinComponent, AfterInteractUsingEvent>(OnAfterInteractUsing);
         SubscribeLocalEvent<BinComponent, GetVerbsEvent<AlternativeVerb>>(OnAltInteractHand);
         SubscribeLocalEvent<BinComponent, ExaminedEvent>(OnExamined);
@@ -73,7 +71,7 @@ public sealed class BinSystem : EntitySystem
 
     private void OnInteractHand(EntityUid uid, BinComponent component, InteractHandEvent args)
     {
-        if (args.Handled || !_timing.IsFirstTimePredicted)
+        if (args.Handled)
             return;
 
         EntityUid? toGrab = component.Items.LastOrDefault();
@@ -111,9 +109,6 @@ public sealed class BinSystem : EntitySystem
         if (handled || !canReach)
             return;
 
-        if (!_timing.IsFirstTimePredicted)
-            return;
-
         if (!TryInsertIntoBin(target, itemInHand, component))
             return;
 
index 843b402a6c86497e720315c5c4b2d7a91825bbcf..fe275e3be318331c11b9ff871d5df738a52fa02e 100644 (file)
         shape:
           !type:PhysShapeAabb
           bounds: "-0.10,-0.10,0.10,0.10"
-        density: 3
+        density: 20
         mask:
-          - TabletopMachineMask
+        - TabletopMachineMask
+        restitution: 0.3
+        friction: 0.2
   - type: InteractionOutline
   - type: ItemMapper
     sprite: Objects/Misc/candy_bowl.rsi