Skip to content

LUA methods for Energy

LemADEC edited this page May 2, 2017 · 1 revision

Enantiomorphic reactor specific methods

instability

Returns the 4 instability values (100 is the point when the reactor explodes)

inst0, inst1, inst2, inst3 = reactor.instability()

release

Sets the reactor to output all energy or disables outputting of energy.

isReleasing = reactor.release()

isReleasing = reactor.release(isManualMode)
  • setting to false will disable all release modes.
  • setting to true will release all energy with no abore nor rate criteria.

This is used to overload your ship systems with energy, it'll usually starve your reactor pretty quickly. Good, for those emergency situations...

The reactor mode can be changed at any time during its operation.

releaseRate

Releases at most that much energy per tick

releaseModeString, releaseRate = reactor.releaseRate()

releaseModeString, releaseRate = reactor.releaseRate(newRate)
  • releaseModeString can be "OFF", "MANUAL", "ABOVE" or "RATE"
  • setting a zero or negative rate will disable all release modes.
  • setting a positive rate will enable release in "RATE" mode.

This will limit how much energy can be drown from the reactor. It's very useful when you need power right away but it may also starve your reactor.

The reactor mode can be changed at any time during its operation.

releaseAbove

Releases any energy stored internally once a given threshold is reached.

releaseModeString, releaseAbove = reactor.releaseAbove()

releaseModeString, releaseAbove = reactor.releaseAbove(newThreshold)
  • releaseModeString can be "OFF", "MANUAL", "ABOVE" or "RATE"
  • setting a zero or negative rate will disable all release modes.
  • setting a positive rate will enable release in "ABOVE" mode.

This behaves independently of current energy increase, so you may consume more power than you're actually generating, hence giving a temporary boost to your production when needed (read: weapon and shield systems). With this setting, you require more power to boot up the reactor, but it'll warm up faster.

The reactor mode can be changed at any time during its operation.

Enantiomorphic reactor stabilisation laser specific methods

hasReactor

Returns true if the laser can see a reactor and false otherwise

hasReactor = laser.hasReactor()

side

Returns 0-3 depending on which side of the reactor its on

laserSide = laser.side()

sendLaser

Sends a laser of that much energy to stabilize the reactor

laser.sendLaser(amount)
Clone this wiki locally