Page 1 of 1

Event on_entity_no_fuel

Posted: Wed Feb 06, 2019 7:09 am
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.

Re: Event on_entity_no_fuel

Posted: Thu Feb 07, 2019 11:00 am
by billbo99
I wonder if this could be linked to "LuaEntity::item_requests" so that the bot's could auto refuel the burner