logistics-container:
request_filters :: array[InventoryFilter]?
loaders:
filters :: array[InventoryFilter]?
Inserter:
filters :: array[InventoyrFilter] -- Should this also be optional? No error is thrown if it is omitted.
The documentation shows InventoryFilter effectively as:
Code: Select all
---@class InventoryFilter
---@field index uint
---@field name string
Code: Select all
---@class InventoryFilter
---@field index uint
---@field name string(maybe ItemID)
---@field quality string(maybe QualityID)?
---@field comparator ComparatorString?
This creates an inserter with a filter of iron-ore, any-quality:
Code: Select all
game.player.surface.create_entity{
name = "inserter",
position = {10,10},
direction = 0,
force = "player",
filters = {
index = 3,
name = "iron-ore"
}
}
Code: Select all
game.player.surface.create_entity{
name = "inserter",
position = {10,10},
direction = 0,
force = "player",
filters = {
index = 3,
name = "iron-ore",
quality = "normal",
comparator = "="
}
}