Read / write energy used by the entity

Things that already exist in the current mod API
Post Reply
User avatar
JimRex
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon May 15, 2017 1:34 pm
Contact:

Read / write energy used by the entity

Post 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. :)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13219
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Read / write energy used by the entity

Post by Rseding91 »

You can already read energy available/remaining in any entity?
If you want to get ahold of me I'm almost always on Discord.

User avatar
maroder
Inserter
Inserter
Posts: 47
Joined: Mon Apr 27, 2015 1:02 pm
Contact:

Re: Read / write energy used by the entity

Post 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.

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Read / write energy used by the entity

Post by Ranakastrasz »

I Think you need to refer to the burner attached to the car, and use that. Not 100% sure tho.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Post Reply

Return to “Already exists”