Code: Select all
#wagon.get_inventory(defines.inventory.cargo_wagon)
wagon.prototype.get_inventory_size(defines.inventory.cargo_wagon)
The cargo wagon prototype has this value set as the inventory_size attribute.
When activating the quality_affects_inventory_size attribute, the cargo wagon capacity changes with the quality:
which is returned in #wagon.get_inventory(defines.inventory.cargo_wagon) but the prototype still reports "40" as inventory size.
Is there a way to calculate the expected inventory size? Quality has some scale information for mining drills and beacons but nothing for cargo wagons. And the progression (12, 12, 12, 24) is not really obvious.
Or is just looking at the inventory size of the entity the right thing to do?