entity storage tweaks (#19182)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user