Advertisement
Guest User

reactor code

a guest
Jun 25th, 2017
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.62 KB | None | 0 0
  1. local a = {
  2.     "CASING TEMP" = function()
  3.             label(startColumn, row + 1, "%d °C", colors.red, tostring(reactor[reactorNum].getCasingTemperature()))
  4.             startColumn = (startColumn + string.len(rhTable[i])) + spaces
  5.         end,
  6.     "FUEL TEMP" = function()
  7.             label(startColumn, row + 1, "%d °C", colors.red, tostring(reactor[reactorNum].getFuelTemperature()))
  8.             startColumn = (startColumn + string.len(rhTable[i])) + spaces
  9.         end,
  10.     "FUEL CONSUMED" = function()
  11.             label(startColumn, row + 1, "%d mB/t", nil, tostring(reactor[reactorNum].getFuelConsumedLastTick()))
  12.             startColumn = (startColumn + string.len(rhTable[i])) + spaces
  13.         end,
  14.     "WASTE" = function()
  15.             label(startColumn, row + 1, "%d mB", nil, tostring(reactor[reactorNum].getWasteAmount()))
  16.             startColumn = (startColumn + string.len(rhTable[i])) + spaces
  17.         end,
  18.     "CONTROL RODS" = function()
  19.             label(startColumn, row + 1, "%d Rods", nil, tostring(reactor[reactorNum].getNumberOfControlRods()))
  20.             startColumn = (startColumn + string.len(rhTable[i])) + spaces
  21.         end,
  22.     "STEAM OUT" = function()
  23.             label(startColumn, row + 1, "%d mB/t", nil, tostring(reactor[reactorNum].getHotFluidProducedLastTick()))
  24.             startColumn = (startColumn + string.len(rhTable[i])) + spaces
  25.         end,
  26.     "REACTIVITY" = function()
  27.             label(startColumn, row + 1, "%.0f%%", colors.yellow, tostring(reactor[reactorNum].getFuelReactivity()))
  28.             startColumn = (startColumn + string.len(rhTable[i])) + spaces
  29.         end,
  30.     "RF OUT" = function()
  31.             if reactor[reactorNum].isActivelyCooled() then
  32.                 label(startColumn, row + 1, "%d RF/t", colors.red, "0")
  33.                 startColumn = (startColumn + string.len(rhTable[i])) + spaces
  34.             else
  35.                 label(startColumn, row + 1, "%d RF/t", colors.green, tostring(reactor[reactorNum].getEnergyProducedLastTick()))
  36.                 startColumn = (startColumn + string.len(rhTable[i])) + spaces
  37.             end
  38.         end,
  39.     "STORED RF" = function()
  40.             if reactor[reactorNum].isActivelyCooled() then
  41.                 label(startColumn, row + 1, "%d RF", colors.red, "0")
  42.                 startColumn = (startColumn + string.len(rhTable[i])) + spaces
  43.             else
  44.                 label(startColumn, row + 1, "%d RF", colors.green, tostring(reactor[reactorNum].getEnergyStored()))
  45.                 startColumn = (startColumn + string.len(rhTable[i])) + spaces
  46.             end
  47.         end,
  48. }
  49. if a[rhTable[i]) then
  50.     a[rhTable[i])()
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement