simulation #47

Merged
Vishnu merged 10 commits from simulation into main 2025-04-05 12:38:05 +00:00
Showing only changes of commit c89129e4ce - Show all commits

View File

@@ -291,8 +291,8 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec
if (firstPath && secondPath &&
firstPath.type === 'Conveyor' &&
secondPath.type === 'Conveyor' &&
!firstSelected?.isCorner) {
console.log("Conveyor middle points can only connect to non-conveyor paths");
(!firstSelected?.isCorner || !isStartOrEnd)) {
console.log("Conveyor connections must be between start/end points");
return;
}
@@ -507,7 +507,10 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec
!isVehicleConnectingToNonConveyor &&
firstSelected.sphereUUID !== sphereUUID &&
firstSelected.pathUUID !== pathUUID &&
(firstSelected.isCorner || isConnectable)
(firstSelected.isCorner || isConnectable) &&
!(firstPath?.type === 'Conveyor' &&
pathData.type === 'Conveyor' &&
!(firstSelected.isCorner && isConnectable))
) {
snappedSphere = {
sphereUUID,