Reactor Computer Port
Reactor Computer Port | |
---|---|
| |
Name | Reactor Computer Port |
Source Mod | Big Reactors |
ID Name | Unknown |
OreDict Name | |
First Appearance | MC 1.6.4 |
Type | Block |
Stackable | Yes (64) |
Solid | Yes |
Transparent | No |
Affected by Gravity | No |
Emits Light | No |
Flammable | No |
Required Tool | Any tool |
The Reactor Computer Port is a utility block that can be used to monitor or control a Big Reactors multi-block reactor remotely, using a Computer.
The optional Computer Port provides the finest level of control over a reactor's operation, and is capable of querying and controlling a reactor much faster than either Redstone or RedNet. It acts like a standard ComputerCraft Peripheral.
Contents
Recipe[edit]
Lua Methods (0.4.3A)[edit]
The following methods are current as of Big Reactors 0.4.3A.
Method Name | Arguments | Return Type | Description | |
---|---|---|---|---|
getConnected | None | Boolean | Returns true if the computer port is connected to a valid multi-block reactor. | |
getActive | None | Boolean | Returns true if the reactor is active (consuming fuel and generating power), false otherwise. | |
getFuelTemperature | None | Integer | Returns the temperature of the multi-block reactor's fuel, in degrees Centigrade. | |
getCasingTemperature | None | Integer | Returns the temperature of the multi-block reactor's casing/frame, in degrees Centigrade. | |
getEnergyStored | None | Integer | Returns the amount of energy stored in the multi-block reactor's internal energy buffer, in Redstone Flux (RF) units | |
getFuelAmount | None | Integer | Returns the total amount of fuel contained in the reactor, in milli-buckets (mB) | |
getWasteAmount | None | Integer | Returns the total amount of waste contained in the reactor, in milli-buckets (mB) | |
getFuelAmountMax | None | Integer | Returns the total amount of fuel + waste which can be contained in the reactor at one time, in milli-buckets (mB) | |
getControlRodName | Double: control rod index | String | Returns the user-set name for the specified control rod, as a string. String is empty if the name is not set | |
getNumberOfControlRods | None | Integer | Returns the number of control rods attached to this reactor. This is one more than the maximum control rod index. | |
getControlRodLevel | Double: control rod index | Integer | Returns an integer indicating how far the specified control rod is inserted into the reactor, range is from 0 (not inserted) to 100 (fully inserted) | |
getEnergyProducedLastTick | None | Float | Returns an estimate of the Redstone Flux (RF) energy generated in the past tick. | If the reactor is actively cooled, returns the amount of hot fluid produced in the past tick, in milli-Buckets (mB). |
getHotFluidProducedLastTick | None | Float | Returns the amount of hot fluid produced in the past tick, in milli-Buckets (mB). | If the reactor is passively cooled, always returns 0. |
getCoolantAmount | None | Integer | Returns the amount of coolant fluid contained in the multi-block reactor's coolant tank, in milli-buckets (mB) | |
getCoolantAmountMax | None | Integer | Returns the total amount of coolant fluid which can be contained in the multi-block reactor's coolant tank, in milli-buckets (mB) | |
getCoolantType | None | String or Nil | Returns the Fluid Dictionary name of the type of fluid contained in the multi-block reactor's coolant tank, or Nil if the tank is empty. | |
getHotFluidAmount | None | Integer | Returns the amount of superheated fluid contained in the multi-block reactor's hot-fluid tank, in milli-buckets (mB) | |
getHotFluidAmountMax | None | Integer | Returns the total amount of superheated fluid which can be contained in the multi-block reactor's hot-fluid tank, in milli-buckets (mB) | |
getHotFluidType | None | String or Nil | Returns the Fluid Dictionary name of the type of fluid contained in the multi-block reactor's hot-fluid tank, or Nil if the tank is empty. | |
getFuelReactivity | None | Integer | Returns the reactivity level of the reactor's fuel. 100 = 100 percent | |
getFuelConsumedLastTick | None | Float | Returns the amount of fuel consumed last tick, in milli-buckets (mB). Note that fractional milliBuckets can be consumed, so this can return, for example, 0.5 | |
getMinimumCoordinate | None | Integers: Array | Returns the corner opposite from getMaximumCoordinate in x y z format | |
getMaximumCoordinate | None | Integers: Array | Returns the corner opposite from getMinimumCoordinate in x y z format | |
getControlRodLocation | Double: control rod index | Integers: Array | Returns the distance of the rod from the minimum reactor coordinate in x y z format | |
isActivelyCooled | None | Boolean | Returns true if the multi-block reactor is in "active cooling" mode, false otherwise | |
setActive | Boolean | None | Sets the reactor to be active if the argument is true, or inactive if the argument is false | |
setControlRodLevel | Double: control rod index, Double: insertion level (0-100) | None | Sets the specified control rod (first argument) to the specified insertion level (second argument). Insertion level range is from 0.0 (not inserted) to 100.0 (fully inserted) | |
setAllControlRodLevels | Double: insertion level (0.0-100.0) | None | Sets all control rods to the specified insertion level. Range is from 0.0 (not inserted) to 100.0 (fully inserted) | |
setControlRodName | Double: control rod index, String | None | Sets the name of the specified control rod | |
doEjectWaste | None | None | Instruct the reactor to attempt to eject any waste in the reactor via its access ports. The reactor will favor access ports set to Out. 1 ingot of waste will be ejected per 1000 mB currently in the reactor. If there is less than 1000 mB of waste in the reactor, nothing will happen. | |
doEjectFuel | None | None | Instruct the reactor to attempt to eject any fuel in the reactor via its access ports. The reactor will favor access ports set to Out. 1 ingot of fuel will be ejected per 1000 mB currently in the reactor. If there is less than 1000 mB of fuel in the reactor, nothing will happen. |
Lua Methods (0.3)[edit]
The following methods are current as of Big Reactors 0.3.0.
Method Name | Arguments | Return Type | Description | |
---|---|---|---|---|
getConnected | None | Boolean | Returns true if the computer port is connected to a valid multi-block reactor. | |
getActive | None | Boolean | Returns true if the reactor is active (consuming fuel and generating power), false otherwise. | |
getNumberOfControlRods | None | Integer | Returns the number of control rods attached to this reactor. This is one more than the maximum control rod index. | |
getEnergyStored | None | Integer | Returns the amount of energy stored in the multi-block reactor's internal energy buffer, in Redstone Flux (RF) units | |
getFuelTemperature | None | Integer | Returns the temperature of the multi-block reactor's fuel, in degrees Centigrade. | |
getCasingTemperature | None | Integer | Returns the temperature of the multi-block reactor's casing/frame, in degrees Centigrade. | |
getFuelAmount | None | Integer | Returns the total amount of fuel contained in the reactor, in milli-buckets (mB) | |
getWasteAmount | None | Integer | Returns the total amount of waste contained in the reactor, in milli-buckets (mB) | |
getFuelAmountMax | None | Integer | Returns the total amount of fuel + waste which can be contained in the reactor at one time, in milli-buckets (mB) | |
getControlRodName | Integer: control rod index | String | Returns the user-set name for the specified control rod, as a string. String is empty if the name is not set | |
getControlRodLevel | Integer: control rod index | Integer | Returns an integer indicating how far the specified control rod is inserted into the reactor, range is from 0 (not inserted) to 100 (fully inserted) | |
getEnergyProducedLastTick | None | Float | Returns an estimate of the Redstone Flux (RF) energy generated in the past tick. | If the reactor is actively cooled, returns the amount of hot fluid produced in the past tick, in milli-Buckets (mB). |
getHotFluidProducedLastTick | None | Float | Returns the amount of hot fluid produced in the past tick, in milli-Buckets (mB). | If the reactor is passively cooled, always returns 0. |
getCoolantType | None | String or Nil | Returns the Fluid Dictionary name of the type of fluid contained in the multi-block reactor's coolant tank, or Nil if the tank is empty. | |
getCoolantAmount | None | Integer | Returns the amount of coolant fluid contained in the multi-block reactor's coolant tank, in milli-buckets (mB) | |
getHotFluidType | None | String or Nil | Returns the Fluid Dictionary name of the type of fluid contained in the multi-block reactor's hot-fluid tank, or Nil if the tank is empty. | |
getHotFluidAmount | None | Integer | Returns the amount of superheated fluid contained in the multi-block reactor's hot-fluid tank, in milli-buckets (mB) | |
getFuelReactivity | None | Integer | Returns the reactivity level of the reactor's fuel. 100 = 100 percent | |
getFuelConsumedLastTick | None | Float | Returns the amount of fuel consumed last tick, in milli-buckets (mB). Note that fractional milliBuckets can be consumed, so this can return, for example, 0.5 | |
isActivelyCooled | None | Boolean | Returns true if the multi-block reactor is in "active cooling" mode, false otherwise | |
setActive | Boolean: active? | None | Sets the reactor to be active if the argument is true, or inactive if the argument is false | |
setAllControlRodLevels | Integer: insertion level (0-100) | None | Sets all control rods to the specified insertion level. Range is from 0 (not inserted) to 100 (fully inserted) | |
setControlRodLevel | Integer: control rod index, Integer: insertion level (0-100) | None | Sets the specified control rod (first argument) to the specified insertion level (second argument). Insertion level range is from 0 to 100, as above. | |
doEjectWaste | None | None | Instruct the reactor to attempt to eject any waste in the reactor via its access ports. The reactor will favor access ports set to Out. 1 ingot of waste will be ejected per 1000 mB currently in the reactor. If there is less than 1000 mB of waste in the reactor, nothing will happen. |
Lua Methods (0.2)[edit]
In Big Reactors 0.2, the Computer Port exposes the following methods to Lua.
Method Name | Arguments | Return Type | Description |
---|---|---|---|
getConnected | None | Boolean | Returns true if the computer port is connected to a valid multi-block reactor. |
getActive | None | Boolean | Returns true if the reactor is active (consuming fuel and generating power), false otherwise. |
getNumberOfControlRods | None | Integer | Returns the number of control rods attached to this reactor. This is one more than the maximum control rod index. |
getEnergyStored | None | Integer | Returns the amount of energy stored in the multi-block reactor's internal energy buffer, in Redstone Flux (RF) units |
getTemperature | None | Integer | Returns the temperature of the multi-block reactor, in degrees Centigrade. |
getTemperature | Integer: control rod index | Integer | Returns the temperature of the control rod at the specified control rod index |
getFuelAmount | None | Integer | Returns the total amount of fuel contained in the reactor, in milli-buckets (mB) |
getFuelAmount | Integer: control rod index | Integer | Returns the total amount of fuel contained in the specified control rod, in milli-buckets (mB) |
getWasteAmount | None | Integer | Returns the total amount of waste contained in the reactor, in milli-buckets (mB) |
getWasteAmount | Integer: control rod index | Integer | Returns the total amount of waste contained in the specified control rod, in milli-buckets (mB) |
getFuelAmountMax | None | Integer | Returns the total amount of fuel + waste which can be contained in the reactor at one time, in milli-buckets (mB) |
getControlRodFuelAmountMax | None | Integer | Returns the total amount of fuel + waste which can be contained in a single control rod at one time, in milli-buckets (mB) |
getControlRodName | Integer: control rod index | String | Returns the user-set name for the specified control rod, as a string. String is empty if the name is not set |
getControlRodLevel | Integer: control rod index | Integer | Returns an integer indicating how far the specified control rod is inserted into the reactor, range is from 0 (not inserted) to 100 (fully inserted) |
getEnergyProducedLastTick | None | Float | Returns an estimate of the Redstone Flux (RF) energy generated in the past tick |
setActive | Boolean: active? | None | Sets the reactor to be active if the argument is true, or inactive if the argument is false |
setAllControlRodLevels | Integer: insertion level (0-100) | None | Sets all control rods to the specified insertion level. Range is from 0 (not inserted) to 100 (fully inserted) |
setControlRodLevel | Integer: control rod index, Integer: insertion level (0-100) | None | Sets the specified control rod (first argument) to the specified insertion level (second argument). Insertion level range is from 0 to 100, as above. |
doEjectWaste | None | None | Instruct the reactor to attempt to eject any waste in the reactor via its access ports. The reactor will favor access ports set to Out. 1 ingot of waste will be ejected per 1000 mB currently in the reactor. If there is less than 1000 mB of waste in the reactor, nothing will happen. |
Notes[edit]
When writing programs to control your reactor, you should always ensure that the Computer Port is actually connected. Reactors located far away may disassemble and deactivate due to chunks unloading from the world. If your reactor is not chunkloaded, make sure to call getConnected().
If a Computer Port receives a non-getConnected() call and is not connected to a valid reactor, it will throw a Lua exception back to the Computer.
Example[edit]
Assuming your Computer Port is directly behind your Computer:
local reactor reactor = peripheral.wrap("back") reactor.getFuelTemperature() reactor.setActive(true)
Lua Program[edit]
Lolmer's EZ-NUKE reactor control system
|