Event on_entity_no_fuel

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Event on_entity_no_fuel

Post by Optera »

What?
A new event on_entity_no_fuel to monitor fuel in entities that use a burner fuel source more easily.
Why?
The fuel monitoring code already runs in the core game to stop machines when out of fuel and flash the icon above them. It just isn't exposed through the api forcing mods to do bad performing polling in tick handlers if they want to do something when entities are out of fuel e.g. generate a new stack of fuel for electric vehicles or display a no fuel alert on the map.

billbo99
Fast Inserter
Fast Inserter
Posts: 131
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: Event on_entity_no_fuel

Post by billbo99 »

I wonder if this could be linked to "LuaEntity::item_requests" so that the bot's could auto refuel the burner

Post Reply

Return to “Modding interface requests”