I like the idea of this mod, however it does not gracefully handle it if you put in the wrong name for the fuel, when it tries to get a count of the fuel
I was trying to use it with Krastorio and used the display name of the fuel I was using. Unfortunately it crashed the game with the error below.
Is there any reason to even need to get the name of the fuel really?
It seems like the API would just give you a fuel available count or percentage without even needing to know the name.
On LuaEntity there is a "get_fuel_inventory" method that might work
https://lua-api.factorio.com/latest/classes/LuaEntity.html#get_fuel_inventory
The mod Simple Train AutoRefueling (0.3.0) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event simple-train-auto-refueling::on_train_changed_state (ID 25)
Unknown item name: Uranium fuel cell
stack traceback:
[C]: in function 'get_item_count'
simple-train-auto-refueling/control.lua:94: in function 'getFuelCount'
simple-train-auto-refueling/control.lua:24: in function <simple-train-auto-refueling/control.lua:4>