IMyInventory GetItems broken

Cat Panic shared this bug 5 years ago
Outdated

The behavior of this has changed from how it was in the last stable release and how it was during the release tests and it seems to be broken.

from the ingamte script interface for "IMyInventory" the method "GetItems"

void GetItems(List<MyInventoryItem> items, Func<MyInventoryItem, bool> filter = null);


Originally this returned the needed info.

During the release tests it was changed to return void but to accepted a list with the out keyword so that list would be populated with the needed info.

the problem is it no longer accepts the out keyword and still returns void. am I missing something here? I can't see how to actually use this function.

While I am at it the returned list contains MyInventoryItem rather than IMyInventoryItem objects.

Replies (3)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards

Keen Software House: QA Department

photo
3

Sorry, but I think your voting system for Bugs that make the game unplayable is just crap. Please fix it very soon and do not wait for the damn votes. Some things are important and this is one of them. Before you continue to publish stupid stuff like the DLC shit fix the game first and do not waste your time on inconsequential nonsense. I'm not the only one who is so.Because such a nonsense many lets serverowner suffer and you want Votes. So you do not deal with the community. You really deserve the criticism.

photo
1

Most important would be to post a (usable and up-to-date) reference for the API - ingame and for Mod script (and maybe for your PlugIn system too?)!


In fact, one is still able to get a list of items, just a little different:


var items = new List<MyInventoryItem>();
cargo.GetInventory(0).GetItems(items);
 // items will now hold a list of all that was inside the cargo
there is no need to use the "out" keyword.

Leave a Comment
 
Attach a file