Missing item stat: inventory stack size
Moderator: Bilka
-
- Filter Inserter
- Posts: 813
- Joined: Fri Apr 29, 2016 5:27 pm
- Contact:
Missing item stat: inventory stack size
So I noticed that the templated stat panel for the various items in the game does not have an entry for inventory stack size. It's an important piece of info because inventory stack size determines how many of that item will fit in a given storage item, and the number varies from item to item (I know of at least one item with each of the following inventory stack sizes 2, 5, 10, 20, 50, 100, 200, and 500). Every non-fluid item in the game has this stat, so it would make sense to alter the templates to include it, and then fill in the specific values for each item in the same manner that everything else on the template gets filled (by wiki users).
Re: Missing item stat: inventory stack size
item stack size is available through prototype.
http://lua-api.factorio.com/0.13.6/LuaI ... stack_size
http://lua-api.factorio.com/0.13.6/LuaI ... stack_size
Code: Select all
local item = inventory[some_index]
item.prototype.stack_size -- do whatever you want here