Let all get_item_count() take ItemWithQualityID
Posted: Sun Nov 10, 2024 7:25 pm
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
* 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