remove dependency on device global + milo backup config

This commit is contained in:
kepler155c@gmail.com
2019-03-11 23:48:53 -04:00
parent f2a8a7e639
commit b43761faf1
21 changed files with 79 additions and 125 deletions

View File

@@ -1,9 +1,10 @@
local device = _G.device
local peripheral = _G.peripheral
if not device.neuralInterface then
local ni = peripheral.find('neuralInterface')
if not ni then
error('Missing neural interface')
elseif not device.neuralInterface.disableAI then
_G.printError('Unable to disable AI')
elseif not ni.disableAI then
error('Missing kinetic augment')
else
device.neuralInterface.disableAI()
ni.disableAI()
end