Page 1 of 1

defines.inventory changed !!!

Posted: Sat Jun 21, 2014 3:15 pm
by darius456
As in topic, defines.inventory changed :!:

This wiki site is no longer up to date: LINK

For AssemblingMachine it was:
inputInventory = 1
outputInventory = 2
moduleInventory = 3

right now it is:
inputInventory = 2
outputInventory = 3
moduleInventory = 4

Don't know if other inventory changed, have no time to check.

Re: defines.inventory changed !!!

Posted: Sat Jun 21, 2014 5:23 pm
by bulldog98
I also think there was a change for the burners, since in Treefarm the treefarm puts stuff to the wrong slot.

Re: defines.inventory changed !!!

Posted: Mon Jun 23, 2014 9:07 pm
by FreeER
So, I took the time to find out what they were, I'll get started on updating the wiki but here's my findings :)
edit: furnaces and labs also changed (the entities that had fuel inventories not already at 1) however, you might notice in the defines file that furnace inventories were not updated (source is 2 and result is 3, in 0.10.1)

anything not listed had no inventory accessible (tested from 0-5) or was not tested (arrow, explosion, and flying text, 'unset' land-mine, market with set 'recipes', particle, projectile, rail, rail-remnants, rail-signal, rocket-defense, simple-entity?, smoke, solar-panel, splitter, sticker, storage-tank, train-stop, transport-belt, tree, unit-spawner, wall)

moduleInventory note(s):
inserts only 1 item per slot (tested with iron plates so it's not the stack size), inserting more fills empty slots
accessible without error for types that allow modules when the specific entity does not have them allowed, but does not save inserted items.
findings
hm, from looking at these it seems like a decent 'standard' would be changing regular (listed as cargoInventory) to 2 (since all fuel inventories should be 1), inputs to 3, outputs to 4 and module to 5... which would make the defines cover every entity quite easily with only a few entries extra for the oddities (player, roboport, etc.), inserter heldstack and resource amount could be 2 or 4 as well (for consistency) and could swap the fuel and regular inventories so that most entities would have an inventory at index 1 (rather than starting at 2). (still wishing that modular armor had an accessible inventory though!)