Intermodal Containers


Load items into containers to boost belt throughput and train loading speeds. Developed from Deadlock's Crating Machine by Xorimuth and RedRafe.

Content
3 months ago
1.1
14.5K
Logistics

g inventory size changes

a month ago

Tell me how can I change the maximum number of chests with resources in the car? Now it is 2. That is, the manipulator stops loading if there are 2 chests of resources in the machine. I would like to change it to 1. So that the manipulator stops loading if the machine has = 1.
I looked in the mod files there is a file called inventory-size.lua, but I don't understand exactly what values need to be changed.
The file looks like this:
local function divide_inventory_size(prototype, amount)
if prototype.inventory_size > 2 then
prototype.inventory_size = math.max(math.floor(prototype.inventory_size * amount + 0.5), 2) -- round
end
end

local inventory_multiplier = settings.startup["ic-cargo-wagon-inventory-multiplier"].value
if inventory_multiplier ~= 1 then
for _, prototype in pairs(data.raw["cargo-wagon"]) do
divide_inventory_size(prototype, inventory_multiplier)
end
end

a month ago

Are you talking about the mini trains?

Anyway, in FF all that code doesn't do anything - FF inventory sizes are handled in https://github.com/tburrows13/FreightForwarding/blob/fc6b203009d83a7e5e9098421c973bda684d81f6/prototypes/inventory-sizes.lua

New response