Intersection Dump func

This commit is contained in:
2024-09-17 08:02:10 -04:00
parent c9cb61faa7
commit 1563424178

View File

@@ -84,6 +84,7 @@ var move_check4 = 0
var move_check5 = 0 var move_check5 = 0
var Move_Check6 = 0 var Move_Check6 = 0
var Move_Check7 = 0 var Move_Check7 = 0
var Move_Check9 = 0
var Cicling = false var Cicling = false
var CircleInts = 0 var CircleInts = 0
var LogDumpOrdered = [] var LogDumpOrdered = []
@@ -144,6 +145,7 @@ func _process(delta):
SolvinCircleDeadEnds() SolvinCircleDeadEnds()
MoveAfterIntersection() MoveAfterIntersection()
IntersectionWaysAvailable() IntersectionWaysAvailable()
IntersectionDumping()
#BeenTheirFromPrevCord() #BeenTheirFromPrevCord()
#print(AutoBacktrack)var IntersectionDict = { #print(AutoBacktrack)var IntersectionDict = {
#CircleComplete() #CircleComplete()
@@ -418,7 +420,6 @@ func TrackIntersections():
Intersections.push_back(Current_Position) Intersections.push_back(Current_Position)
Intersections_Copy = Intersections.duplicate(true) Intersections_Copy = Intersections.duplicate(true)
Intersections = Intersections_Copy Intersections = Intersections_Copy
IntersectionMove = move
func MoveAfterIntersection(): func MoveAfterIntersection():
if move == IntersectionMove+1: if move == IntersectionMove+1:
@@ -427,10 +428,18 @@ func MoveAfterIntersection():
IntersectionDir.push_back(LogDumpOrdered[0]) IntersectionDir.push_back(LogDumpOrdered[0])
else: else:
IntersectionDir.push_back(LogDump[0]) IntersectionDir.push_back(LogDump[0])
print(Intersections) #print(Intersections)
print(IntersectionDir) #print(IntersectionDir)
Move_Check6 = move Move_Check6 = move
func IntersectionDumping():
if Move_Check9 != move:
if Detail_Dict.Type != "Plain Path" and Detail_Dict.Type != "Dead End":
IntersectionMove = move
IntersectionDump.push_back(Current_Position)
print(IntersectionDump)
Move_Check9 = move
func IntersectionWaysAvailable(): func IntersectionWaysAvailable():
var R: bool = $Rightv.is_colliding() var R: bool = $Rightv.is_colliding()
var L: bool = $Leftv.is_colliding() var L: bool = $Leftv.is_colliding()