Skip to content

Commit

Permalink
Merge pull request #57 from Skyminers/dev_cypas
Browse files Browse the repository at this point in the history
随机武器卡片更换底色
  • Loading branch information
Cypas authored Sep 12, 2023
2 parents f280799 + 4ea3630 commit 110aff4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ splatoon3_blacklist = ["10000","123456"] #黑名单列表,填写后黑名单
<details>
<summary>随机武器</summary>

![random_weapon.png](images/random_weapon.jpg)
![random_weapon.png](images/random_weapon.png)

</details>

Expand Down
Binary file added images/random_weapon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
4 changes: 2 additions & 2 deletions nonebot_plugin_splatoon3/image/image_processer.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ def get_random_weapon(weapon1: [WeaponData], weapon2: [WeaponData]):
image_background = circle_corner(get_file("bg2").resize(image_background_size), radii=20)
# 绘制上下两块武器区域
weapon_card_bg_size = (image_background_size[0] - 10, (image_background_size[1] - 10) // 2)
top_weapon_card = get_weapon_card(weapon1, weapon_card_bg_size, dict_bg_rgb["上-武器卡片-黄"], (34, 34, 34))
down_weapon_card = get_weapon_card(weapon2, weapon_card_bg_size, dict_bg_rgb["下-武器卡片-蓝"], (255, 255, 255))
top_weapon_card = get_weapon_card(weapon1, weapon_card_bg_size, dict_bg_rgb["上-武器卡片"], (34, 34, 34))
down_weapon_card = get_weapon_card(weapon2, weapon_card_bg_size, dict_bg_rgb["下-武器卡片"], (255, 255, 255))
# 将武器区域贴到最下层背景
paste_with_a(image_background, top_weapon_card, (5, 5))
paste_with_a(image_background, down_weapon_card, (5, (image_background_size[1]) // 2))
Expand Down
2 changes: 2 additions & 0 deletions nonebot_plugin_splatoon3/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"祭典时间-金黄": (234, 255, 61),
"上-武器卡片-黄": (234, 255, 61),
"下-武器卡片-蓝": (96, 58, 255),
"上-武器卡片": (255, 148, 157),
"下-武器卡片": (124, 217, 127),
"祭典结算项目卡片": (63, 63, 70, 70),
}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-splatoon3"
version = "1.2.9"
version = "1.3.0"
description = "一个基于nonebot2框架的splatoon3游戏日程查询插件"
authors = ["cypas <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 110aff4

Please sign in to comment.