Fixed prerequisite detection with OC scripts
This commit is contained in:
parent
937952f121
commit
af99f09fa3
6 changed files with 32 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in a new issue