euh, same as previous commit, stupid vs code smh my head
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
component = require("component")
|
||||
event = require("event")
|
||||
colors = require("colors")
|
||||
gpu = component.gpu
|
||||
|
||||
while true do
|
||||
local _,_,x,y = event.pull("touch")
|
||||
if(x <= 50 and x >= 40 and y <= 20 and y >= 10) then
|
||||
gpu.setBackground(0x00ff00)
|
||||
gpu.fill(x,y,1,1," ")
|
||||
else
|
||||
gpu.setBackground(0x0000ff)
|
||||
gpu.fill(x,y,1,1," ")
|
||||
end
|
||||
end
|
||||
@@ -109,7 +109,7 @@ t3 = thread.create(cleanup)
|
||||
|
||||
|
||||
|
||||
local test = {"a","b","c"}
|
||||
for i=0,table.getn(test) do
|
||||
print(test[i])
|
||||
end
|
||||
-- local test = {"a","b","c"}
|
||||
-- for i=0,table.getn(test) do
|
||||
-- print(test[i])
|
||||
-- end
|
||||
@@ -0,0 +1,21 @@
|
||||
component = require("component")
|
||||
event = require("event")
|
||||
redstone = component.redstone
|
||||
reactor = component.reactor_chamber
|
||||
|
||||
|
||||
|
||||
while true do
|
||||
heat = reactor.getHeat()
|
||||
heatp = heat / reactor.getMaxHeat() * 100
|
||||
print(heat .. " : " .. heatp)
|
||||
|
||||
if heatp > 60 then
|
||||
redstone.setOutput(0,0)
|
||||
end
|
||||
if heatp < 1 then
|
||||
redstone.setOutput(0,1)
|
||||
end
|
||||
|
||||
os.sleep(1)
|
||||
end
|
||||
Reference in New Issue
Block a user