|
|
|
@ -549,6 +549,12 @@ class MapMaker(ConquestMap):
|
|
|
|
|
return points
|
|
|
|
|
|
|
|
|
|
async def convert_masks(self, regions):
|
|
|
|
|
if regions:
|
|
|
|
|
async for region in regions:
|
|
|
|
|
mask_path = self.masks_path() / f"{region}.png"
|
|
|
|
|
img: Image.Image = Image.open(mask_path).convert(MASK_MODE)
|
|
|
|
|
img.save(mask_path)
|
|
|
|
|
else:
|
|
|
|
|
async for mask_path in AsyncIter(self.masks_path().iterdir()):
|
|
|
|
|
# Don't both checking if masks are in self.regions
|
|
|
|
|
img: Image.Image = Image.open(mask_path).convert(MASK_MODE)
|
|
|
|
|