Let all get_item_count() take ItemWithQualityID

User avatar
Tubbles
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed Mar 16, 2016 6:30 pm
Contact:

Let all get_item_count() take ItemWithQualityID

Post 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
Rseding91
Factorio Staff
Factorio Staff
Posts: 14269
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Let all get_item_count() take ItemWithQualityID

Post by Rseding91 »

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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14269
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Let all get_item_count() take ItemWithQualityID

Post by Rseding91 »

Changed for 2.0.21.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Implemented mod requests”