rttp initial version -- insecure
This commit is contained in:
@@ -448,15 +448,6 @@ local function craftItems(craftList, allItems)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- remote processing
|
|
||||||
if modem then
|
|
||||||
for key,item in pairs(craftList) do
|
|
||||||
if Craft.recipes[key] and item.crafted < item.count then
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- controller
|
-- controller
|
||||||
if controllerAdapter then
|
if controllerAdapter then
|
||||||
for key,item in pairs(craftList) do
|
for key,item in pairs(craftList) do
|
||||||
@@ -493,6 +484,15 @@ local function craftItems(craftList, allItems)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- remote processing
|
||||||
|
if modem then
|
||||||
|
for key,item in pairs(craftList) do
|
||||||
|
if not Craft.recipes[key] and item.crafted < item.count then
|
||||||
|
modem.transmit(205, 0, item)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not controllerAdapter and not canCraft then
|
if not controllerAdapter and not canCraft then
|
||||||
for _,item in pairs(craftList) do
|
for _,item in pairs(craftList) do
|
||||||
if not item.rsControl then
|
if not item.rsControl then
|
||||||
@@ -618,7 +618,6 @@ local function getItemWithQty(items, res, ignoreDamage, ignoreNbtHash)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function watchResources(items)
|
local function watchResources(items)
|
||||||
|
|
||||||
local craftList = { }
|
local craftList = { }
|
||||||
local outputs = { }
|
local outputs = { }
|
||||||
|
|
||||||
@@ -1435,6 +1434,17 @@ jobMonitor()
|
|||||||
UI:setPage(listingPage)
|
UI:setPage(listingPage)
|
||||||
listingPage:setFocus(listingPage.statusBar.filter)
|
listingPage:setFocus(listingPage.statusBar.filter)
|
||||||
|
|
||||||
|
Event.on('modem_message', function(e, side, sport, dport, item)
|
||||||
|
debug({ e, side, sport, dport, item })
|
||||||
|
if dport == 205 and type(item) == 'table' then
|
||||||
|
inventoryAdapter:provide(
|
||||||
|
item,
|
||||||
|
item.count - item.crafted,
|
||||||
|
nil,
|
||||||
|
config.trashDirection)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
Event.onInterval(5, function()
|
Event.onInterval(5, function()
|
||||||
|
|
||||||
if not craftingPaused then
|
if not craftingPaused then
|
||||||
|
|||||||
Reference in New Issue
Block a user