.
This commit is contained in:
parent
8717798bd7
commit
697625ea8e
@ -121,55 +121,60 @@ end
|
|||||||
--[[Light System]]--
|
--[[Light System]]--
|
||||||
function lightSystem( op, type )
|
function lightSystem( op, type )
|
||||||
--[[On functions]]--
|
--[[On functions]]--
|
||||||
if color == "off" and op == "on" and type == "white" then
|
if op == "on" then
|
||||||
redstone.setBundledOutput("top", colors.white)
|
if type == "white" then
|
||||||
|
if color == "off" then
|
||||||
|
rs.setBundledOutput("top", colors.white)
|
||||||
color = "white"
|
color = "white"
|
||||||
elseif color == "off" and op == "on" and type == "red" then
|
elseif color == "white" then
|
||||||
redstone.setBundledOutput("top", colors.red)
|
rs.setBundledOutput("top", colors.white)
|
||||||
color = "red"
|
color = "white"
|
||||||
elseif color == "white" and op == "on" and type == "red" then
|
elseif color == "red" then
|
||||||
redstone.setBundledOutput("top", colors.white + colors.red)
|
redstone.setBundledOutput("top", colors.white + colors.red)
|
||||||
color = "both"
|
color = "both"
|
||||||
elseif color == "red" and op == "on" and type == "white" then
|
elseif color == "both" then
|
||||||
redstone.setBundledOutput("top", colors.white + colors.red)
|
redstone.setBundledOutput("top", colors.white + colors.red)
|
||||||
color = "both"
|
color = "both"
|
||||||
elseif color == "white" and op == "on" and type == "white" then
|
end
|
||||||
redstone.setBundledOutput("top", colors.white)
|
elseif type == "red" then
|
||||||
color = "white"
|
if color == "off" then
|
||||||
elseif color == "red" and op == "on" and type == "red" then
|
rs.setBundledOutput("top", colors.red)
|
||||||
redstone.setBundledOutput("top", colors.red)
|
|
||||||
color = "red"
|
color = "red"
|
||||||
elseif color == "both" and op == "on" and type == "white" then
|
elseif color == "red" then
|
||||||
|
rs.setBundledOutput("top", colors.red)
|
||||||
|
color = "red"
|
||||||
|
elseif color == "white" then
|
||||||
redstone.setBundledOutput("top", colors.white + colors.red)
|
redstone.setBundledOutput("top", colors.white + colors.red)
|
||||||
color = "both"
|
color = "both"
|
||||||
elseif color == "both" and op == "on" and type == "red" then
|
elseif color == "both" then
|
||||||
redstone.setBundledOutput("top", colors.white + colors.red)
|
redstone.setBundledOutput("top", colors.white + colors.red)
|
||||||
color = "both"
|
color = "both"
|
||||||
|
end
|
||||||
elseif color == "both" and op == "off" and type == "white" then
|
end
|
||||||
|
elseif op == "off" then
|
||||||
|
if type == "white" then
|
||||||
|
if color == "white" then
|
||||||
|
rs.setBundledOutput("top", 0)
|
||||||
|
color = "off"
|
||||||
|
elseif color == "red" then
|
||||||
redstone.setBundledOutput("top", colors.red)
|
redstone.setBundledOutput("top", colors.red)
|
||||||
color = "red"
|
color = "red"
|
||||||
elseif color == "both" and op == "off" and type == "red" then
|
elseif color == "both" then
|
||||||
redstone.setBundledOutput("top", colors.white)
|
|
||||||
color = "white"
|
|
||||||
elseif color == "white" and op == "off" and type == "white" then
|
|
||||||
redstone.setBundledOutput("top", 0)
|
|
||||||
color = "off"
|
|
||||||
elseif color == "red" and op == "off" and type == "red" then
|
|
||||||
redstone.setBundledOutput("top", 0)
|
|
||||||
color = "off"
|
|
||||||
elseif color == "off" and op == "off" and type == "white" then
|
|
||||||
redstone.setBundledOutput("top", 0)
|
|
||||||
color = "off"
|
|
||||||
elseif color == "off" and op == "off" and type == "red" then
|
|
||||||
redstone.setBundledOutput("top", 0)
|
|
||||||
color = "off"
|
|
||||||
elseif color == "white" and op == "off" and type == "red" then
|
|
||||||
redstone.setBundledOutput("top", colors.white)
|
|
||||||
color = "white"
|
|
||||||
elseif color == "red" and op == "off" and type == "white" then
|
|
||||||
redstone.setBundledOutput("top", colors.red)
|
redstone.setBundledOutput("top", colors.red)
|
||||||
color = "red"
|
color = "red"
|
||||||
|
end
|
||||||
|
elseif type == "red" then
|
||||||
|
if color == "red" then
|
||||||
|
rs.setBundledOutput("top", 0)
|
||||||
|
color = "off"
|
||||||
|
elseif color == "white" then
|
||||||
|
redstone.setBundledOutput("top", colors.white)
|
||||||
|
color = "white"
|
||||||
|
elseif color == "both" then
|
||||||
|
redstone.setBundledOutput("top", colors.white)
|
||||||
|
color = "white"
|
||||||
|
end
|
||||||
|
end
|
||||||
else error("Light system error you tried to: Turn " .. op .. " color " .. type .. " when the state of color in memory is: " .. color)
|
else error("Light system error you tried to: Turn " .. op .. " color " .. type .. " when the state of color in memory is: " .. color)
|
||||||
end
|
end
|
||||||
inLightsMenu = false
|
inLightsMenu = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user