-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Describe your idea (If you have more than one idea, please open the rest in other issues)
Currently, the Inventory Manager peripheral identifies items based on their name, nbt, and damage values. While this works for many items, it can be ambiguous for items that share the same name but have different metadata that isn't captured in the NBT tag. This is a common scenario when interacting with mods like Refined Storage, which uses a unique fingerprint property to differentiate between otherwise identical-looking items.
My proposal is to add support for this fingerprint property to the item filtering/identification logic in the Inventory Manager. When a fingerprint is provided in an item table, the peripheral should prioritize matching that fingerprint over the other properties. If no fingerprint is provided, it should fall back to the existing name, nbt, and damage logic.
This would make the Inventory Manager much more reliable when used in conjunction with storage systems that rely on fingerprints, preventing errors where the wrong item is pulled or pushed.
Describe alternatives you've considered if any
The main alternative is to perform complex pre-filtering in the Lua script itself. This involves:
Listing all items in the adjacent inventory.
Iterating through the list to find an item that matches the name, nbt, and damage.
If a match is found, using its slot number to pull the item.
This is cumbersome, inefficient, and prone to race conditions where the item is moved before the script can act on it. It also adds significant overhead to the Lua script, which could be better handled by the peripheral itself.
Additional context
I'm developing a comprehensive colony management script that integrates MineColonies, Refined Storage, and the Inventory Manager with the addition of chat requesting features using the Chat Box. The script allows players to request items via chat, which are then exported from Refined Storage into an intermediate inventory (like a chest) and given to the player by the Inventory Manager.
The issue arises because Refined Storage exports the exact item requested (identified by its fingerprint), but the Inventory Manager sometimes fails to find it if there are other items with the same name in the intermediate inventory such as the Domum Ornamentum items. Adding fingerprint support would resolve this ambiguity and make the entire system more robust. This would be a huge quality-of-life improvement for anyone doing advanced automation with multiple mods.
Linked Issues
No response