public GeneratorBlock(string name, IEnumerable <IPart> producesParts, IBuffer outputBuffer, IBlockProgram blockProgram, ILogger logger = null) : base(logger) { _name = name; _producesParts = producesParts; _outputBuffer = outputBuffer; _blockProgram = blockProgram; }
public Block(string name, IEnumerable <IPart> producesParts, IBuffer inputBuffer, IBuffer outputBuffer, IBlockProgram blockProgram, ILogger logger = null) : base(logger) { _name = name; _producesParts = producesParts.ToHashSet(); _usesParts = _producesParts.SelectMany(p => p.MadeFrom).ToHashSet(); _inputBuffer = inputBuffer; _outputBuffer = outputBuffer; _blockProgram = blockProgram; IdleTicks = 0; Ticks = 0; Log("Created."); }