|
|
@ -192,21 +192,24 @@ public class MapManager : ScriptableObject |
|
|
|
|
|
|
|
bool checkSegments(MapSection first, MapSection second) |
|
|
|
{ |
|
|
|
Debug.Log("Checking " + first.name + " & " + second.name); |
|
|
|
Debug.Log("Checking " + first.name + " & " + second.name + ". DiffMin = " + second.difficultyMin + ", DiffMax = " + second.difficultyMax); |
|
|
|
int connections = 0; |
|
|
|
//No more than one link section in a row
|
|
|
|
if (first.length == 1 && second.length == 1) |
|
|
|
{ |
|
|
|
Debug.Log("Disqualified: repeated link sections"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (second.difficultyMax < difficulty || second.difficultyMin > difficulty) //Check that we're in the right difficulty range for this section
|
|
|
|
{ |
|
|
|
Debug.Log("Disqualified: wrong difficulty"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (second.widthIn < widthMin || second.widthIn > widthMax) //And that it's in the right width range
|
|
|
|
{ |
|
|
|
Debug.Log("Disqualified: wrong width"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|