MDK-SE
MDK-SE copied to clipboard
[Documentation Request] Please include examples of inventory counting / management
The API documentation references MyDefinitionId and MyItemType, which are arguments for IMyProductionBlock.AddQueueItem and IMyInventory.GetItemAmount respectively. The documentation mentions that using object builders would be a better way to get these values rather than constructing them directly, but no example or API for this is mentioned or given.
The programmable block does not use object builders. You should be using MyDefinitionId and MyItemType.
I can't promise I will be writing documentation on the inventory system any time soon, both because I don't use it and because I'm pressed for time. You should go to Keen's discord, the #programming-in-game channel, and ask there. They will tell you how it should be done.
All I have is this incomplete one, which does not deal with the specific topics you ask for yet. https://github.com/malware-dev/MDK-SE/wiki/The-Inventories