Page 1 of 1

Read / write energy used by the entity

Posted: Wed May 17, 2017 1:24 pm
by JimRex
Hello,
i am asking on behalf of Mr. maroder, the autor of the aircraft mod "Raven" https://mods.factorio.com/mods/maroder/Raven.
The mod is using a 2 entity system, one for the landed state and one for the flying. Curently while changing the entity the energy remaining in it dissapear, i.e. a new energy cell is used on every landing and take off.
We would like to have an ability to read/write the energy remaining or energy used of an entity, if possible.

Thanks you very much.

P.S. One more thing (sorry if this is the wrong subforum for that). After update 0.15.10 while taking off (switching) the acceleration button is no longer registered and you have to release and press it again. I have no idea whats going on, though. :)

Re: Read / write energy used by the entity

Posted: Wed May 17, 2017 10:37 pm
by Rseding91
You can already read energy available/remaining in any entity?

Re: Read / write energy used by the entity

Posted: Thu May 18, 2017 3:51 pm
by maroder
Rseding91 wrote:You can already read energy available/remaining in any entity?
We have only LuaEntity energy :: double [RW] Energy stored in the entity (heat in furnace, energy stored in electrical devices etc.)
There is no way to read/write "energy" for cars. The energy that is required is displayed by the progress bar near the fuel inventory of the car.

P.S.: In the mod, the script transplants the passenger from the car to the car.
After update 0.15.10 while taking off (switching) the acceleration button is no longer registered and you have to release and press it again.

Re: Read / write energy used by the entity

Posted: Thu May 18, 2017 4:40 pm
by Ranakastrasz
I Think you need to refer to the burner attached to the car, and use that. Not 100% sure tho.