ElectricEnergyInterface LUA double values
-
- Fast Inserter
- Posts: 127
- Joined: Fri May 08, 2015 2:25 pm
- Contact:
ElectricEnergyInterface LUA double values
Hey, I discovered the ElectricEnergyInterface entity type and corresponding entity attributes that I can set. Taking the output flow limit as example, it seems like that a value of 1.0 is not 1W. It rather seems like that a value of roughly 0.01674 is 1W. Can a dev give some insight on what the correct value is? Or could I request for the API to accept strings like "1W" as in the entity prototype definitions?
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires
Mods (current): Resource Labels
Mods (old): Biter Spires
Re: ElectricEnergyInterface LUA double values
From LUA API the values for power are actually in Joule per tick. There's 60 ticks in a second so a value of 1 equals 60 W. If you want to set exactly 1W then use 1.0/60.0 as value.
-
- Fast Inserter
- Posts: 127
- Joined: Fri May 08, 2015 2:25 pm
- Contact:
Re: ElectricEnergyInterface LUA double values
Thanks a lot!Yoyobuae wrote:From LUA API the values for power are actually in Joule per tick. There's 60 ticks in a second so a value of 1 equals 60 W. If you want to set exactly 1W then use 1.0/60.0 as value.
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires
Mods (current): Resource Labels
Mods (old): Biter Spires