EntityWhitelist uses EntityUid
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
|
||||
private void OnComponentInit(EntityUid uid, SharedItemSlotsComponent itemSlots, ComponentInit args)
|
||||
{
|
||||
// create container for each slot
|
||||
// create container for each slot
|
||||
foreach (var pair in itemSlots.Slots)
|
||||
{
|
||||
var slotName = pair.Key;
|
||||
@@ -131,7 +131,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
foreach (var (slotName, slot) in itemSlots.Slots)
|
||||
{
|
||||
// check if item allowed in whitelist
|
||||
if (slot.Whitelist != null && !slot.Whitelist.IsValid(item))
|
||||
if (slot.Whitelist != null && !slot.Whitelist.IsValid(item.Uid))
|
||||
continue;
|
||||
|
||||
// check if slot does not contain the item currently being inserted???
|
||||
@@ -179,7 +179,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
return false;
|
||||
|
||||
// check if item allowed in whitelist
|
||||
if (slot.Whitelist != null && !slot.Whitelist.IsValid(item))
|
||||
if (slot.Whitelist != null && !slot.Whitelist.IsValid(item.Uid))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user