Page 1 of 1

[1.1.87] artillery_wagon_ammo inventory is_full returns true when it only has 1 shell (it can hold 100 shell))

Posted: Sun Aug 13, 2023 10:47 pm
by peterwy22
The code

Code: Select all

carriage.get_inventory(defines.inventory.artillery_wagon_ammo).is_full()
would return true even when the entity "carriage" is a artillery wagon that's only holding 1 shell, artillery wagons can hold maximum of 100 shells so this is unexpected

Re: [1.1.87] artillery_wagon_ammo inventory is_full returns true when it only has 1 shell (it can hold 100 shell))

Posted: Tue Jan 02, 2024 5:16 pm
by Rseding91
Thanks for the report. This specific function will also report erroneous values for slots in crafting machines that allow counts > stack size. At this point I would simply put a note on it saying it's only useful for non-special inventories or just remove it.