private static void ProcessReactor(MyObjectBuilder_CubeBlock block, Options options, MyCubeSize size) { // Has it's own inventory, but it doesn't work, so still needs supporting function to add inventory if (options.PowerDownGrid) { ((MyObjectBuilder_Reactor)block).Enabled = false; } if (!options.Restock) { return; } try { List <MyDefinitionId> fuelList = GetItemDefinitionList(block); if (fuelList == null) { return; } MyObjectBuilder_Ingot fuel = new MyObjectBuilder_Ingot { SubtypeName = fuelList[0].SubtypeName }; MyPhysicalItemDefinition fuelDefinition = MyDefinitionManager.Static.GetPhysicalItemDefinition(fuel.GetId()); //AddToInventory(block.ComponentContainer, fuel, (int)(GetMaxVolume(block, size) / fuelDefinition.Volume), true); int amountToAdd = GetAmount(GetMaxVolume(block, size), fuelDefinition.Volume); if (options.MaxAmmo != 0 && amountToAdd > options.MaxUranium) { amountToAdd = options.MaxAmmo; } AddToInventory(block.ComponentContainer, fuel, amountToAdd, true); } catch (Exception e) { Core.GeneralLog.WriteToLog("MyObjectBuilder_Reactor", $"Exception! {e}"); } }