From 2166c1efe6cd1cefde7dd10631119aa755722fd0 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 20 Jun 2026 13:58:43 +0900 Subject: [PATCH] . --- PHI-CL/control/inserter.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PHI-CL/control/inserter.lua b/PHI-CL/control/inserter.lua index 97b3f27..c295d74 100644 --- a/PHI-CL/control/inserter.lua +++ b/PHI-CL/control/inserter.lua @@ -29,6 +29,10 @@ function main.get_belt_penalty(belt_speed, stack_size) return penalty end +--[[ +* (prototype.inserter_max_belt_stack_size or 1) +* (entity.force.belt_stack_size_bonus or 1) +]] function main.calc(entity) local prototype = entity.type == 'entity-ghost' and entity.ghost_prototype or entity.prototype local pickup_target = entity.pickup_target and entity.pickup_target or entity.surface.find_entities_filtered{position = entity.pickup_position, limit = 1}[1] @@ -77,12 +81,12 @@ function main.calc(entity) end if drop_belt_speed then - local max = drop_belt_speed * ticks_per_cycle * 4 * (entity.force.belt_stack_size_bonus or 1) + local max = drop_belt_speed * ticks_per_cycle * 4 stack_size = (stack_size > max and max) or stack_size end if pickup_belt_speed then - local max = pickup_belt_speed * ticks_per_cycle * 8 * (prototype.inserter_max_belt_stack_size or 1) + local max = pickup_belt_speed * ticks_per_cycle * 8 stack_size = (stack_size > max and max) or stack_size end