erogenousbeef-zz / BigReactors

Big Reactors mod for Minecraft
MIT License
153 stars 102 forks source link

[REQUEST] ControlRod API #503

Open thaelina opened 9 years ago

thaelina commented 9 years ago

I was wondering if you could expand the LUA API to allow any of the following: set control rod names get a table of all the control rods

I would appreciate the first a lot as it would allow me to set control rod names for the rod control system I have through the script. The table would just be a convenience to minimize function calls on loading the control scripts.

On a side note control rod indexes starting at 0 got me for a while since lua starts on a index of 1 for tables. I understand why though.

XFactHD commented 9 years ago

I think setting control rod names is already possible or at least to read the names to be able to control specific rods.

thaelina commented 9 years ago

Yah I have access to names via getControlRodName and control of them via get/setControlRodLevel. I can iterate over the rods using getNumberOfControlRods.

thaelina commented 9 years ago

I perused the code in the repo and found that setControlRodName already exists. So never mind on that account. I don't know if returning tables are possible but its just a convenience anyways.