This mod is a heavy performance rewrite of Repair Turret 2 tailored for large factories:
Global Work Scheduler: Replaced individual per-turret on_tick scanning with a centralized global scheduler using a fixed per-tick work budget, preventing 1. UPS drops on megabases with hundreds of turrets.
2. Logistic Availability & Pickup Caching: Added caching for item/chest availability (availability_cache.lua & pickup_point_cache.lua) so turrets don't query the C++ surface API unnecessarily every frame.
3. Delayed Retry Gates: Missing materials are put on cooldown retry gates (tile_supply_gate.lua) instead of re-scanning missing items every tick.
4. Factorio 2.1 & Quality Support: Fully updated for Factorio 2.1, Space Age multi-surface handling, and item quality levels.
Original mod: https://mods.factorio.com/mod/Repair_Turret_2