/// provide configured storage, graphics, and occupied box (single or mulit-block) public PowerStorageMachine(ModCreateSegmentEntityParameters parameters, PowerStorage storage, Position size, G graphics) : base(parameters, graphics) { Storage = storage; var center = new Position(parameters); var shift = size / 2; var box = new GridBox(new Box(center - shift, center + shift)); var probes = Direction.All().SelectMany( (d) => box.Side(d).Select((p) => new PciSurveyor.Probe(p, d)) ); Surveyor = new PciSurveyor(probes, this); }
public PowerStorageControlBlock( ModCreateSegmentEntityParameters parameters, PowerStorage storage, Position size, Materials materials, G graphics) : base(parameters, storage, size, graphics) { var center = new Position(parameters); var shift = size / 2; var box = new Box(center - shift, center + shift); this.Connector = new Connector <Machine>( this as Machine, materials, new GridBox(box).Blocks() ); }