Skip to content

Commit

Permalink
Mark some bg import errors as user errors
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara committed Feb 3, 2024
1 parent 4e21581 commit 5eadaa2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions skytemple/module/map_bg/controller/bg_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from collections.abc import Sequence, MutableSequence

from range_typed_integers import u16, u16_checked
from skytemple_files.user_error import UserValueError

from skytemple.core.error_handler import display_error
from skytemple.core.message_dialog import SkyTempleMessageDialog
Expand Down Expand Up @@ -362,7 +363,7 @@ def on_men_map_import_activate(self):
img1.load()
if img1.mode == "P":
if len(img1.palette.palette) < 768:
raise ValueError(
raise UserValueError(
_(
"The image for the first layer has less than 256 colors. Please make sure the image contains 256 colors, even if less are used."
)
Expand All @@ -373,7 +374,7 @@ def on_men_map_import_activate(self):
img2.load()
if img2.mode == "P":
if len(img2.palette.palette) < 768:
raise ValueError(
raise UserValueError(
_(
"The image for the second layer has less than 256 colors. Please make sure the image contains 256 colors, even if less are used."
)
Expand Down

0 comments on commit 5eadaa2

Please sign in to comment.