[Rseding] Prototype: pump with energy_source.type="burner": get_fuel_inventory() returns nil

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
AmatorPhasma
Fast Inserter
Fast Inserter
Posts: 126
Joined: Sat Aug 05, 2017 8:20 pm
Contact:

[Rseding] Prototype: pump with energy_source.type="burner": get_fuel_inventory() returns nil

Post by AmatorPhasma »

Hi,
I think I found a small bug, I have an entity, with the prototype pump and specified energy_source.type="burner"

like this:

Code: Select all

local pump = table.deepcopy(data.raw.pump['pump'])
pump.name = 'apm_pump_0'
pump.flags = {"placeable-neutral", "placeable-player", "player-creation"}
pump.minable = {mining_time = 0.2, result = "apm_pump_0"}
pump.energy_usage = "200kW"
pump.energy_source = {}
pump.energy_source.type = "burner"
pump.energy_source.fuel_categories = {'chemical','apm_refined_chemical'}
pump.energy_source.effectivity = 1
pump.energy_source.fuel_inventory_size = 1
pump.energy_source.burnt_inventory_size = 1
pump.energy_source.emissions_per_minute = 2.5
data:extend({pump})
Because somthing does not work in my script.

I found out that "entity.get_fuel_inventory()" returns allways nil,
but entity.get_inventory(defines.inventory.fuel) returns the correct LuaInventory

EDIT:
same behavior for:
entity.get_burnt_result_inventory() returns allways nil
and entity.get_inventory(defines.inventory.burnt_result) returns the correct LuaInventory

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

Re: [Rseding] Prototype: pump with energy_source.type="burner": get_fuel_inventory() returns nil

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”