mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 10:51:55 -04:00
added bundled redstone info for redstone program when it is available
This commit is contained in:
parent
5c975fb1c6
commit
a6915ff2bb
@ -1,15 +1,17 @@
|
|||||||
|
local rs = component.redstone
|
||||||
local args, options = shell.parse(...)
|
local args, options = shell.parse(...)
|
||||||
if #args < 1 then
|
if #args < 1 then
|
||||||
print("Usage: redstone <side> [<value>]")
|
if rs.setBundledOutput then
|
||||||
|
print("Usage: redstone <side> [-b <color>] [<value>]")
|
||||||
|
else
|
||||||
|
print("Usage: redstone <side> [<value>]")
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local rs = component.redstone
|
|
||||||
|
|
||||||
local side = sides[args[1]]
|
local side = sides[args[1]]
|
||||||
if not side then
|
if not side then
|
||||||
print("Invalid side.")
|
error("Invalid side.")
|
||||||
return
|
|
||||||
end
|
end
|
||||||
if type(side) == "string" then
|
if type(side) == "string" then
|
||||||
side = sides[side]
|
side = sides[side]
|
||||||
@ -17,13 +19,11 @@ end
|
|||||||
|
|
||||||
if options.b then
|
if options.b then
|
||||||
if not rs.setBundledOutput then
|
if not rs.setBundledOutput then
|
||||||
print("Bundled redstone not available.")
|
error("Bundled redstone not available.")
|
||||||
return
|
|
||||||
end
|
end
|
||||||
local color = colors[args[2]]
|
local color = colors[args[2]]
|
||||||
if not color then
|
if not color then
|
||||||
print("Invalid color.")
|
error("Invalid color.")
|
||||||
return
|
|
||||||
end
|
end
|
||||||
if type(color) == "string" then
|
if type(color) == "string" then
|
||||||
color = colors[color]
|
color = colors[color]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user