Created
October 14, 2022 17:06
-
-
Save tuefekci/66c185e4a905bb6440ed727d21d7e794 to your computer and use it in GitHub Desktop.
Factorio MoonLogic AAI Zoner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out = {} | |
local ressource = 0 | |
if red['wood'] > 0 then | |
out['zone-x-green'] = 1 | |
ressource = 1 | |
end | |
if red['coal'] > 0 then | |
out['zone-x-black'] = 1 | |
ressource = 1 | |
end | |
if red['stone'] > 0 then | |
out['zone-x-white'] = 1 | |
ressource = 1 | |
end | |
if red['iron-ore'] > 0 then | |
out['zone-x-blue'] = 1 | |
ressource = 1 | |
end | |
if red['copper-ore'] > 0 then | |
out['zone-x-orange'] = 1 | |
ressource = 1 | |
end | |
if red['uranium-ore'] > 0 then | |
out['zone-x-yellow'] = 1 | |
ressource = 1 | |
end | |
if red['signal-enemy-unit-spawner'] > 0 or red['signal-enemy-turret'] > 0 then | |
out['zone-x-magenta'] = 1 | |
ressource = 1 | |
end | |
if ressource == 1 then | |
out['signal-x-tile'] = red['signal-x-tile'] | |
out['signal-y-tile'] = red['signal-y-tile'] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment