Skip to content

Picker does not paste Logistic restrictions into Inserters from assemblers #48

@Shirkit

Description

@Shirkit

Great Nexela!

Hey, I just noticed you integrated Additional Paste Settings into Picker, but you made a small mistake in the process. When pasting from an Assembler into an Inserter, it should (it's in the code you copied) restrict using the same logic I implemented in APS (logistic network or circuit network).

But, since vanilla game does not allow pasting into a "inseter" from a "assembling-maching", it never fires the event "on_entity_settings_pasted", which is triggered to call "paste_assembling_to_inserter".

The only solution to this is to add "additional_pastable_entities" to all assemblers with the list of all inserters in the game.

I'd assume it would be something like this:

local inserters = {}
for index, inserter in pairs(data.raw.inserter) do
  table.insert(inserters, inserter)
end

for index, assembler in pairs(data.raw["assembling-machine"]) do
  assembler.additional_pastable_entities = inserters
end

I failed to achieve this since I clearly do not understand the "data" update process, so I can't submit a PR to fix it.

Relevant link: http://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.additional_pastable_entities

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions