Page 1 of 1

[0.15.2] Inserters not removing spent fuel from non-reactors

Posted: Thu Apr 27, 2017 12:19 am
by GotLag
Using the Nuclear Locomotives mod, no inserter (filter or normal) will remove used-up nuclear fuel containers. I can't see anything obvious that I'm missing in my locomotive entity definition, so is this an inserter/inventory bug?

Here is the nuclear locomotive entity definition:

Code: Select all

nuke_loco = util.table.deepcopy(data.raw["locomotive"]["locomotive"])
nuke_loco.name = "nuclear-locomotive"
nuke_loco.icon = "__Nuclear Locomotives__/graphics/icons/nuclear-locomotive.png"
nuke_loco.minable.result = "nuclear-locomotive"
nuke_loco.burner.fuel_category = "nuclear"
nuke_loco.burner.fuel_inventory_size = 1
nuke_loco.burner.burnt_inventory_size = 1
nuke_loco.burner.smoke = nil
nuke_loco.weight = 4000
nuke_loco.max_power = "1200kW"
nuke_loco.braking_force = 20 -- 10
nuke_loco.color = { r = 0, g = 0.75, b = 0.5, a = 0.5 }
nuke_loco.working_sound.sound.filename = "__base__/sound/idle1.ogg"
nuke_loco.working_sound.sound.volume = 2

data:extend({
  nuke_loco
})
Edit: changed title for clarity

Edit again: I just tested changing the stone furnace to run on nuclear fuel, and inserters won't remove spent fuel from that either - whether I use filters or not. Seems like inserters are ignoring the spent fuel inventory slots on anything not a reactor?

Re: [0.15.2] Inserters not removing spent fuel from non-reactors

Posted: Thu Apr 27, 2017 4:30 am
by Rseding91
It's a game mechanics problem: inserters only ever look at the "output" inventory of an entity. Each entity reports what index is the output inventory - for locomotives it's the same as the input inventory. That means that an inserter will only ever look at that one inventory.

Essentially: it's not supported to use a fuel type with a burnt result in a locomotive *and* have inserters remove the burnt items automatically.

Re: [0.15.2] Inserters not removing spent fuel from non-reactors

Posted: Thu Apr 27, 2017 4:33 am
by GotLag
Is the reactor a special case that considers its burnt inventory to be its output?

Re: [0.15.2] Inserters not removing spent fuel from non-reactors

Posted: Thu Apr 27, 2017 4:58 am
by Rseding91
GotLag wrote:Is the reactor a special case that considers its burnt inventory to be its output?
Yes, because it has no other inventory that would be acceptable for output. Similar to how assembling machines have the output inventory while also having 2 other input inventories that the inserter doesn't grab from.

Re: [0.15.2] Inserters not removing spent fuel from non-reactors

Posted: Thu Apr 27, 2017 7:41 am
by GotLag
Would it be feasible to allow entity prototypes to specify an output inventory, in the absence of an inserter logic rewrite?