Replace obsolete EntityWhitelist IsValid usages (#28465)
* Replace obsolete whitelist is valid with whitelist system * Consistency * Fix logic * Bork * I figured out how to get whitelists on the client lol * test fail * woops * HELP ME FUNCTIONS * Fix errors * simplify --------- Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -55,6 +55,7 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
[Dependency] protected readonly SharedTransformSystem TransformSystem = default!;
|
||||
[Dependency] private readonly SharedUserInterfaceSystem _ui = default!;
|
||||
[Dependency] protected readonly UseDelaySystem UseDelay = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
|
||||
private EntityQuery<ItemComponent> _itemQuery;
|
||||
private EntityQuery<StackComponent> _stackQuery;
|
||||
@@ -860,13 +861,8 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
return false;
|
||||
}
|
||||
|
||||
if (storageComp.Whitelist?.IsValid(insertEnt, EntityManager) == false)
|
||||
{
|
||||
reason = "comp-storage-invalid-container";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (storageComp.Blacklist?.IsValid(insertEnt, EntityManager) == true)
|
||||
if (_whitelistSystem.IsWhitelistFail(storageComp.Whitelist, insertEnt) ||
|
||||
_whitelistSystem.IsBlacklistPass(storageComp.Blacklist, insertEnt))
|
||||
{
|
||||
reason = "comp-storage-invalid-container";
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user