Merge remote-tracking branch 'upstream/master' into ed-04-06-2024-upstream

# Conflicts:
#	Resources/Prototypes/Accents/word_replacements.yml
This commit is contained in:
Ed
2024-06-04 18:09:38 +03:00
418 changed files with 3648 additions and 3761 deletions

View File

@@ -1,6 +1,7 @@
using Content.Shared.Storage;
using Content.Shared.Storage;
using Content.Shared.Storage.Components;
using Content.Shared.Storage.EntitySystems;
using Content.Shared.Whitelist;
using JetBrains.Annotations;
using Robust.Shared.Containers;
@@ -9,6 +10,7 @@ namespace Content.Server.Storage.EntitySystems
[UsedImplicitly]
public sealed class ItemCounterSystem : SharedItemCounterSystem
{
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
protected override int? GetCount(ContainerModifiedMessage msg, ItemCounterComponent itemCounter)
{
if (!EntityManager.TryGetComponent(msg.Container.Owner, out StorageComponent? component))
@@ -19,7 +21,7 @@ namespace Content.Server.Storage.EntitySystems
var count = 0;
foreach (var entity in component.Container.ContainedEntities)
{
if (itemCounter.Count.IsValid(entity))
if (_whitelistSystem.IsWhitelistPass(itemCounter.Count, entity))
count++;
}