Belt Overflow Continued TEMP HOST


Continuation of Belt Overflow mod by GopherAtl and Sparr. Causes belts to overflow at the end as soon as items reach the terminal tile.

Tweaks
a month ago
2.0
35
Logistics

Changelog

Version: 1.0.5
Date: 2026-6-22
  Info:
    - Added 1.0.4 Changelog
Version: 1.0.4
Date: 2026-6-21
  Changes:
    - Added option to turn off sideload spilling, then it only spills when overflowing
  Bugfix:
    - Disabled belts now spill correctly.
    - Splitters now spill correctly.
    - Faster belt -> Slower belt spilling is now more lenient and slightly more consistent.
Version: 1.0.3
Date: 2026-06-21
  Changes:
    - Changed the spill behaviour to use spill_item_stack instead of create_entity.
  Bugfix:
    - Which fixed the unintended behaviour that spilled stacks could stack infinitely.
Version: 1.0.0
Date: 2026-04-05
  Changes:
    - Renamed to Belt Overflow Continued.
    - Updated for Factorio 2.0.
    - Replaced global with storage throughout (Factorio 2.0 API change).
    - Updated collision_mask to use the new layers dictionary format.
    - Updated asset paths from __belt-overflow__ to __BeltOverflowContinued__.
    - Fixed all direction arithmetic for Factorio 2.0's 16-way direction system (cardinals now
      0/4/8/12 instead of 0/2/4/6).
    - Used LuaEntity.belt_shape to directly detect belt curves instead of heuristic.
    - Updated get_chunks() to use chunk.area for find_entities_filtered.
    - Updated spill_item_stack to named-parameter form with allow_belts=false.
    - Added event filters to on_built_entity, on_robot_built_entity, on_pre_player_mined_item,
      on_robot_pre_mined, and on_entity_died for performance.
  Optimizations:
    - Replaced full-scan polling model with rotating-slice and hot-set system.
    - Per-tick cost is now O(SCAN_SLICE + actively_overflowing) instead of O(all_terminal_belts).
    - Belts found overflowing are promoted to a hot set checked every tick until they clear.
    - All other terminal belts are sampled in a rotating background scan (default 5/tick).
    - Repurposed Belt Polling Frequency setting as Belt Scan Slice Size.
    - Added list_index to TerminalBelt for O(1) removal from flat list.