public void MaxCap() { print("Notified"); if (es.GetCurrentCapacity() >= 3000) { print("Initiated"); es.SetMaxCapacityReached(true); // Add storage automatically if we run out of space AddStorage(); if (storageArray.Count == 1) { es.SetMaxCapacity(es.GetMaxCapacity() * 2); } } }