diff --git a/maps4fs/generator/texture.py b/maps4fs/generator/texture.py index bbcd30b..9f7e579 100644 --- a/maps4fs/generator/texture.py +++ b/maps4fs/generator/texture.py @@ -260,17 +260,6 @@ def rotate_textures(self) -> None: "Skipping rotation of layer %s because it has no tags.", layer.name ) - # base_path = self.game.base_image_path(self.map_directory) - # if base_path: - # base_layer = self.get_base_layer() - # if base_layer: - # base_layer_path = base_layer.get_preview_or_path(self._weights_dir) - # self.logger.debug( - # "Copying base layer to use it later for density map to %s.", base_path - # ) - # # Make a copy of a base layer to the fruits density map. - # shutil.copy(base_layer_path, base_path) - # pylint: disable=W0201 def _read_parameters(self) -> None: """Reads map parameters from OSM data, such as: @@ -316,7 +305,10 @@ def _generate_weights(self, layer: Layer) -> None: Arguments: layer (Layer): Layer with textures and tags. """ - size = (self.map_rotated_size, self.map_rotated_size) + if layer.tags is None: + size = (self.map_size, self.map_size) + else: + size = (self.map_rotated_size, self.map_rotated_size) postfix = "_weight.png" if not layer.exclude_weight else ".png" if layer.count == 0: filepaths = [os.path.join(self._weights_dir, layer.name + postfix)]