even-distribution
even-distribution copied to clipboard
DyWorld-Dynamic's burner radar causes crash when distributing items to it
DyWorld-Dynamic mod introduces new radar which burns carbon fuel for it to run.
So entity:inventory("fuel")
at https://github.com/321freddy/even-distribution/blob/master/scripts/cleanup.lua#L267 returns nil
and then is accessed right away, causing Lua's equivalent of Null pointer exception.
After some debugging I found that entity.get_inventory("fuel")
returns actual inventory while entity.get_fuel_inventory()
returns nil
. It appears to be bug in Factorio, but fast fix for this mod would be to use entity.get_inventory(defines.inventory.fuel)
on line https://github.com/321freddy/even-distribution/blob/master/scripts/helpers/LuaControl.lua#L67