Skip to content

Commit

Permalink
Ran formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
jaythebusinessgoose committed Jun 15, 2024
1 parent a7c2092 commit 878982a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
13 changes: 10 additions & 3 deletions src/modlunky2/ui/levels/custom_levels/custom_level_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def __init__(
self.tool = CANVAS_MODE.DRAW

image_path = BASE_DIR / "static/images/help.png"
self.error_image = ImageTk.PhotoImage(Image.open(image_path).resize((self.zoom_level, self.zoom_level)))
self.error_image = ImageTk.PhotoImage(
Image.open(image_path).resize((self.zoom_level, self.zoom_level))
)

self.save_needed = False

Expand Down Expand Up @@ -561,7 +563,10 @@ def draw_layer(canvas_index, tile_codes):
self.zoom_level,
)
else:
logger.warning("Tile code %s found in room, but does not map to a valid tile code.", tilecode)
logger.warning(
"Tile code %s found in room, but does not map to a valid tile code.",
tilecode,
)
tile_image = self.error_image
x_offset, y_offset = 0, 0
self.canvas.replace_tile_at(
Expand Down Expand Up @@ -901,7 +906,9 @@ def fill_to_size_with_tile(tile_matrix, tile, width, height):
def update_zoom(self, zoom):
self.zoom_level = zoom
image_path = BASE_DIR / "static/images/help.png"
self.error_image = ImageTk.PhotoImage(Image.open(image_path).resize((zoom, zoom)))
self.error_image = ImageTk.PhotoImage(
Image.open(image_path).resize((zoom, zoom))
)
if self.lvl:
for tile in self.tile_palette_ref_in_use:
tile_name = tile.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ def __set_zoom(self, zoom):
self.canvas.set_zoom(zoom)
self.tile_image_map = {}
image_path = BASE_DIR / "static/images/help.png"
self.error_image = ImageTk.PhotoImage(Image.open(image_path).resize((zoom, zoom)))
self.error_image = ImageTk.PhotoImage(
Image.open(image_path).resize((zoom, zoom))
)
self.redraw()

def __get_chunk_for_template_draw_item(
Expand Down Expand Up @@ -957,7 +959,10 @@ def draw_chunk(canvas_index, chunk_start_x, chunk_start_y, tile_codes):
self.zoom_level,
)
else:
logger.warning("Tile code %s found in room, but does not map to a valid tile code.", tilecode)
logger.warning(
"Tile code %s found in room, but does not map to a valid tile code.",
tilecode,
)
tile_image = self.error_image
x_offset, y_offset = 0, 0
self.canvas.replace_tile_at(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,10 @@ def room_select(self): # Loads room when click if not parent node.
tile.name,
)
else:
logger.warning("Tile code %s found in room, but does not map to a valid tile code.", tile_code)
logger.warning(
"Tile code %s found in room, but does not map to a valid tile code.",
tile_code,
)
tile_image = self.error_image
x_coord, y_coord = 0, 0
self.canvas.replace_tile_at(
Expand Down

0 comments on commit 878982a

Please sign in to comment.