@@ -164,10 +164,10 @@ def __sub__(self, other: "Planet") -> "Planet":
164164 new_regions = None
165165 if self .regions is not None and other .regions is not None :
166166 new_regions = []
167- other_regions_dict = {region .id : region for region in other .regions }
167+ other_regions_dict = {region .regionIndex : region for region in other .regions }
168168 for region in self .regions :
169- if region .id in other_regions_dict :
170- new_regions .append (region - other_regions_dict [region .id ])
169+ if region .regionIndex in other_regions_dict :
170+ new_regions .append (region - other_regions_dict [region .regionIndex ])
171171 else :
172172 new_regions .append (region )
173173 elif self .regions is not None :
@@ -294,8 +294,10 @@ def estimate_remaining_lib_time(self, diff: "Planet") -> str:
294294 if timeval :
295295 rchange = region .calculate_change (rdiff )
296296 st = region .estimate_remaining_lib_time (rdiff )
297- if st and "Stalemate" not in st :
298- wo += "\n " + st
297+ if "Stalemate" in st :
298+ st = st .replace ("Stalemate" , "." )
299+ if st :
300+ wo += "\n *" + st
299301 if rchange < 0 :
300302 timeoffset += timeval
301303
@@ -387,9 +389,9 @@ def average(planets_list: List["Planet"]) -> "Planet":
387389 for planet in planets_list :
388390 if planet .regions is not None :
389391 for region in planet .regions :
390- if region .id not in regions_dict :
391- regions_dict [region .id ] = []
392- regions_dict [region .id ].append (region )
392+ if region .regionIndex not in regions_dict :
393+ regions_dict [region .regionIndex ] = []
394+ regions_dict [region .regionIndex ].append (region )
393395
394396 avg_regions = [Region .average (regions ) for regions in regions_dict .values ()]
395397
0 commit comments