public bool TransferFrom(StorageModule source, uint type, uint amount) { // Transfer amount m^3 of type materials from source to here. if (this.QuerySpaceLeft (type) >= amount && source.QueryAmountStored (amount) >= amount) { // We have enough space and the source has enough of the resource; do the transfer. this.Store (type, amount); source.Withdraw (type, amount); return true; } else { return false; } }