Lora major refactor

This commit is contained in:
kepler155c
2018-10-21 18:43:04 -04:00
parent f56611d957
commit 9e5487b100
14 changed files with 1605 additions and 1482 deletions

View File

@@ -0,0 +1,24 @@
local Lora = require('lora/lora')
local Util = require('util')
local Autocraft = {
priority = 100,
}
function Autocraft:cycle(context)
local list = { }
for _,res in pairs(context.resources) do
if res.auto then
res = Util.shallowCopy(res)
res.count = 256
list[Lora:uniqueKey(res)] = res
end
end
if not Util.empty(list) then
Lora:craftItems(list)
end
end
Lora:registerTask(Autocraft)