Skip to content

Instantly share code, notes, and snippets.

View nazzeth's full-sized avatar

Naz nazzeth

View GitHub Profile
@chrisuehlinger
chrisuehlinger / the-algorithm.lua
Created January 19, 2024 21:47
Factorio self-expanding factory algorithm
-- Input Signal Key:
-- - red[some-item] - The number of that item in the logistic network,
-- negative if there is unsatisfied demand
-- - green[ore-type] - The amount of ore appearing on the resource scanner
-- Output Signal Key:
-- - out['red/signal-X'] - The X coordinate to survey
-- - out['red/signal-Y'] - The Y coordinate to survey
-- - out['red/signal-W'] - The width of the survey
-- - out['red/signal-H'] - The height of the survey
-- - out['construction-robot'] - The index of the blueprint to deploy