if(!(n instanceof AbstractGasTankConduit)) {
return false;
}
AbstractGasTankConduit neighbour = (AbstractGasTankConduit) n;
if(neighbour.getGasType() == null || getGasType() == null) {
GasStack type = getGasType();
type = type != null ? type : neighbour.getGasType();
neighbour.setGasTypeOnNetwork(neighbour, type);
setGasTypeOnNetwork(this, type);
}
return ConduitUtil.joinConduits(this, faceHit);
} else if(containsExternalConnection(connDir)) {
// Toggle extraction mode
setConnectionMode(connDir, getNextConnectionMode(connDir));
} else if(containsConduitConnection(connDir)) {
GasStack curGasType = null;
if(getTankNetwork() != null) {
curGasType = getTankNetwork().getGasType();
}
ConduitUtil.disconectConduits(this, connDir);
setGasType(curGasType);