Page 1 of 1

Let all get_item_count() take ItemWithQualityID

Posted: Sun Nov 10, 2024 7:25 pm
by Tubbles
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

Re: Let all get_item_count() take ItemWithQualityID

Posted: Mon Nov 11, 2024 1:23 pm
by Rseding91
I’ll double check but I’m pretty sure they already do and this is just a docs issue.

Re: Let all get_item_count() take ItemWithQualityID

Posted: Fri Nov 22, 2024 9:42 pm
by Rseding91
Changed for 2.0.21.