I propose "upgrading" all classes that has the get_item_count() function so they all take an ItemWithQualityID. Today, only some of them do this, with requires us to instead loop through their respective LuaInventory as a work-around in order to differentiate between quality levels:
* LuaControl.get_item_count(ItemID?) -> uint
* LuaTrain.get_item_count(ItemID?) -> uint
* LuaTransportLine.get_item_count(ItemID?) -> uint
Classes that already have this "upgrade":
* LuaInventory.get_item_count(ItemWithQualityID?) -> uint
* LuaLogisticNetwork.get_item_count(ItemWithQualityID?, string?) -> int
Let all get_item_count() take ItemWithQualityID
Re: Let all get_item_count() take ItemWithQualityID
I’ll double check but I’m pretty sure they already do and this is just a docs issue.
If you want to get ahold of me I'm almost always on Discord.
Re: Let all get_item_count() take ItemWithQualityID
Changed for 2.0.21.
If you want to get ahold of me I'm almost always on Discord.