Mekanism

Mekanism

111M Downloads

[Suggestion] More LUA support

MJRLegends opened this issue ยท 6 comments

commented

Please could you add methods such as

"getEnergyStored()"
"getEnergyPerTick"
"getWaterTank()"
"getSteamTank()"
"getDeuteriumTank()"
"getTritiumTank()"
"getFuelTank()"
"getBufferedEnergy()"
"getMaxPlasmaTemperature(boolean active)"
"getMaxCasingTemperature(boolean active)"
"getIgnitionTemperature(boolean active)"

because i would really like to make some advanced programs for the reactor but the LUA support is quite limited atm

commented

getEnergyStored and getBufferedEnergy would be the same thing wouldn't it?

commented

Yeah I suppose it would be

commented

I just used getEnergyStored() in a single player world running Mekanism 8.1.9. That definitely exists.

commented

I have added the following methods:

  • getIgnitionTemp()
  • getEnergy()
  • getMaxEnergy()
  • getWater()
  • getSteam()
  • getFuel()

Note that you can determine whether calculations are done with active or inactive cooling by using the Reactor Logic Adapter's interface.

I hope this is helpful!

commented

@aidancbrady Thanks for adding them, when do you think the next release/build will be out containing them.

commented

@aidancbrady The getFuel() one isn't very helpful since it doesnt actually have a buffer of fuel stored in the reactor so just returns a value of 0, could you consider adding "getDeuteriumTank()" and "getTritiumTank()" please