OC Computer Redstone Control NC Crack Change [OPEN Computers) Minecraft Game

Foreword

If you just want to fully automatically control the NC crack change, now I write another version of the version that does not need to enter any parameters manually, and use OC computer to automatically control the NC crack change, but the possibility of this version is more likely, but the possibility of this version is more likely.

As long as the machines need to be performed, and the machines that support redstone signals can use this code, and it can be run after a little modification

Code and use tutorial

Full of reactors

Simply, I wrote a very simple applet to control unstable NC nuclear fissure reactors, although the original version can be used.But it may cause additional stuttering frequently,

At this time, the computer and simple code can be used to make better control.The code is as follows

 Local RS = Require ("Component"). Redstone

local size = reques ("sides")

Print ("Please Input Heat Capacity")

hc = IO.READ ()

Print ("Please Input Heat Growth")

hg = io.read ()*20

Print ("Please Input Cooling Rate")

CR = IO.read ()*20

runtime = math.floor ((HC*0.9)/hg)

coolingtime = math.ceil (runtime*hg/cr)

Print ("Reactor Will Run", Runtime, "Seconds then Stop for Cooling", CoolingTime, "Seconds")

While (true) do

RS.SetoutPut (SIDE.BACK, 1)

Os.execute ("Sleep" .. Runtime)

RS.Setoutput (SIDE.BACK, 0)

Os.execute ("Sleep" .. Coolingtime)

end

Then prepare a computer equipped with a redstone card. After installing it, save the code as a LUA script at will, and then run the script screen to prompt to enter the corresponding information

Code effect

Open the reactor, place the mouse above the heat bar. According to the pop -up box, enter the total thermal capacity in order from top to bottom, the net calories output and cooling rate, and the cooling rate input positive number can be input.

Required information

It will be safe to automatically calculate the operation automatically, and how much time it takes for cooling, which is a cycle

Can customize the change code part

Runtime = math.floor ((HC*0.9)/hg)

The 0.9 in the code is to calculate 90%of the total heat capacity, which is to stop cooling. If the integration package is stuck, please reduce it as appropriate. I paid the painful price for this.

RS.SetoutPut (SIDE.BACK, 1)

In setting the output of redstone, the optional output includes UP, DOWN, FRONT, BACK, RIGHT and LEFT.

Basic principle

Its basic principle is to reach the set heat threshold after calculating the input parameter calculation, and then the heat generated by the cooling generated by cooling is then performed, and then the execution cycle can be executed according to the calculated results.

After running the program, the screen can also be removed or kept. Seeing personal preferences, because I did not find the tutorial of how to write the interface of the LUA, so I did not write a graphical interface.