}
}
// Handle destination alternatively
if (info.isAction(SignActionType.MEMBER_ENTER, SignActionType.GROUP_ENTER) && (facing || !info.isWatchedDirectionsDefined())) {
PathNode node = PathNode.getOrCreate(info);
if (node != null) {
String destination = null;
IProperties prop = null;
if (doCart && info.hasMember()) {
prop = info.getMember().getProperties();
} else if (doTrain && info.hasGroup()) {
prop = info.getGroup().getProperties();
}
if (prop != null) {
destination = prop.getDestination();
prop.setLastPathNode(node.getName());
}
// Continue with path finding if a valid destination is specified
// If the current node denotes the destination - don't switch!
if (!LogicUtil.nullOrEmpty(destination) && !node.containsName(destination)) {
if (PathProvider.isProcessing()) {
double currentForce = info.getGroup().getAverageForce();
// Add an action to let the train wait until the node IS explored
info.getGroup().getActions().addAction(new GroupActionWaitPathFinding(info, node, destination));
info.getMember().getActions().addActionLaunch(info.getMember().getDirectionFrom(), 1.0, currentForce);
info.getGroup().stop();
} else {
// Switch the rails to the right direction
PathConnection conn = node.findConnection(destination);
if (conn != null) {
info.setRailsTo(conn.direction);
}
}
}