diff --git a/src/modlunky2/ui/levels/shared/palette_panel.py b/src/modlunky2/ui/levels/shared/palette_panel.py index c3d24b82..0cc2720d 100644 --- a/src/modlunky2/ui/levels/shared/palette_panel.py +++ b/src/modlunky2/ui/levels/shared/palette_panel.py @@ -205,7 +205,9 @@ def delete_tilecode(self, tile_name, tile_code): if self.secondary_tile_view.tile_code() == tile_code: self.secondary_tile_view.reset(disable=False) - def update_with_palette(self, new_palette, suggestions, dependency_tiles, biome, lvl): + def update_with_palette( + self, new_palette, suggestions, dependency_tiles, biome, lvl + ): for widget in self.palette.scrollable_frame.winfo_children(): widget.destroy() @@ -316,8 +318,12 @@ def update_with_palette(self, new_palette, suggestions, dependency_tiles, biome, count_col = -1 self.palette.scrollable_frame.rowconfigure(count_row + 1, minsize=15) count_row += 2 - dependency_label = ttk.Label(self.palette.scrollable_frame, text=str(dependency.name) + ":") - dependency_label.grid(row=count_row, column=0, columnspan=5, sticky="nw") + dependency_label = ttk.Label( + self.palette.scrollable_frame, text=str(dependency.name) + ":" + ) + dependency_label.grid( + row=count_row, column=0, columnspan=5, sticky="nw" + ) count_row += 1 for tile in dependency.tiles: @@ -350,7 +356,6 @@ def update_with_palette(self, new_palette, suggestions, dependency_tiles, biome, ), ) - self.primary_tile_view.enable() self.secondary_tile_view.enable() self.new_tile_panel.reset() diff --git a/src/modlunky2/ui/levels/shared/tile.py b/src/modlunky2/ui/levels/shared/tile.py index 1ab53560..4e91569d 100644 --- a/src/modlunky2/ui/levels/shared/tile.py +++ b/src/modlunky2/ui/levels/shared/tile.py @@ -4,7 +4,8 @@ from modlunky2.levels.level_templates import TemplateSetting from modlunky2.ui.levels.shared.setrooms import MatchedSetroom + @dataclass class DependencyPalette: name: str - tiles: List \ No newline at end of file + tiles: List diff --git a/src/modlunky2/ui/levels/vanilla_levels/vanilla_level_editor.py b/src/modlunky2/ui/levels/vanilla_levels/vanilla_level_editor.py index c835ac80..87d7cb0f 100644 --- a/src/modlunky2/ui/levels/vanilla_levels/vanilla_level_editor.py +++ b/src/modlunky2/ui/levels/vanilla_levels/vanilla_level_editor.py @@ -416,6 +416,7 @@ def tilecode_item(tilecode): return tilecode_item return [tilecode_item(tc) for tc in level_tilecodes] + def clear_tile_from_dependencies(tile): for palette in self.dependency_tile_palette_ref_in_use: for i in palette.tiles: @@ -443,7 +444,9 @@ def register_tile_code(tile): clear_tile_from_dependencies(tile) register_tile_code(tile) - self.dependency_tile_palette_ref_in_use.insert(0, DependencyPalette("From " + dependency, tiles)) + self.dependency_tile_palette_ref_in_use.insert( + 0, DependencyPalette("From " + dependency, tiles) + ) level = LevelFile.from_path(Path(lvl_path)) tiles = get_level_tilecodes(level) @@ -979,7 +982,6 @@ def use_dependency_tile(self, tile, dependency): self.populate_tilecode_palette() self.changes_made() - def add_tilecode( self, tile,