entity storage tweaks (#19182)

This commit is contained in:
Nemanja
2023-08-15 18:49:30 -04:00
committed by GitHub
parent 87b774209f
commit b8250f9601
6 changed files with 18 additions and 8 deletions

View File

@@ -395,7 +395,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
var targetIsMob = HasComp<BodyComponent>(toInsert);
var storageIsItem = HasComp<ItemComponent>(container);
var allowedToEat = HasComp<ItemComponent>(toInsert);
var allowedToEat = whitelist?.IsValid(toInsert) ?? storageIsItem;
// BEFORE REPLACING THIS WITH, I.E. A PROPERTY:
// Make absolutely 100% sure you have worked out how to stop people ending up in backpacks.
@@ -414,9 +414,6 @@ public abstract class SharedEntityStorageSystem : EntitySystem
}
}
if (allowedToEat && whitelist != null)
allowedToEat = whitelist.IsValid(toInsert);
return allowedToEat;
}