Skip to content

Commit

Permalink
update mai plate
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Jan 23, 2025
1 parent dbe1a4b commit efa0528
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,7 @@ def __init__(
song_list,
song_complete,
remaster_required,
goal_mark,
image_size=80,
spacing=10,
margin=20,
rank_colors=[
(69, 193, 36),
(255, 186, 1),
(255, 90, 102),
(134, 49, 200),
(217, 197, 233),
],
goal_mark
):
self.song_list = song_list
self.song_complete = song_complete
Expand All @@ -39,14 +29,22 @@ def __init__(
self.goal_mark = "舞"
else:
self.goal_mark = goal_mark
self.image_size = image_size
self.spacing = spacing
self.margin = margin
self.rank_colors = rank_colors
self.image_size = 80
self.spacing = 10
self.margin = 20
self.rank_colors = [
(69, 193, 36),
(255, 186, 1),
(255, 90, 102),
(134, 49, 200),
(217, 197, 233),
]
self.cover_marks = {}
self.img = None
self.update_cover_marks()
self.create_ranked_image()

def create_ranked_image(self):
self.update_cover_marks()
total_width = 10 * (self.image_size + self.spacing) - self.spacing + 2 * self.margin
total_height = 0
for level, elements in self.song_list.items():
Expand Down Expand Up @@ -318,7 +316,5 @@ async def generate(msg: Bot.MessageSession, payload: dict, plate: str, use_cache
song_list, song_complete = await get_plate_process(msg, payload, plate, use_cache)
remaster_required = mai_plate_remaster_required if version in ['覇', '舞'] else []

creator = DrawPlateList(song_list, song_complete, remaster_required, goal)
creator.create_ranked_image()
pic = creator.get_dir()
pic = DrawPlateList(song_list, song_complete, remaster_required, goal).get_dir()
return pic
2 changes: 1 addition & 1 deletion modules/maimai/maimai.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .dbutils import DivingProberBindInfoManager
from .libraries.maimaidx_apidata import get_alias, get_info, search_by_alias, update_alias, update_cover
from .libraries.maimaidx_best50 import generate as generate_b50
from .libraries.maimaidx_plates import generate as generate_plate
from .libraries.maimaidx_platelist import generate as generate_plate
from .libraries.maimaidx_utils import *

total_list = TotalList()
Expand Down

0 comments on commit efa0528

Please sign in to comment.