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 component = require("component")
|
||||||
local term = require("term")
|
local term = require("term")
|
||||||
|
|
||||||
|
if not term.isAvailable() then
|
||||||
|
computer.beep()
|
||||||
|
os.exit()
|
||||||
|
end
|
||||||
|
|
||||||
if not component.isAvailable("warpdriveForceFieldProjector") then
|
if not component.isAvailable("warpdriveForceFieldProjector") then
|
||||||
print("No force field projector detected")
|
print("No force field projector detected")
|
||||||
else
|
else
|
||||||
local projector = component.warpdriveForceFieldProjector
|
local projector = component.warpdriveForceFieldProjector
|
||||||
projector.enable(false)
|
projector.enable(false)
|
||||||
os.sleep(1)
|
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("Projector is disabled")
|
||||||
print()
|
print()
|
||||||
print(status)
|
print(status)
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
local component = require("component")
|
local component = require("component")
|
||||||
local term = require("term")
|
local term = require("term")
|
||||||
|
|
||||||
|
if not term.isAvailable() then
|
||||||
|
computer.beep()
|
||||||
|
os.exit()
|
||||||
|
end
|
||||||
|
|
||||||
if not component.isAvailable("warpdriveForceFieldProjector") then
|
if not component.isAvailable("warpdriveForceFieldProjector") then
|
||||||
print("No force field projector detected")
|
print("No force field projector detected")
|
||||||
else
|
else
|
||||||
local projector = component.warpdriveForceFieldProjector
|
local projector = component.warpdriveForceFieldProjector
|
||||||
projector.enable(true)
|
projector.enable(true)
|
||||||
os.sleep(1)
|
os.sleep(1)
|
||||||
status, isEnabled, isConnected, isPowered, shape, energy = projector.state()
|
local status, isEnabled, isConnected, isPowered, shape, energy = projector.state()
|
||||||
if isConnected then
|
if isConnected then
|
||||||
if isPowered then
|
if isPowered then
|
||||||
print("Projector is enabled")
|
print("Projector is enabled")
|
||||||
|
|
|
@ -4,7 +4,11 @@ local term = require("term")
|
||||||
|
|
||||||
if not term.isAvailable() then
|
if not term.isAvailable() then
|
||||||
computer.beep()
|
computer.beep()
|
||||||
return
|
os.exit()
|
||||||
|
end
|
||||||
|
if not component.gpu.getDepth() < 4 then
|
||||||
|
print("Tier 2 GPU required")
|
||||||
|
os.exit()
|
||||||
end
|
end
|
||||||
|
|
||||||
treefarms = {}
|
treefarms = {}
|
||||||
|
|
|
@ -4,7 +4,11 @@ local term = require("term")
|
||||||
|
|
||||||
if not term.isAvailable() then
|
if not term.isAvailable() then
|
||||||
computer.beep()
|
computer.beep()
|
||||||
return
|
os.exit()
|
||||||
|
end
|
||||||
|
if not component.gpu.getDepth() < 4 then
|
||||||
|
print("Tier 2 GPU required")
|
||||||
|
os.exit()
|
||||||
end
|
end
|
||||||
|
|
||||||
treefarms = {}
|
treefarms = {}
|
||||||
|
|
|
@ -4,7 +4,11 @@ local term = require("term")
|
||||||
|
|
||||||
if not term.isAvailable() then
|
if not term.isAvailable() then
|
||||||
computer.beep()
|
computer.beep()
|
||||||
return
|
os.exit()
|
||||||
|
end
|
||||||
|
if not component.gpu.getDepth() < 4 then
|
||||||
|
print("Tier 2 GPU required")
|
||||||
|
os.exit()
|
||||||
end
|
end
|
||||||
|
|
||||||
mininglasers = {}
|
mininglasers = {}
|
||||||
|
|
|
@ -4,7 +4,11 @@ local term = require("term")
|
||||||
|
|
||||||
if not term.isAvailable() then
|
if not term.isAvailable() then
|
||||||
computer.beep()
|
computer.beep()
|
||||||
return
|
os.exit()
|
||||||
|
end
|
||||||
|
if not component.gpu.getDepth() < 4 then
|
||||||
|
print("Tier 2 GPU required")
|
||||||
|
os.exit()
|
||||||
end
|
end
|
||||||
|
|
||||||
mininglasers = {}
|
mininglasers = {}
|
||||||
|
|
Loading…
Reference in a new issue