report error during build graph if something is wrong
This commit is contained in:
parent
96f4cf60a0
commit
ba230daad3
2 changed files with 9 additions and 0 deletions
|
@ -103,6 +103,10 @@ class GraphArea():
|
|||
def finish_build(self):
|
||||
self.points = np.array(tuple(point.i for point in self._built_points))
|
||||
|
||||
set_points = set(self.points)
|
||||
if len(self.points) != len(set_points):
|
||||
print('ERROR: POINTS DOUBLE-ADDED (AREA)', len(self.points), len(set_points))
|
||||
|
||||
def contains_point(self, point):
|
||||
return self.mpl_clear.contains_point(point)
|
||||
|
||||
|
|
|
@ -215,6 +215,11 @@ class GraphRoom():
|
|||
def finish_build(self):
|
||||
self.areas = tuple(self.areas)
|
||||
self.points = tuple(point.i for point in self._built_points)
|
||||
|
||||
set_points = set(self.points)
|
||||
if len(self.points) != len(set_points):
|
||||
print('ERROR: POINTS DOUBLE-ADDED (ROOM)', len(self.points), len(set_points))
|
||||
|
||||
self.room_transfer_points = tuple(i for i in self.points if i in self.level.room_transfer_points)
|
||||
self.excludables = tuple(self.excludables)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue