public RefineryDriver(StaticState configuredStaticState) { state = new SystemState(configuredStaticState); blockCollector = new BlockCollector(configuredStaticState.InventoryBlockNames); inventoryScanner = new InventoryScanner(configuredStaticState.IngotTypes.AllIngotItemTypes, configuredStaticState.OreTypes.All); refineryWorklist = new RefineryWorklist(configuredStaticState.OreTypes, configuredStaticState.IngotTypes, configuredStaticState.RefineryFactory, configuredStaticState.Blueprints); ingotWorklist = new IngotWorklist(state.Ingots); displayRenderer = new DisplayRenderer(); }
private void EnsureInitialised() { if (instance != null) { return; } Debug.Write(Debug.Level.Info, "Configuration updated. Reinitialising..."); var staticState = new StaticState(configuration); instance = new RefineryDriver(staticState); Rescan(); current = null; yieldCount = 0; }
public SystemState(StaticState staticState) { Static = staticState; Ingots = new IngotStockpiles(staticState.IngotTypes.All.Select(i => new IngotStockpile(i))); }