CC: Tweaked
Introduction¶
With CC: Tweaked you can read and control the reactor, every turbine and the heat exchanger with Lua computers. Some knowledge in Lua or CC: Tweaked is recommended.
Place a computer or a wired modem next to any block of an assembled multiblock and use peripheral.find. This page lists all peripherals and every function with an example.
Overview¶
Peripheral thorium_reactor: state, scram, rods, fluids, temperature and all turbines by id.
Peripheral thorium_turbine: every turbine can be controlled directly: activation, coils, flow, speed, energy and steam.
Peripheral thorium_thermal: temperature, rates, produced steam and the tanks.
Peripherals¶
| Peripheral | Blocks | Use |
|---|---|---|
thorium_reactor |
Reactor Casing, Reactor Glass, Reactor Controller, rod controllers, core and moderators of an assembled reactor | Reactor functions |
thorium_turbine |
Turbine Casing, Glass, Vent, Coil, Rotor, Rotation Mount and Controller of an assembled turbine | Turbine functions |
thorium_thermal |
Casing, Conductor, Heat Sink and Controller of an assembled heat exchanger | Heat exchanger functions |
The valves and the power port are no peripherals of the mod: they keep the normal fluid, item and energy peripherals of CC: Tweaked (for example energy_storage), so you can read their contents with the standard functions. The same is true for all machines, tanks and pipes.
local reactor = peripheral.find("thorium_reactor")
local turbine = peripheral.find("thorium_turbine")
local thermal = peripheral.find("thorium_thermal")
With more than one turbine use the name of the peripheral to pick one: peripheral.wrap("turbine_0") for a wired modem network, or peripheral.find("thorium_turbine", function(name, t) return t.getHeight() == 9 end).
Good to know¶
- One call instead of many:
getInfo()of the turbine and the heat exchanger andgetReactorInfo()/getTurbines()of the reactor return all values in one table. That is faster and the values belong together. - Errors: a function that needs an assembled multiblock throws a clear error message ("The turbine is not assembled") if it is not, and the turbine functions of the reactor tell you the valid ids ("Invalid turbine id 5, the ids go from 0 to 2"). Use
pcallor checkisAssembled()first. - Turbine ids of the reactor start at 0, see
getTurbinePositions(). - Values are limited: setters ignore or limit wrong values (rods 0 to 100, flow 0 to the maximum of the turbine).
- All functions run on the main thread of the server, so they always show the real state.
- Events: every computer next to the reactor or turbine receives
thorium_scram(event, side, notification) when the reactor is scrammed andthorium_turbine_warning(event, side, warning) when a turbine gets a warning. Useos.pullEvent("thorium_scram")instead of polling. - The Wireless Reactor Interface is the in-game alternative to control the reactor from far away.
Dashboard Script¶
A complete dashboard for up to five monitors, ready to use. It shows and controls the reactor and the turbines:
- Reactor: temperature, load, fuel, control rods, integrity, salt tanks and contamination, plus the core as in the game (9x9 fuel rods in green and 8x8 control rods in blue between them, turned by 45 degrees, with small gaps between the rows). Buttons: START, RUN, STOP, SCRAM / RESET (press START, then RUN once the start up is finished, the reactor only produces in the RUN state), fuel load and control rods. Touch a blue control rod to select it, the rod buttons then only change this rod, touch it again to control all rods.
- Turbines: every turbine as a portrait card with animated blades, state, rpm, flow, generation and warnings. Buttons per turbine: ON / OFF, coils and flow -/+, and ALL ON / ALL OFF / ALL flow for all turbines.
- Heat exchangers: every exchanger as a card with vertical gauges for temperature, salt, water and steam, the produced steam, the rates and animated flames while it works.
-
The screens are buffered, only the rows that changed are redrawn, so nothing flickers.
-
Automatic: monitor 1 shows the reactor, the last monitor the heat exchangers and all monitors in between the turbines. The turbines (up to 16) are spread over the turbine monitors, every monitor shows the next ones. On one monitor up to 10 turbine cards fit next to each other. With fewer than 3 monitors the views switch every few seconds.
- Your own choice: in
CONFIG.monitorsyou set which monitor shows what, several monitors for the turbines are a list:monitors = { reactor = "monitor_0", turbines = { "monitor_1", "monitor_2", "monitor_3" }, thermal = "monitor_4" }. Useperipheral.getNames()to see the names. - The turbines are read through the reactor, the heat exchangers are found automatically: place a wired modem on a block of every heat exchanger and connect everything with cables.
- Use advanced monitors (3x3 or bigger is recommended, the reactor screen fits best on 4x3 or bigger) and touch the buttons. The text size and the steps of the buttons are set in the
CONFIGtable at the top.
Download thorium_dashboard.lua
Show Script
| thorium_dashboard.lua | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | |
Example Script¶
Show Script
| startup.lua | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
Reactor functions¶
Peripheral name thorium_reactor, example: local reactor = peripheral.find("thorium_reactor")
isAssembled()¶
Description
Returns true or false whether the reactor is assembled or not!
Method
isAssembled() -> boolean
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorState()¶
Description
Returns the current operating mode of the reactor as a string.
Method
getReactorState() -> string
return: "starting", "running", "stop" (or "undefined" when there is no assembled reactor)
Example
| example.lua | |
|---|---|
1 2 3 | |
setReactorState()¶
Description
Set the reactor operating state! When an invalid mode is passed, the reactor will use "stop" as default. "running" is ignored while the reactor cannot run yet (the startup is not finished).
Method
setReactorState(string mode)
mode: "starting", "running", "stop"
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorFluidAmountOut()¶
Description
Returns the amount of heated molten salt in the reactor tank!
Method
getReactorFluidAmountOut() -> Integer
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorFluidCapacityOut()¶
Description
Returns the capacity of the reactor output tank! (Heated Molten Salt)
Method
getReactorFluidCapacityOut() -> Integer
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorFluidAmountIn()¶
Description
Returns the amount of molten salt in the reactor tank!
Method
getReactorFluidAmountIn() -> Integer
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorFluidCapacityIn()¶
Description
Returns the capacity of the reactor input tank! (Molten Salt)
Method
getReactorFluidCapacityIn() -> Integer
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorCapacity()¶
Description
Returns the total capacity of the reactor!
Method
getReactorCapacity() -> Integer
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorCurrentLoadSet()¶
Description
Returns the value of current fueled uranium in percent!
Method
getReactorCurrentLoadSet() -> Float
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorTargetLoadSet()¶
Description
Returns the set/wanted uranium fuel fill level in percent!
Method
getReactorTargetLoadSet() -> Float
Example
| example.lua | |
|---|---|
1 2 3 | |
setReactorTargetLoadSet()¶
Description
Set the wanted uranium fuel fill level in percent!
Method
setReactorTargetLoadSet(Integer rate)
rate: 0 - 100
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorStatusPercent()¶
Description
Returns the current health rate of the reactor in percent!
Method
getReactorStatusPercent() -> Float
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorContamination()¶
Description
Returns the radiation the reactor currently gives off (the contamination around the controller)!
Method
getReactorContamination() -> Float
Example
| example.lua | |
|---|---|
1 2 3 | |
isReactorScrammed()¶
Description
Returns whether the reactor is scrammed or not!
Method
isReactorScrammed() -> boolean
Example
| example.lua | |
|---|---|
1 2 3 | |
setReactorScrammed()¶
Description
Set the reactor operating state! When an invalid mode is passed, the reactor will use "stop" as default.
Method
setReactorScrammed(boolean state)
state: true, false
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorRunningSince()¶
Description
Returns the time the reactor has run until last startup! Format: 5 seconds = 5 seconds * 20 ticks = 100
Method
getReactorRunningSince() -> Long
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorCurrentTemperature()¶
Description
Returns the reactors current temperature in degree Celsius!
Method
getReactorCurrentTemperature() -> Float
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorTargetTemperature()¶
Description
Returns the reactors target temperature in degree Celsius!
Method
getReactorTargetTemperature() -> Float
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorNotification()¶
Description
Returns the current notification of the reactor! For example when the reactor gets scrammed!
Method
getReactorNotification() -> String
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorLoad()¶
Description
Returns the load of the reactor in percent (derived from the current temperature, 100 means the maximum temperature of the design)!
Method
getReactorLoad() -> Float
Example
| example.lua | |
|---|---|
1 2 3 | |
getFuelRodStatus()¶
Description
Returns the fuel level of the given fuel rod in percent!
Method
getFuelRodStatus(Integer index) -> Float
index: 0 - 80
getFuelRodStatusMap()¶
Description
Returns the fuel level of the given fuel rod in percent in a lua table!
Method
getFuelRodStatusMap() -> Table: Int, Int
Example
| example.lua | |
|---|---|
1 2 3 4 5 | |
Added In
ThoriumReactors version 0.2b
getDepletedFuelRodStatus()¶
Description
Returns the depleted fuel level of the given fuel rod in percent!
Method
getDepletedFuelRodStatus(Integer index) -> Float
index: 0 - 80
Example
| example.lua | |
|---|---|
1 2 3 | |
getDepletedFuelRodStatusMap()¶
Description
Returns the depleted fuel level of the given fuel rod in percent in a lua table!
Method
getDepletedFuelRodStatusMap() -> Table: Int, Int
Example
| example.lua | |
|---|---|
1 2 3 4 5 | |
Added In
ThoriumReactors version 0.2b
getCurrentControlRodStatus()¶
Description
Returns the current control rod insert value in percent!
Method
getCurrentControlRodStatus(Integer index) -> Float
index: 0 - 63
Example
| example.lua | |
|---|---|
1 2 3 | |
getCurrentControlRodStatusMap()¶
Description
Returns the depleted fuel level of the given fuel rod in percent in a lua table!
Method
getCurrentControlRodStatusMap() -> Table: Int, Int
Example
| example.lua | |
|---|---|
1 2 3 4 5 | |
Added In
ThoriumReactors version 0.2b
getTargetControlRodStatus()¶
Description
Returns the target control rod insert value in percent!
Method
getTargetControlRodStatus(Integer index) -> Float
index: 0 - 63
Example
| example.lua | |
|---|---|
1 2 3 | |
getTargetControlRodStatusMap()¶
Description
Returns the depleted fuel level of the given fuel rod in percent in a lua table!
Method
getTargetControlRodStatusMap() -> Table: Int, Int
Example
| example.lua | |
|---|---|
1 2 3 4 5 | |
Added In
ThoriumReactors version 0.2b
setTargetControlRodStatus()¶
Description
Sets the target control rod insert value!
Method
setTargetControlRodStatus(Integer index, Integer value)
index: 0 - 63
value: 0 - 100
Example
| example.lua | |
|---|---|
1 2 3 4 | |
isTurbineActive()¶
Description
Returns true or false whether the turbine with the id is active.
Method
isTurbineActive(Integer index) -> boolean
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
setTurbineActive()¶
Description
Sets the activation state of a turbine.
Method
setTurbineActive(Integer index, Boolean state)
index: 0 - ?
state: true - false
Example
| example.lua | |
|---|---|
1 2 3 | |
isTurbineCoilsEngaged()¶
Description
Returns true or false whether the turbine coils are engaged or not.
Method
isTurbineCoilsEngaged(Integer index) -> boolean
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
setTurbineCoilsEngaged()¶
Description
Sets the coil engage state of a turbine.
Method
setTurbineCoilsEngaged(Integer index, Boolean state)
index: 0 - ?
state: true - false
Example
| example.lua | |
|---|---|
1 2 3 | |
copyConfigurationToAllTurbines()¶
Description
Copy the settings from the given turbine to all others.
Method
copyConfigurationToAllTurbines(Integer index)
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 4 | |
isTurbineAssembled()¶
Description
Returns true or false whether the turbine is assembled or not.
Method
isTurbineAssembled(Integer index) -> boolean
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineHeight()¶
Description
Returns the total height of the turbine.
Method
getTurbineHeight(Integer index) -> Integer
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineCurrentFlow()¶
Description
Returns the actual flow rate of the turbine.
Method
getTurbineCurrentFlow(Integer index) -> Integer
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineTargetFlow()¶
Description
Returns the target flow rate of the turbine.
Method
getTurbineTargetFlow(Integer index) -> Integer
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
setTurbineTargetFlow()¶
Description
Sets the target flow rate of the turbine.
Method
setTurbineTargetFlow(Integer index, Integer flowrate)
index: 0 - ?
flowrate: 0 - the maximum flow of the turbine (values above are clamped, the maximum depends on the height)
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineGeneration()¶
Description
Returns the current energy generation of the turbine in FE/t.
Method
getTurbineGeneration(Integer index) -> Float
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineSpeed()¶
Description
Returns the current turbine speed of the turbine.
Method
getTurbineSpeed(Integer index) -> Float
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineEnergyModifier()¶
Description
Returns the energy modifier of the turbine (the factor of its moderator blocks).
Method
getTurbineEnergyModifier(Integer index) -> Float
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbinePosition()¶
Description
Returns the turbines position in a table.
Method
getTurbinePosition(Integer index) -> Table
Table:
{
"x": -127,
"y": 80,
"z": 322
}
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbinePositionString()¶
Description
Returns the turbines position in a string.
Method
getTurbinePosition(Integer index) -> String
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbinePositions()¶
Description
Returns the positions of all saved turbines in a table.
Method
getTurbinePositions() -> Table
Table:
{
{
"x": -127,
"y": 80,
"z": 322
"turbineId": 0
},
{
"x": -127,
"y": 80,
"z": 322
"turbineId": 1
}
}
index: 0 - ?
Example
| example.lua | |
|---|---|
1 2 3 4 5 6 7 | |
getTurbineCount()¶
Description
Returns the amount of all turbines.
Method
getTurbineCount() -> Integer
Example
| example.lua | |
|---|---|
1 2 3 | |
getReactorInfo()¶
Description
Returns all values of the reactor in one table: assembled, state, scrammed, notification, temperature, targetTemperature, load, status, contamination, runningSince, fuel, controlRods, targetLoad, fluidIn and fluidOut (each with amount and capacity) and turbineCount. One call instead of many, so scripts are faster and the values fit together. If the reactor is not assembled the table only contains assembled = false.
Method
getReactorInfo() -> table
Example
| example.lua | |
|---|---|
1 2 3 4 5 6 7 | |
getRods()¶
Description
Returns all rods of the core in one call as a table with the lists fuel and depleted (81 values each) and control and targetControl (64 values each). Every value is between 0 and 100 and the lists start at index 1. Perfect to draw a map of the core, see the dashboard script. If the reactor is not assembled the lists are empty.
Method
getRods() -> table
Example
| example.lua | |
|---|---|
1 2 3 4 5 | |
setAllTargetControlRodStatus()¶
Description
Sets the target of all 64 control rods at once. Throws an error if the value is not between 0 and 100.
Method
setAllTargetControlRodStatus(int value)
value: 0 - 100
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineInfo()¶
Description
Returns all values of one turbine in one table: turbineId, assembled, position, active, coilsEngaged, height, speed, currentFlow, targetFlow, maxFlow, generation, energyModifier and warning.
Method
getTurbineInfo(int id) -> table
Example
| example.lua | |
|---|---|
1 2 3 4 | |
getTurbines()¶
Description
Returns a list with the info tables of all turbines of the reactor, see getTurbineInfo().
Method
getTurbines() -> table
Example
| example.lua | |
|---|---|
1 2 3 4 5 | |
setAllTurbinesActive()¶
Description
Activates or stops all turbines of the reactor at once.
Method
setAllTurbinesActive(boolean state)
Example
| example.lua | |
|---|---|
1 2 3 | |
setAllTurbinesTargetFlow()¶
Description
Sets the target steam flow of all turbines at once. The value is limited between 0 and the maximum of every turbine.
Method
setAllTurbinesTargetFlow(number flowrate)
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineMaxFlow()¶
Description
Returns the maximum steam flow of the turbine in mB/t, which depends on its height.
Method
getTurbineMaxFlow(int id) -> Integer
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineWarning()¶
Description
Returns the warning of the turbine as text (an empty text if there is none).
Method
getTurbineWarning(int id) -> string
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineEnergy()¶
Description
Returns the energy in the power port of the turbine in FE.
Method
getTurbineEnergy(int id) -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineEnergyCapacity()¶
Description
Returns the capacity of the power port of the turbine in FE.
Method
getTurbineEnergyCapacity(int id) -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getTurbineSteam()¶
Description
Returns the steam in the valve of the turbine in mB.
Method
getTurbineSteam(int id) -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
Turbine functions¶
Peripheral name thorium_turbine, example: local turbine = peripheral.find("thorium_turbine"). These functions work on every turbine directly, you do not need the reactor.
isAssembled()¶
Description
Returns whether the turbine this block belongs to is assembled. Works on every block of the turbine, also when it is not assembled (all other functions throw an error then).
Method
isAssembled() -> boolean
Example
| example.lua | |
|---|---|
1 2 3 | |
getInfo()¶
Description
Returns all values of the turbine in one table: assembled, active, coilsEngaged, height, speed, currentFlow, targetFlow, maxFlow, generation, energyModifier, warning, position, energy (amount, capacity) and steam (fluid, amount, capacity).
Method
getInfo() -> table
Example
| example.lua | |
|---|---|
1 2 3 4 | |
isActive()¶
Description
Returns whether the turbine is activated.
Method
isActive() -> boolean
Example
| example.lua | |
|---|---|
1 2 3 | |
setActive()¶
Description
Activates or stops the turbine.
Method
setActive(boolean state)
Example
| example.lua | |
|---|---|
1 2 3 | |
isCoilsEngaged()¶
Description
Returns whether the coils are engaged (the turbine produces energy).
Method
isCoilsEngaged() -> boolean
Example
| example.lua | |
|---|---|
1 2 3 | |
setCoilsEngaged()¶
Description
Engages or disengages the coils.
Method
setCoilsEngaged(boolean state)
Example
| example.lua | |
|---|---|
1 2 3 | |
getHeight()¶
Description
Returns the height of the turbine in blocks.
Method
getHeight() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSpeed()¶
Description
Returns the speed of the rotor in rpm.
Method
getSpeed() -> number
Example
| example.lua | |
|---|---|
1 2 3 | |
getCurrentFlow()¶
Description
Returns the steam flow of the turbine in mB/t at the moment.
Method
getCurrentFlow() -> number
Example
| example.lua | |
|---|---|
1 2 3 | |
getTargetFlow()¶
Description
Returns the target steam flow in mB/t.
Method
getTargetFlow() -> number
Example
| example.lua | |
|---|---|
1 2 3 | |
setTargetFlow()¶
Description
Sets the target steam flow in mB/t. Values below 0 or above the maximum flow are limited.
Method
setTargetFlow(number flow)
Example
| example.lua | |
|---|---|
1 2 3 | |
getMaxFlow()¶
Description
Returns the maximum steam flow in mB/t, which depends on the height.
Method
getMaxFlow() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getGeneration()¶
Description
Returns the energy that is generated in FE per tick (0 while the coils are disengaged).
Method
getGeneration() -> number
Example
| example.lua | |
|---|---|
1 2 3 | |
getEnergyModifier()¶
Description
Returns the efficiency factor of the moderator blocks (nickel x0.75, niob x1.0, stainless steel x1.25, molybdenum x1.5, chrome-moly steel x1.75, hastelloy N x2.0, inconel x2.25).
Method
getEnergyModifier() -> number
Example
| example.lua | |
|---|---|
1 2 3 | |
getWarning()¶
Description
Returns the warning of the turbine as text, an empty text if there is none.
Method
getWarning() -> string
Example
| example.lua | |
|---|---|
1 2 3 | |
getEnergy()¶
Description
Returns the energy in the power port in FE.
Method
getEnergy() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getEnergyCapacity()¶
Description
Returns the capacity of the power port in FE.
Method
getEnergyCapacity() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSteamAmount()¶
Description
Returns the steam in the valve in mB.
Method
getSteamAmount() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSteamCapacity()¶
Description
Returns the capacity of the valve in mB.
Method
getSteamCapacity() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getPosition()¶
Description
Returns the position of the turbine controller as table with x, y and z.
Method
getPosition() -> table
Example
| example.lua | |
|---|---|
1 2 3 4 | |
Heat exchanger functions¶
Peripheral name thorium_thermal, example: local thermal = peripheral.find("thorium_thermal")
isAssembled()¶
Description
Returns whether the heat exchanger this block belongs to is assembled. All other functions throw an error while it is not.
Method
isAssembled() -> boolean
Example
| example.lua | |
|---|---|
1 2 3 | |
getInfo()¶
Description
Returns all values of the heat exchanger in one table: assembled, working, size, temperature, saltRate, waterRate, heatPerWater, heatCost, heatCapacity, valveCapacity, converted, evaporated, produced, water (amount, capacity), steam (amount, capacity), salt (fluid, amount, capacity) and position.
Method
getInfo() -> table
Example
| example.lua | |
|---|---|
1 2 3 4 | |
isWorking()¶
Description
Returns whether the heat exchanger is working.
Method
isWorking() -> boolean
Example
| example.lua | |
|---|---|
1 2 3 | |
getSize()¶
Description
Returns the size of the heat exchanger.
Method
getSize() -> string
return: "small", "medium" or "large"
Example
| example.lua | |
|---|---|
1 2 3 | |
getTemperature()¶
Description
Returns the temperature in degrees Celsius.
Method
getTemperature() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSaltRate()¶
Description
Returns how much heated molten salt is used per tick in mB.
Method
getSaltRate() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getWaterRate()¶
Description
Returns how much water is used per tick in mB.
Method
getWaterRate() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getHeatPerWater()¶
Description
Returns the heat that is needed to evaporate the water.
Method
getHeatPerWater() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getHeatCost()¶
Description
Returns the heat cost of the current evaporation.
Method
getHeatCost() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getHeatCapacity()¶
Description
Returns the heat capacity of the heat exchanger.
Method
getHeatCapacity() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getValveCapacity()¶
Description
Returns the capacity of the valves.
Method
getValveCapacity() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getConverted()¶
Description
Returns how much salt was converted in the last operation in mB.
Method
getConverted() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getEvaporated()¶
Description
Returns how much water was evaporated in the last operation in mB.
Method
getEvaporated() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getProduced()¶
Description
Returns the steam that is produced per tick in mB.
Method
getProduced() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getWaterAmount()¶
Description
Returns the water in the heat exchanger in mB.
Method
getWaterAmount() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getWaterCapacity()¶
Description
Returns the water capacity in mB.
Method
getWaterCapacity() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSteamAmount()¶
Description
Returns the steam in the heat exchanger in mB.
Method
getSteamAmount() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSteamCapacity()¶
Description
Returns the steam capacity in mB.
Method
getSteamCapacity() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSaltAmount()¶
Description
Returns the heated molten salt in the heat exchanger in mB.
Method
getSaltAmount() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getSaltCapacity()¶
Description
Returns the capacity for heated molten salt in mB.
Method
getSaltCapacity() -> int
Example
| example.lua | |
|---|---|
1 2 3 | |
getPosition()¶
Description
Returns the position of the heat exchanger controller as table with x, y and z.
Method
getPosition() -> table
Example
| example.lua | |
|---|---|
1 2 3 4 | |
