fechan / modular-factory

0 stars 0 forks source link

Refactor machines for multiblock io #1

Closed fechan closed 11 months ago

fechan commented 11 months ago

It needs to be possible to define a machine that has virtual slots corresponding to actual slots on multiple peripherals, i.e. for the I/O of Create sequenced assembly.

fechan commented 11 months ago

Idea is to have machines inherit from a superclass with the following methods:

fechan commented 11 months ago

We can get rid of peripherals from new altogether since it's only used for slot resolution anyway. So instead of peripheral_idx we just pass in refs to the actual peripheral table.

fechan commented 11 months ago

Done. See https://github.com/fechan/modular-factory/blob/master/drivers/create/sequencedassembly.lua for an example