Fix ItemMapper whitelist mispredict when inserting or removing items (#29461)

* Fix ItemMapper whitelist mispredict when inserting or removing items

Makes the ItemMapper MapLayerData available on client so that the client
can predict whether an inserted/removed item changes the visibility of
a sprite layer.

* review

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
ShadowCommander
2024-06-29 21:34:06 -07:00
committed by GitHub
parent 3aa6270de6
commit afe9f3ae85
2 changed files with 5 additions and 5 deletions

View File

@@ -95,7 +95,7 @@ namespace Content.Shared.Storage.EntitySystems
var list = new List<string>();
foreach (var mapLayerData in itemMapper.MapLayers.Values)
{
var count = containedLayers.Count(ent => _whitelistSystem.IsWhitelistPass(mapLayerData.ServerWhitelist, ent));
var count = containedLayers.Count(ent => _whitelistSystem.IsWhitelistPass(mapLayerData.Whitelist, ent));
if (count >= mapLayerData.MinCount && count <= mapLayerData.MaxCount)
{
list.Add(mapLayerData.Layer);