public void EjectExternalTank() { if (canister.HasContainerInserted) { if (canister.tankValveOpen) { StartCoroutine(DisplayFlashingText("Close the valve first!")); } else { canister.RetrieveInsertedContainer(); StartCoroutine(DisplayFlashingText("Tank ejected!")); } } else { StartCoroutine(DisplayFlashingText("No Tank Inserted")); } }
public void EjectExternalTank() { Canister canister = Provider.GetComponent <Canister>(); if (canister.InsertedContainer != null) { if (tankValveOpen) { StartCoroutine(DisplayFlashingText("Close the valve first!")); } else { canister.RetrieveInsertedContainer(); StartCoroutine(DisplayFlashingText("Tank ejected!")); } } else { StartCoroutine(DisplayFlashingText("No Tank Inserted")); } }