rttp initial version -- insecure

This commit is contained in:
kepler155c
2018-03-29 21:23:12 -04:00
parent d82cef0546
commit 5a332d8c35

View File

@@ -448,15 +448,6 @@ local function craftItems(craftList, allItems)
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
if controllerAdapter then
for key,item in pairs(craftList) do
@@ -493,6 +484,15 @@ local function craftItems(craftList, allItems)
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
for _,item in pairs(craftList) do
if not item.rsControl then
@@ -618,7 +618,6 @@ local function getItemWithQty(items, res, ignoreDamage, ignoreNbtHash)
end
local function watchResources(items)
local craftList = { }
local outputs = { }
@@ -1435,6 +1434,17 @@ jobMonitor()
UI:setPage(listingPage)
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()
if not craftingPaused then