Fixed prerequisite detection with OC scripts

This commit is contained in:
LemADEC 2017-05-12 20:46:33 +02:00
parent 937952f121
commit af99f09fa3
6 changed files with 32 additions and 6 deletions

View file

@ -1,13 +1,18 @@
local component = require("component")
local term = require("term")
if not term.isAvailable() then
computer.beep()
os.exit()
end
if not component.isAvailable("warpdriveForceFieldProjector") then
print("No force field projector detected")
else
local projector = component.warpdriveForceFieldProjector
projector.enable(false)
os.sleep(1)
status, isEnabled, isConnected, isPowered, shape, energy = projector.state()
local status, isEnabled, isConnected, isPowered, shape, energy = projector.state()
print("Projector is disabled")
print()
print(status)

View file

@ -1,13 +1,18 @@
local component = require("component")
local term = require("term")
if not term.isAvailable() then
computer.beep()
os.exit()
end
if not component.isAvailable("warpdriveForceFieldProjector") then
print("No force field projector detected")
else
local projector = component.warpdriveForceFieldProjector
projector.enable(true)
os.sleep(1)
status, isEnabled, isConnected, isPowered, shape, energy = projector.state()
local status, isEnabled, isConnected, isPowered, shape, energy = projector.state()
if isConnected then
if isPowered then
print("Projector is enabled")

View file

@ -4,7 +4,11 @@ local term = require("term")
if not term.isAvailable() then
computer.beep()
return
os.exit()
end
if not component.gpu.getDepth() < 4 then
print("Tier 2 GPU required")
os.exit()
end
treefarms = {}

View file

@ -4,7 +4,11 @@ local term = require("term")
if not term.isAvailable() then
computer.beep()
return
os.exit()
end
if not component.gpu.getDepth() < 4 then
print("Tier 2 GPU required")
os.exit()
end
treefarms = {}

View file

@ -4,7 +4,11 @@ local term = require("term")
if not term.isAvailable() then
computer.beep()
return
os.exit()
end
if not component.gpu.getDepth() < 4 then
print("Tier 2 GPU required")
os.exit()
end
mininglasers = {}

View file

@ -4,7 +4,11 @@ local term = require("term")
if not term.isAvailable() then
computer.beep()
return
os.exit()
end
if not component.gpu.getDepth() < 4 then
print("Tier 2 GPU required")
os.exit()
end
mininglasers = {}