nonebot-plugin-l4d2-server 1.0.0a1__py3-none-any.whl → 1.0.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nonebot_plugin_l4d2_server/__init__.py +4 -4
- nonebot_plugin_l4d2_server/__main__.py +65 -14
- nonebot_plugin_l4d2_server/config.py +11 -0
- nonebot_plugin_l4d2_server/l4_anne/__init__.py +125 -0
- nonebot_plugin_l4d2_server/l4_anne/ranne.py +18 -0
- nonebot_plugin_l4d2_server/l4_help/Help.json +67 -22
- nonebot_plugin_l4d2_server/l4_help/__init__.py +2 -2
- nonebot_plugin_l4d2_server/l4_help/icon//344/273/213/347/273/215.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//344/273/273/345/212/241.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//344/277/241/346/201/257.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/205/254/345/221/212.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/200/345/211/221.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/207/346/215/242.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/240/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/267/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/215/241/347/273/204.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/223/252/351/207/214.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/234/260/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/205/245.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/207/272.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/275/261.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/213/274/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/216/242/347/264/242.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/216/250/351/200/201.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/224/266/351/233/206.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/224/273/347/225/245.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/233/264/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/235/220/346/226/231.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/237/245/350/257/242.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/240/241/351/252/214.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/257/217/346/234/210.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/267/261/346/270/212.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/267/273/345/212/240.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/270/205/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//347/212/266/346/200/201.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//347/255/276/345/210/260.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//347/273/221/345/256/232.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/241/250.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/241/250/346/203/205.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/247/222/350/211/262.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/256/260/345/275/225.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//351/205/215/347/275/256.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//351/207/215/345/220/257.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/badge.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/banner.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/bg.jpg +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/button.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/icon.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/__init__.py +4 -4
- nonebot_plugin_l4d2_server/l4_image/anne_pil.py +18 -0
- nonebot_plugin_l4d2_server/l4_image/convert.py +9 -13
- nonebot_plugin_l4d2_server/l4_image/download.py +9 -7
- nonebot_plugin_l4d2_server/l4_image/html_img.py +47 -76
- nonebot_plugin_l4d2_server/l4_image/image_tools.py +19 -16
- nonebot_plugin_l4d2_server/l4_image/img/anne/back.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/anne/back1.jpg +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/head/head.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/header/logo.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/header/player1.jpg +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.html +17 -30
- nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.html +17 -26
- nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.html +48 -14
- nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/normal.html +14 -24
- nonebot_plugin_l4d2_server/{data/img → l4_image/img/template}/vac.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/vac_white.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/vtfs.py +3 -3
- nonebot_plugin_l4d2_server/l4_local/__init__.py +94 -0
- nonebot_plugin_l4d2_server/l4_local/file.py +105 -0
- nonebot_plugin_l4d2_server/l4_request/__init__.py +68 -9
- nonebot_plugin_l4d2_server/l4_request/draw_msg.py +38 -43
- nonebot_plugin_l4d2_server/l4_request/utils.py +0 -0
- nonebot_plugin_l4d2_server/utils/api/api.py +8 -2
- nonebot_plugin_l4d2_server/utils/api/models.py +108 -0
- nonebot_plugin_l4d2_server/utils/api/request.py +257 -39
- nonebot_plugin_l4d2_server/utils/database/models.py +12 -23
- nonebot_plugin_l4d2_server/utils/utils.py +22 -11
- {nonebot_plugin_l4d2_server-1.0.0a1.dist-info → nonebot_plugin_l4d2_server-1.0.0b1.dist-info}/METADATA +19 -11
- nonebot_plugin_l4d2_server-1.0.0b1.dist-info/RECORD +98 -0
- nonebot_plugin_l4d2_server/data/L4D2/image/head/head.png +0 -0
- nonebot_plugin_l4d2_server/data/L4D2/image/header/logo.png +0 -0
- nonebot_plugin_l4d2_server/data/L4D2/image/header/player1.jpg +0 -0
- nonebot_plugin_l4d2_server/data/L4D2/image/template/anne.html +0 -68
- nonebot_plugin_l4d2_server/data/L4D2/image/template/back.png +0 -0
- nonebot_plugin_l4d2_server/data/L4D2/image/template/fingerprint.svg +0 -15
- nonebot_plugin_l4d2_server/data/L4D2/image/template/group_ip.html +0 -258
- nonebot_plugin_l4d2_server/data/L4D2/image/template/help.html +0 -262
- nonebot_plugin_l4d2_server/data/L4D2/image/template/help_dack.html +0 -269
- nonebot_plugin_l4d2_server/data/L4D2/image/template/ip.html +0 -54
- nonebot_plugin_l4d2_server/data/L4D2/image/template/l.svg +0 -10
- nonebot_plugin_l4d2_server/data/L4D2/image/template/m.svg +0 -1
- nonebot_plugin_l4d2_server/data/L4D2/image/template/vue.css +0 -531
- nonebot_plugin_l4d2_server/data/L4D2/image/template/w.svg +0 -1
- nonebot_plugin_l4d2_server/data/icon//344/273/213/347/273/215.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//344/273/273/345/212/241.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//344/277/241/346/201/257.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/205/254/345/221/212.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/210/200/345/211/221.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/210/207/346/215/242.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/210/240/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/210/267/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/215/241/347/273/204.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/223/252/351/207/214.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/234/260/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/257/274/345/205/245.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/257/274/345/207/272.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//345/275/261.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/213/274/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/216/242/347/264/242.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/216/250/351/200/201.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/224/266/351/233/206.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/224/273/347/225/245.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/233/264/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/235/220/346/226/231.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/237/245/350/257/242.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/240/241/351/252/214.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/257/217/346/234/210.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/267/261/346/270/212.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/267/273/345/212/240.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//346/270/205/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//347/212/266/346/200/201.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//347/255/276/345/210/260.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//347/273/221/345/256/232.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//350/241/250.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//350/241/250/346/203/205.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//350/247/222/350/211/262.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//350/256/260/345/275/225.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//351/205/215/347/275/256.png +0 -0
- nonebot_plugin_l4d2_server/data/icon//351/207/215/345/220/257.png +0 -0
- nonebot_plugin_l4d2_server/data/img/l4d2.png +0 -0
- nonebot_plugin_l4d2_server/data/img/linux.png +0 -0
- nonebot_plugin_l4d2_server/data/img/white.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template//345/276/256/350/275/257/351/233/205/351/273/221.ttf +0 -0
- nonebot_plugin_l4d2_server-1.0.0a1.dist-info/RECORD +0 -144
- {nonebot_plugin_l4d2_server-1.0.0a1.dist-info → nonebot_plugin_l4d2_server-1.0.0b1.dist-info}/WHEEL +0 -0
- {nonebot_plugin_l4d2_server-1.0.0a1.dist-info → nonebot_plugin_l4d2_server-1.0.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -21,32 +21,28 @@ def core_font(size: int) -> ImageFont.FreeTypeFont:
|
|
21
21
|
async def convert_img(
|
22
22
|
img: Image.Image,
|
23
23
|
is_base64: bool = False,
|
24
|
-
) -> bytes:
|
25
|
-
...
|
24
|
+
) -> bytes: ...
|
26
25
|
|
27
26
|
|
28
27
|
@overload
|
29
28
|
async def convert_img(
|
30
29
|
img: Image.Image,
|
31
|
-
is_base64: bool = True,
|
32
|
-
) -> str:
|
33
|
-
...
|
30
|
+
is_base64: bool = True, # noqa: FBT001
|
31
|
+
) -> str: ...
|
34
32
|
|
35
33
|
|
36
34
|
@overload
|
37
35
|
async def convert_img(
|
38
36
|
img: bytes,
|
39
37
|
is_base64: bool = False,
|
40
|
-
) -> str:
|
41
|
-
...
|
38
|
+
) -> str: ...
|
42
39
|
|
43
40
|
|
44
41
|
@overload
|
45
42
|
async def convert_img(
|
46
43
|
img: Path,
|
47
44
|
is_base64: bool = False,
|
48
|
-
) -> str:
|
49
|
-
...
|
45
|
+
) -> str: ...
|
50
46
|
|
51
47
|
|
52
48
|
async def convert_img(
|
@@ -78,7 +74,7 @@ async def convert_img(
|
|
78
74
|
async with aiofiles.open(img, "rb") as fp:
|
79
75
|
img = await fp.read()
|
80
76
|
|
81
|
-
logger.success("
|
77
|
+
logger.success("图片处理完成!")
|
82
78
|
|
83
79
|
return f"base64://{b64encode(img).decode()}"
|
84
80
|
|
@@ -90,7 +86,7 @@ def convert_img_sync(img_path: Path):
|
|
90
86
|
return f"base64://{b64encode(img).decode()}"
|
91
87
|
|
92
88
|
|
93
|
-
async def str_lenth(r: str, size: int, limit: int = 540) -> str:
|
89
|
+
async def str_lenth(r: str, size: int, limit: int = 540) -> str: # noqa: RUF029
|
94
90
|
result = ""
|
95
91
|
temp = 0
|
96
92
|
for i in r:
|
@@ -158,7 +154,7 @@ async def text2pic(text: str, max_size: int = 800, font_size: int = 24):
|
|
158
154
|
|
159
155
|
img = Image.new(
|
160
156
|
"RGB",
|
161
|
-
(max_size, len(text) * font_size //
|
157
|
+
(max_size, len(text) * font_size // 10),
|
162
158
|
(255, 255, 255),
|
163
159
|
)
|
164
160
|
img_draw = ImageDraw.ImageDraw(img)
|
@@ -169,7 +165,7 @@ async def text2pic(text: str, max_size: int = 800, font_size: int = 24):
|
|
169
165
|
core_font(font_size),
|
170
166
|
"black",
|
171
167
|
max_size - 80,
|
172
|
-
True,
|
168
|
+
True, # noqa: FBT003
|
173
169
|
)
|
174
170
|
img = img.crop((0, 0, max_size, int(y + 80)))
|
175
171
|
return await convert_img(img)
|
@@ -27,20 +27,22 @@ async def download_url(url: str) -> bytes:
|
|
27
27
|
logger.warning(f"Error downloading {url}, retry {i}/3: {e}")
|
28
28
|
await asyncio.sleep(3)
|
29
29
|
|
30
|
-
raise Exception(f"{url}
|
30
|
+
raise Exception(f"{url} 下载失败!")
|
31
31
|
|
32
32
|
|
33
33
|
async def download_head(user_id: str) -> bytes:
|
34
34
|
url = f"http://q1.qlogo.cn/g?b=qq&nk={user_id}&s=640"
|
35
35
|
data = await download_url(url)
|
36
|
-
if
|
36
|
+
if (
|
37
|
+
hashlib.md5(data).hexdigest() == "acef72340ac0e914090bd35799f5594e"
|
38
|
+
): # noqa: S324
|
37
39
|
url = f"http://q1.qlogo.cn/g?b=qq&nk={user_id}&s=100"
|
38
40
|
data = await download_url(url)
|
39
41
|
return data
|
40
42
|
|
41
43
|
|
42
44
|
def square_to_circle(im: ImageS):
|
43
|
-
"""im
|
45
|
+
"""im是正方形,变圆形"""
|
44
46
|
size = im.size
|
45
47
|
mask = Image.new("L", size, 0)
|
46
48
|
draw = ImageDraw.Draw(mask)
|
@@ -50,7 +52,7 @@ def square_to_circle(im: ImageS):
|
|
50
52
|
return im
|
51
53
|
|
52
54
|
|
53
|
-
async def get_head_by_user_id_and_save(user_id):
|
55
|
+
async def get_head_by_user_id_and_save(user_id: str):
|
54
56
|
"""qq转头像"""
|
55
57
|
user_id = str(user_id)
|
56
58
|
|
@@ -61,7 +63,7 @@ async def get_head_by_user_id_and_save(user_id):
|
|
61
63
|
os.listdir(default_header_path),
|
62
64
|
)
|
63
65
|
default_head = default_head_path / random.choice(os.listdir(default_head_path))
|
64
|
-
|
66
|
+
# im头像 im2头像框 im3合成
|
65
67
|
if user_head_path.exists():
|
66
68
|
logger.info("使用本地头像")
|
67
69
|
im = Image.open(user_head_path).resize((280, 280)).convert("RGBA")
|
@@ -86,8 +88,8 @@ async def get_head_by_user_id_and_save(user_id):
|
|
86
88
|
return None
|
87
89
|
im2 = Image.open(default_head).resize((450, 450)).convert("RGBA")
|
88
90
|
im3 = Image.new("RGBA", im2.size, (255, 255, 255, 0))
|
89
|
-
|
90
|
-
|
91
|
+
_, _, _, a1 = im.split()
|
92
|
+
_, _, _, a2 = im2.split()
|
91
93
|
im = square_to_circle(im)
|
92
94
|
im3.paste(im, (75, 75), mask=a1)
|
93
95
|
im3.paste(im2, mask=a2)
|
@@ -8,83 +8,50 @@ from nonebot_plugin_htmlrender import html_to_pic
|
|
8
8
|
|
9
9
|
from ..config import config
|
10
10
|
from ..utils.api.models import OutServer
|
11
|
-
from .convert import convert_img
|
12
11
|
|
13
12
|
# from .htmlimg import dict_to_dict_img
|
14
13
|
# from ..l4d2_anne.anne_telecom import ANNE_API
|
15
|
-
from .download import get_head_by_user_id_and_save
|
16
14
|
|
17
15
|
template_path = Path(__file__).parent / "img/template"
|
18
16
|
|
19
17
|
env = jinja2.Environment(
|
20
18
|
loader=jinja2.FileSystemLoader(template_path),
|
21
19
|
enable_async=True,
|
20
|
+
autoescape=True,
|
22
21
|
)
|
23
22
|
|
24
23
|
|
25
|
-
async def out_png(usr_id, data_dict: dict):
|
26
|
-
"""使用html来生成图片"""
|
27
|
-
# content = template.render_async()
|
28
|
-
msg_dict = await dict_to_html(usr_id, data_dict)
|
29
|
-
template = env.get_template("anne.html")
|
30
|
-
html = await template.render_async(data=msg_dict)
|
31
|
-
return await html_to_pic(
|
32
|
-
html=html,
|
33
|
-
wait=0,
|
34
|
-
viewport={"width": 1100, "height": 800},
|
35
|
-
template_path=f"file://{template_path.absolute()}",
|
36
|
-
)
|
37
|
-
|
38
|
-
|
39
|
-
async def dict_to_html(usr_id, detail_map: dict):
|
40
|
-
"""输入qq、字典,获取新的msg替换html"""
|
41
|
-
detail_right = {}
|
42
|
-
detail_right["name"] = detail_map["Steam 名字:"]
|
43
|
-
detail_right["Steam_ID"] = detail_map["Steam ID:"]
|
44
|
-
detail_right["play_time"] = detail_map["游玩时间:"]
|
45
|
-
detail_right["last_online"] = detail_map["最后上线:"]
|
46
|
-
detail_right["rank"] = detail_map["排行:"]
|
47
|
-
detail_right["points"] = detail_map["分数:"]
|
48
|
-
detail_right["point_min"] = detail_map["每分钟获取分数:"]
|
49
|
-
detail_right["killed"] = detail_map["感染者消灭:"]
|
50
|
-
detail_right["shut"] = detail_map["爆头:"]
|
51
|
-
detail_right["out"] = detail_map["爆头率:"]
|
52
|
-
detail_right["playtimes"] = detail_map["游玩地图数量:"]
|
53
|
-
detail_right["url"] = detail_map["个人资料"]
|
54
|
-
detail_right["one_msg"] = detail_map["一言"]
|
55
|
-
detail_right["last_one"] = detail_map["救援关"]
|
56
|
-
|
57
|
-
# html_text = soup.prettify()
|
58
|
-
# for key, value in detail_right.items():
|
59
|
-
# html_text = html_text.replace(key,value)
|
60
|
-
# 头像
|
61
|
-
temp = await get_head_by_user_id_and_save(usr_id)
|
62
|
-
# temp = await get_head_steam_and_save(usr_id,detail_right['url'])
|
63
|
-
if not temp:
|
64
|
-
return None
|
65
|
-
res = await convert_img(temp, is_base64=True)
|
66
|
-
detail_right["header"] = f"data:image/png;base64,{res}"
|
67
|
-
data_list: List[dict] = [detail_right]
|
68
|
-
return data_list
|
69
|
-
|
70
|
-
|
71
24
|
async def server_ip_pic(server_dict: List[OutServer]):
|
72
25
|
"""
|
73
|
-
|
26
|
+
输入一个字典列表,输出图片
|
74
27
|
msg_dict:folder/name/map_/players/max_players/Players/[Name]
|
75
28
|
"""
|
76
29
|
for server_info in server_dict:
|
30
|
+
server_info["server"].player_count = (
|
31
|
+
0
|
32
|
+
if server_info["server"].player_count is None
|
33
|
+
else server_info["server"].player_count
|
34
|
+
)
|
35
|
+
server_info["server"].max_players = (
|
36
|
+
0
|
37
|
+
if server_info["server"].max_players is None
|
38
|
+
else server_info["server"].max_players
|
39
|
+
)
|
40
|
+
|
77
41
|
max_number = config.l4_players
|
78
42
|
if server_info.get("player"):
|
79
|
-
sorted_players = sorted(
|
80
|
-
|
81
|
-
|
43
|
+
sorted_players = sorted(
|
44
|
+
server_info["player"],
|
45
|
+
key=lambda x: x.score,
|
46
|
+
reverse=True,
|
47
|
+
)[:max_number]
|
48
|
+
print(sorted_players)
|
82
49
|
server_info["player"] = sorted_players
|
83
50
|
else:
|
84
51
|
server_info["player"] = []
|
85
52
|
|
86
53
|
# server_info["server"].server_type= f"{server_info['server'].server_type}.svg"
|
87
|
-
|
54
|
+
print(server_dict)
|
88
55
|
pic = await get_server_img(server_dict)
|
89
56
|
if pic:
|
90
57
|
logger.success("正在输出图片")
|
@@ -94,34 +61,38 @@ async def server_ip_pic(server_dict: List[OutServer]):
|
|
94
61
|
|
95
62
|
|
96
63
|
async def get_server_img(plugins: List[OutServer]) -> Optional[bytes]:
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
64
|
+
try:
|
65
|
+
if config.l4_style == "孤独摇滚":
|
66
|
+
template = env.get_template("Bocchi_The_Rock.html")
|
67
|
+
elif config.l4_style == "电玩像素":
|
68
|
+
template = env.get_template("Pixel.html")
|
69
|
+
elif config.l4_style == "缤纷彩虹":
|
70
|
+
template = env.get_template("Rainbow.html")
|
71
|
+
elif config.l4_style == "随机":
|
72
|
+
html_files = [
|
73
|
+
str(f.name) for f in template_path.rglob("*.html") if f.is_file()
|
74
|
+
]
|
75
|
+
template = env.get_template(random.choice(html_files))
|
76
|
+
else:
|
77
|
+
template = env.get_template("normal.html")
|
78
|
+
content = await template.render_async(
|
79
|
+
plugins=plugins,
|
80
|
+
max_count=config.l4_players,
|
81
|
+
)
|
82
|
+
return await html_to_pic(
|
83
|
+
content,
|
84
|
+
wait=0,
|
85
|
+
viewport={"width": 100, "height": 100},
|
86
|
+
template_path=f"file://{template_path.absolute()}",
|
87
|
+
)
|
88
|
+
except Exception as e:
|
89
|
+
logger.warning(f"Error in get_help_img: {e}")
|
119
90
|
return None
|
120
91
|
|
121
92
|
|
122
93
|
# async def server_group_ip_pic(msg_list: List[ServerGroup]) -> bytes:
|
123
94
|
# """
|
124
|
-
#
|
95
|
+
# 输入一个群组字典列表,输出图片
|
125
96
|
# msg_dict:folder/name/map_/players/max_players/Players/[Name]
|
126
97
|
# """
|
127
98
|
# template = env.get_template("group_ip.html")
|
@@ -17,7 +17,7 @@ def get_div():
|
|
17
17
|
|
18
18
|
|
19
19
|
async def sget(url: str):
|
20
|
-
async with httpx.AsyncClient(timeout=None) as client:
|
20
|
+
async with httpx.AsyncClient(timeout=None) as client: # noqa: S113
|
21
21
|
return await client.get(url=url)
|
22
22
|
|
23
23
|
|
@@ -44,7 +44,10 @@ def get_v4_bg(w: int, h: int, is_dark: bool = False, is_blur: bool = False):
|
|
44
44
|
return img.convert("RGBA")
|
45
45
|
|
46
46
|
|
47
|
-
async def shift_image_hue(
|
47
|
+
async def shift_image_hue(
|
48
|
+
img: Image.Image,
|
49
|
+
angle: float = 30,
|
50
|
+
) -> Image.Image: # noqa: RUF029
|
48
51
|
alpha = img.getchannel("A")
|
49
52
|
img = img.convert("HSV")
|
50
53
|
|
@@ -63,11 +66,11 @@ async def shift_image_hue(img: Image.Image, angle: float = 30) -> Image.Image:
|
|
63
66
|
return img
|
64
67
|
|
65
68
|
|
66
|
-
async def get_pic(url, size: Optional[Tuple[int, int]] = None) -> Image.Image:
|
69
|
+
async def get_pic(url: str, size: Optional[Tuple[int, int]] = None) -> Image.Image:
|
67
70
|
"""
|
68
71
|
从网络获取图片, 格式化为RGBA格式的指定尺寸
|
69
72
|
"""
|
70
|
-
async with httpx.AsyncClient(timeout=None) as client:
|
73
|
+
async with httpx.AsyncClient(timeout=None) as client: # noqa: S113
|
71
74
|
resp = await client.get(url=url)
|
72
75
|
if resp.status_code != 200:
|
73
76
|
if size is None:
|
@@ -120,7 +123,7 @@ def draw_center_text_by_line(
|
|
120
123
|
line = line.replace("\n", "")
|
121
124
|
img.text((x, y), line, fill, font, anchor)
|
122
125
|
line, lenth = "", 0
|
123
|
-
y += h *
|
126
|
+
y += h * 1.5
|
124
127
|
else:
|
125
128
|
img.text((x, y), line, fill, font, anchor)
|
126
129
|
return y
|
@@ -133,7 +136,7 @@ def draw_text_by_line(
|
|
133
136
|
font: ImageFont.FreeTypeFont,
|
134
137
|
fill: Union[Tuple[int, int, int, int], str],
|
135
138
|
max_length: float,
|
136
|
-
center=False,
|
139
|
+
center=False, # noqa: ANN001
|
137
140
|
line_space: Optional[float] = None,
|
138
141
|
) -> float:
|
139
142
|
"""
|
@@ -192,13 +195,13 @@ def draw_text_by_line(
|
|
192
195
|
def easy_paste(
|
193
196
|
im: Image.Image,
|
194
197
|
im_paste: Image.Image,
|
195
|
-
pos=(0, 0),
|
196
|
-
direction="lt",
|
198
|
+
pos=(0, 0), # noqa: ANN001
|
199
|
+
direction="lt", # noqa: ANN001
|
197
200
|
):
|
198
201
|
"""
|
199
202
|
inplace method
|
200
203
|
快速粘贴, 自动获取被粘贴图像的坐标。
|
201
|
-
pos
|
204
|
+
pos应当是粘贴点坐标,direction指定粘贴点方位,例如lt为左上
|
202
205
|
"""
|
203
206
|
x, y = pos
|
204
207
|
size_x, size_y = im_paste.size
|
@@ -215,8 +218,8 @@ def easy_paste(
|
|
215
218
|
def easy_alpha_composite(
|
216
219
|
im: Image.Image,
|
217
220
|
im_paste: Image.Image,
|
218
|
-
pos=(0, 0),
|
219
|
-
direction="lt",
|
221
|
+
pos=(0, 0), # noqa: ANN001
|
222
|
+
direction="lt", # noqa: ANN001
|
220
223
|
) -> Image.Image:
|
221
224
|
"""
|
222
225
|
透明图像快速粘贴
|
@@ -379,11 +382,11 @@ class CustomizeImage:
|
|
379
382
|
for i in range(color):
|
380
383
|
bg = tuple(
|
381
384
|
q.getpalette()[ # type:ignore
|
382
|
-
i * 3 : (i * 3) + 3
|
385
|
+
i * 3 : (i * 3) + 3
|
383
386
|
],
|
384
387
|
)
|
385
388
|
light_value = bg[0] * 0.3 + bg[1] * 0.6 + bg[2] * 0.1
|
386
|
-
if abs(light_value - based_light) < temp:
|
389
|
+
if abs(light_value - based_light) < temp:
|
387
390
|
bg_color = bg
|
388
391
|
temp = abs(light_value - based_light)
|
389
392
|
return bg_color # type:ignore
|
@@ -395,9 +398,9 @@ class CustomizeImage:
|
|
395
398
|
if max(*bg_color) > 255 - r:
|
396
399
|
r *= -1
|
397
400
|
return (
|
398
|
-
math.floor(bg_color[0] + r
|
399
|
-
math.floor(bg_color[1] + r
|
400
|
-
math.floor(bg_color[2] + r
|
401
|
+
math.floor(min(bg_color[0] + r, 255)),
|
402
|
+
math.floor(min(bg_color[1] + r, 255)),
|
403
|
+
math.floor(min(bg_color[2] + r, 255)),
|
401
404
|
)
|
402
405
|
|
403
406
|
@staticmethod
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -4,11 +4,8 @@
|
|
4
4
|
<style>
|
5
5
|
body {
|
6
6
|
background-image: url("Bocchi_The_Rock.png");
|
7
|
-
background-repeat:
|
7
|
+
background-repeat: repeat;
|
8
8
|
background-size: cover;
|
9
|
-
/* 调整背景图片大小适应屏幕 */
|
10
|
-
/*background-position: center center; /* 使背景图片始终居中 */
|
11
|
-
/*background-attachment: fixed; /* 背景图片不随内容滚动 */
|
12
9
|
margin: 0px;
|
13
10
|
zoom: 150%;
|
14
11
|
}
|
@@ -28,6 +25,13 @@
|
|
28
25
|
transform: translateX(-100px);
|
29
26
|
}
|
30
27
|
|
28
|
+
/* Vac图标样式 */
|
29
|
+
.vac-icon {
|
30
|
+
width: 13px;
|
31
|
+
height: auto;
|
32
|
+
margin-left: 190px;
|
33
|
+
}
|
34
|
+
|
31
35
|
.image {
|
32
36
|
display: flex;
|
33
37
|
flex-direction: column;
|
@@ -81,8 +85,8 @@
|
|
81
85
|
border: 1px solid;
|
82
86
|
border-radius: 5px;
|
83
87
|
border-color: #e5e7eb;
|
84
|
-
box-shadow: 0px 2px 6px
|
85
|
-
background-color: #
|
88
|
+
box-shadow: 0px 2px 6px 2px rgba(0, 0, 0, 0.2);
|
89
|
+
background-color: #ffffff3d;
|
86
90
|
}
|
87
91
|
|
88
92
|
.plugin_meta {
|
@@ -255,35 +259,18 @@
|
|
255
259
|
</div>
|
256
260
|
<div class="plugin_meta_line3">
|
257
261
|
{% if plugin.server.platform == 'l' %}
|
258
|
-
<
|
259
|
-
p-id="2665" width="13" height="13">
|
260
|
-
<path
|
261
|
-
d="M433.700571 234.861714c-11.446857 1.133714-7.424 11.446857-13.714285 11.446857-5.705143 0.585143-4.571429-12.580571 13.714285-11.446857z m49.737143 8.009143c-5.705143 1.718857-6.290286-9.142857-16.566857-6.290286 16.566857-7.424 22.272 3.986286 16.566857 6.290286z m-200.594285 243.968c-5.156571-1.718857-3.986286 8.557714-9.142858 16.566857-3.986286 7.424-14.299429 13.129143-6.290285 14.299429 2.852571 0.585143 10.861714-6.290286 14.299428-14.299429 2.852571-9.728 5.705143-14.848 1.133715-16.566857z m488.594285 205.165714c0-10.276571-22.272-20.004571-31.414857-23.990857 15.433143-51.419429 8.557714-72.009143-1.718857-120.576-8.009143-36.571429-41.728-86.272-67.986286-101.705143 6.838857 5.705143 19.419429 22.272 32.585143 47.433143 22.857143 42.861714 45.714286 106.276571 30.866286 158.866286-5.705143 20.553143-19.419429 23.442286-28.562286 23.990857-40.009143 4.571429-16.566857-48.018286-33.133714-119.442286-18.870857-80.018286-38.290286-85.723429-42.861714-92.013714-23.442286-104.009143-49.152-93.696-56.576-132.571428-6.290286-34.852571 30.281143-63.414857-19.419429-73.142858-15.433143-2.852571-37.156571-18.285714-45.714286-19.419428s-13.129143-57.709714 18.870857-59.428572c31.414857-2.304 37.156571 35.437714 31.414858 50.285715-9.142857 14.848 0.585143 20.553143 16.018285 15.433143 12.580571-3.986286 4.571429-37.156571 7.424-41.728-8.009143-48.018286-28.013714-54.857143-48.566857-58.843429-78.848 6.290286-43.446857 93.147429-51.419428 85.138286-11.446857-11.995429-44.580571-1.133714-44.580572-8.557715 0.585143-44.580571-14.299429-70.290286-34.852571-70.838857-22.857143-0.585143-32 31.414857-33.133715 49.700572-1.718857 17.152 9.728 53.138286 18.285715 50.285714 5.705143-1.718857 15.433143-13.129143 5.156571-12.580571-5.156571 0-13.129143-12.580571-14.299428-27.428572-0.585143-14.848 5.156571-29.696 24.576-29.147428 22.272 0.585143 22.272 45.129143 20.004571 46.848a104.850286 104.850286 0 0 0-17.700571 16.566857c-7.424 11.995429-21.723429 15.433143-27.428572 20.553143-9.728 10.276571-11.995429 21.723429-4.571428 25.709714 26.294857 14.848 17.700571 32 54.272 33.133714 23.990857 1.133714 41.728-3.437714 58.294857-8.557714 12.580571-3.986286 53.138286-12.580571 61.696-27.428572 3.986286-6.290286 8.557714-6.290286 11.446857-4.571428 5.705143 2.852571 6.838857 13.714286-7.424 17.152-20.004571 5.705143-40.009143 16.566857-58.294857 23.442286-17.700571 7.424-23.442286 10.276571-40.009143 13.129142-37.705143 6.838857-65.718857-13.714286-40.557714 10.861715 8.557714 8.009143 16.566857 13.129143 38.290285 12.580571 48.018286-1.718857 101.156571-59.428571 106.276572-33.718857 1.133714 5.705143-14.848 12.580571-27.428572 18.870857-44.580571 21.723429-75.995429 65.133714-104.557714 50.285714-25.709714-13.714286-51.419429-77.129143-50.870857-48.566857 0.585143 43.995429-57.709714 82.870857-30.866286 133.156572-17.700571 4.571429-57.161143 88.576-62.866286 131.986285-3.437714 25.161143 2.304 55.990857-3.986285 73.142858-8.557714 25.161143-47.433143-23.990857-34.852572-84.004572 2.304-10.276571 0-12.580571-2.852571-7.424-15.433143 28.013714-6.838857 67.437714 5.705143 94.866286 5.156571 11.995429 18.285714 17.152 28.013714 27.428571 20.004571 22.857143 98.852571 81.152 112.566857 95.414857 17.700571 16.566857 12.580571 55.442286-23.990857 59.428572 18.870857 35.437714 37.156571 38.838857 36.571429 96.585143 21.723429-11.446857 13.129143-36.571429 3.986285-52.553143-6.290286-11.446857-14.299429-16.566857-12.580571-19.419429 1.133714-1.718857 12.580571-11.446857 18.870857-3.986285 19.419429 21.723429 55.990857 25.709714 94.866286 20.553142 39.424-4.571429 81.700571-18.285714 101.156571-49.700571 9.142857-14.848 15.433143-20.004571 19.419429-17.152 4.571429 2.304 6.290286 12.580571 5.705143 29.696-0.585143 18.285714-8.009143 37.156571-13.129143 52.553143-5.156571 17.700571-6.838857 29.696 10.276571 30.281143 4.571429-32 13.714286-63.414857 16.018286-95.414857 2.852571-36.571429-23.442286-104.009143 5.156571-137.728 7.424-9.142857 16.566857-10.276571 29.147429-10.276572 1.718857-45.714286 72.009143-42.276571 95.414857-23.442286zM412.562286 219.428571c2.304-14.299429-4.571429-24.576-8.009143-25.709714-6.838857-1.718857-5.705143 8.557714-2.304 7.424 2.304 0 5.156571 3.437714 3.986286 8.557714-1.133714 6.838857-0.585143 11.446857 4.571428 11.446858 0.585143 0 1.718857 0 1.718857-1.718858z m239.433143 112.566858c-2.304-10.861714-10.276571-6.838857-19.419429-12.580572-10.861714-6.838857-13.129143-18.285714-17.152-14.299428-11.995429 13.129143 14.848 40.557714 26.294857 42.861714 6.838857 1.133714 11.995429-8.009143 10.276572-16.018286zM550.290286 210.285714c0.585143-13.714286-11.446857-20.553143-14.299429-20.004571-7.424 0.585143-5.156571 3.986286-1.718857 5.156571 4.571429 1.133714 9.142857 9.142857 10.276571 17.700572 0 1.133714 5.705143-1.133714 5.705143-2.852572z m30.866285-133.156571c0.585143-2.852571-6.838857-6.290286-11.995428-10.276572-4.571429-4.571429-9.142857-8.557714-13.714286-8.557714-11.446857 1.133714-5.705143 13.129143-7.424 18.870857-2.304 6.290286-10.861714 11.446857-5.156571 16.018286 5.156571 3.986286 8.557714-6.290286 19.419428-10.276571 2.852571-1.133714 16.018286 0.585143 18.870857-5.705143z m322.852572 766.317714c70.290286 43.446857-26.294857 79.433143-67.986286 100.571429-32.585143 16.566857-75.995429 53.138286-92.013714 68.571428-11.995429 11.446857-61.696 17.152-89.709714 2.852572-32.585143-16.566857-15.433143-42.861714-65.718858-44.580572-25.161143-0.585143-49.700571-0.585143-74.276571-0.585143-21.723429 0.585143-43.446857 1.718857-65.718857 2.304-75.446857 1.718857-82.870857 50.285714-131.437714 48.566858-33.133714-1.133714-74.861714-27.428571-146.870858-42.276572-50.285714-10.276571-98.852571-13.129143-109.129142-35.437714s12.580571-47.433143 14.299428-69.156572c1.718857-29.147429-21.723429-68.571429-4.571428-83.419428 14.848-13.129143 46.299429-3.437714 66.852571-14.848 21.723429-12.580571 30.866286-22.272 30.866286-49.152 8.009143 27.428571-0.585143 49.700571-18.285715 60.562286-10.861714 6.838857-30.866286 10.276571-47.433142 8.557714-13.129143-1.133714-21.138286 0.585143-24.576 5.705143-5.156571 6.290286-3.437714 17.700571 2.852571 32.585143s13.714286 24.576 12.580571 42.861714c-0.585143 18.285714-21.138286 40.009143-17.700571 55.442286 1.133714 5.705143 6.838857 10.861714 21.138286 14.848 22.857143 6.290286 64.585143 12.580571 105.142857 22.272 45.129143 11.446857 92.013714 32 121.161143 28.013714 86.857143-11.995429 37.156571-105.142857 23.442285-127.414857-73.728-115.419429-122.294857-190.866286-161.133714-161.133715-9.728 8.009143-10.276571-19.419429-9.728-30.281142 1.718857-37.705143 20.553143-51.419429 32-80.566858 21.723429-55.442286 38.290286-118.857143 71.424-151.442285 24.576-32 63.414857-84.004571 70.838857-111.433143-6.290286-59.428571-8.009143-122.294857-9.142857-177.152-1.133714-58.843429 8.009143-110.299429 74.276572-146.285714C431.469714 3.437714 452.608 0 474.88 0c39.424-0.585143 83.419429 10.861714 111.433143 31.414857 44.580571 33.133714 72.557714 103.424 69.156571 153.709714-2.304 39.424 4.571429 80.018286 17.152 122.294858 14.848 49.700571 38.290286 84.553143 75.995429 124.562285 45.129143 48.018286 80.566857 142.299429 90.843428 202.276572 9.142857 55.990857-3.437714 90.843429-15.433142 92.562285-18.285714 2.852571-29.696 60.562286-86.857143 58.294858-36.571429-1.718857-40.009143-23.442286-50.285715-42.276572-16.566857-29.147429-33.133714-20.004571-39.424 10.861714-3.437714 15.433143-1.133714 38.290286 3.986286 55.442286 10.276571 35.986286 6.838857 69.705143 0.585143 111.433143-11.995429 78.848 55.442286 93.696 100.571429 55.990857 44.580571-37.156571 54.272-42.861714 110.299428-62.281143 85.138286-29.147429 56.576-54.857143 10.861714-70.290285-41.142857-13.714286-42.861714-82.870857-28.013714-96 3.437714 74.276571 42.276571 85.138286 58.294857 95.414857z"
|
262
|
-
fill="" p-id="2666"></path>
|
262
|
+
<image xlink:href="l.svg" width="13" height="13" fill="#FFFFFF" />
|
263
263
|
</svg>
|
264
264
|
{% elif plugin.server.platform == 'w' %}
|
265
|
-
<
|
266
|
-
p-id="3630" width="13" height="13">
|
267
|
-
<path
|
268
|
-
d="M456 484V160.1l-335.9 72V484H456zM512 484h391.8V64.2l-391.8 84V484zM456 540H120.2v251.9l335.9 72V540zM512 540v335.9l391.8 84V540H512z"
|
269
|
-
fill="#00adef" p-id="3631"></path>
|
270
|
-
</svg>
|
265
|
+
<image xlink:href="w.svg" width="13" height="13" fill="#00adef" />
|
271
266
|
{% else %}
|
272
|
-
<
|
273
|
-
p-id="5446" width="13" height="13">
|
274
|
-
<path
|
275
|
-
d="M185.952 688l23.872-33.824c85.536 43.232 186.816 67.808 333.184 62.272 0.992-42.304 5.696-82.72 14.496-118.848H396.736c3.776-172.288 67.168-325.024 138.592-441.28H51.264l0.192 740.32h512.64a658.112 658.112 0 0 1-20.832-138.048c-132.8 5.664-269.856-18.304-357.312-70.592z m86.752-422.016h46.848V375.52h-46.848V265.984z"
|
276
|
-
fill="#4F8FCC" p-id="5447"></path>
|
277
|
-
<path
|
278
|
-
d="M959.04 156.352H584.8c-65.472 100.576-129.984 236-144.32 398.976h169.44c-13.792 50.304-24.448 102.176-24.96 157.952 95.072-11.68 145.408-23.872 215.904-59.456l23.84 33.824c-61.312 36.672-148.224 59.2-239.744 67.584 1.408 46.944 8.448 93.984 22.08 141.472h352V156.352zM707.808 375.456h-46.88V265.92h46.88v109.536z"
|
279
|
-
fill="#BABEE0" p-id="5448"></path>
|
280
|
-
<path
|
281
|
-
d="M319.584 375.52h-46.88V265.984h46.848V375.52zM209.792 654.176L185.952 688c87.456 52.288 224.544 76.256 357.312 70.624a618.4 618.4 0 0 1-0.256-42.144c-146.368 5.536-247.68-19.072-333.216-62.304zM707.808 265.92v109.536h-46.88V265.92h46.88zM584.96 755.232c91.52-8.416 178.432-30.944 239.744-67.584l-23.84-33.824C730.368 689.408 680.032 701.6 584.96 713.28c0.544-55.744 11.2-107.616 24.96-157.952H440.48c14.336-163.008 78.848-298.432 144.32-398.976a1182.144 1182.144 0 0 1 73.76-101.024l-31.616-26.4a1066.656 1066.656 0 0 0-91.68 127.424C463.84 272.576 400.48 425.344 396.672 597.632H557.44c-8.8 36.128-13.504 76.544-14.496 118.848-0.32 13.92-0.352 27.872 0.256 42.144 1.92 45.056 8.704 91.68 20.832 138.048a604.48 604.48 0 0 0 46.624 124.256l38.016-18.304a602.912 602.912 0 0 1-41.632-105.952 571.936 571.936 0 0 1-22.08-141.44z"
|
282
|
-
fill="#224477" p-id="5449"></path>
|
283
|
-
</svg>
|
267
|
+
<image xlink:href="m.svg" width="13" height="13" />
|
284
268
|
{% endif %}
|
285
269
|
<div class="package_name"> {{ plugin.server.player_count }}/{{ plugin.server.max_players }} </div>
|
286
|
-
|
270
|
+
{% if plugin.server.vac_enabled %}
|
271
|
+
<img class="vac-icon" src="vac.png" alt="VAC Enabled">
|
272
|
+
{% else %}
|
273
|
+
{% endif %}
|
287
274
|
</div>
|
288
275
|
</div>
|
289
276
|
</div>
|
Binary file
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<style>
|
5
5
|
body {
|
6
6
|
background-image: url("Pixel.png");
|
7
|
-
background-repeat:
|
7
|
+
background-repeat: repeat;
|
8
8
|
background-size: cover;
|
9
9
|
/* 调整背景图片大小适应屏幕 */
|
10
10
|
/*background-position: center center; /* 使背景图片始终居中 */
|
@@ -28,6 +28,13 @@
|
|
28
28
|
transform: translateX(-100px);
|
29
29
|
}
|
30
30
|
|
31
|
+
.vac-icon {
|
32
|
+
width: 13px;
|
33
|
+
height: auto;
|
34
|
+
margin-left: 190px;
|
35
|
+
|
36
|
+
}
|
37
|
+
|
31
38
|
.image {
|
32
39
|
display: flex;
|
33
40
|
flex-direction: column;
|
@@ -97,7 +104,6 @@
|
|
97
104
|
border-radius: 5px;
|
98
105
|
}
|
99
106
|
|
100
|
-
|
101
107
|
.plugin_meta {
|
102
108
|
display: flex;
|
103
109
|
flex-direction: column;
|
@@ -148,10 +154,10 @@
|
|
148
154
|
|
149
155
|
.package_name_label {
|
150
156
|
background-image: url(./fingerprint.svg);
|
151
|
-
width:
|
157
|
+
width: 20px;
|
152
158
|
height: 13px;
|
153
159
|
color: #efefef;
|
154
|
-
margin-right:
|
160
|
+
margin-right: 20px;
|
155
161
|
}
|
156
162
|
|
157
163
|
.package_name {
|
@@ -302,31 +308,18 @@
|
|
302
308
|
p-id="2665" width="13" height="13">
|
303
309
|
<path
|
304
310
|
d="M433.700571 234.861714c-11.446857 1.133714-7.424 11.446857-13.714285 11.446857-5.705143 0.585143-4.571429-12.580571 13.714285-11.446857z m49.737143 8.009143c-5.705143 1.718857-6.290286-9.142857-16.566857-6.290286 16.566857-7.424 22.272 3.986286 16.566857 6.290286z m-200.594285 243.968c-5.156571-1.718857-3.986286 8.557714-9.142858 16.566857-3.986286 7.424-14.299429 13.129143-6.290285 14.299429 2.852571 0.585143 10.861714-6.290286 14.299428-14.299429 2.852571-9.728 5.705143-14.848 1.133715-16.566857z m488.594285 205.165714c0-10.276571-22.272-20.004571-31.414857-23.990857 15.433143-51.419429 8.557714-72.009143-1.718857-120.576-8.009143-36.571429-41.728-86.272-67.986286-101.705143 6.838857 5.705143 19.419429 22.272 32.585143 47.433143 22.857143 42.861714 45.714286 106.276571 30.866286 158.866286-5.705143 20.553143-19.419429 23.442286-28.562286 23.990857-40.009143 4.571429-16.566857-48.018286-33.133714-119.442286-18.870857-80.018286-38.290286-85.723429-42.861714-92.013714-23.442286-104.009143-49.152-93.696-56.576-132.571428-6.290286-34.852571 30.281143-63.414857-19.419429-73.142858-15.433143-2.852571-37.156571-18.285714-45.714286-19.419428s-13.129143-57.709714 18.870857-59.428572c31.414857-2.304 37.156571 35.437714 31.414858 50.285715-9.142857 14.848 0.585143 20.553143 16.018285 15.433143 12.580571-3.986286 4.571429-37.156571 7.424-41.728-8.009143-48.018286-28.013714-54.857143-48.566857-58.843429-78.848 6.290286-43.446857 93.147429-51.419428 85.138286-11.446857-11.995429-44.580571-1.133714-44.580572-8.557715 0.585143-44.580571-14.299429-70.290286-34.852571-70.838857-22.857143-0.585143-32 31.414857-33.133715 49.700572-1.718857 17.152 9.728 53.138286 18.285715 50.285714 5.705143-1.718857 15.433143-13.129143 5.156571-12.580571-5.156571 0-13.129143-12.580571-14.299428-27.428572-0.585143-14.848 5.156571-29.696 24.576-29.147428 22.272 0.585143 22.272 45.129143 20.004571 46.848a104.850286 104.850286 0 0 0-17.700571 16.566857c-7.424 11.995429-21.723429 15.433143-27.428572 20.553143-9.728 10.276571-11.995429 21.723429-4.571428 25.709714 26.294857 14.848 17.700571 32 54.272 33.133714 23.990857 1.133714 41.728-3.437714 58.294857-8.557714 12.580571-3.986286 53.138286-12.580571 61.696-27.428572 3.986286-6.290286 8.557714-6.290286 11.446857-4.571428 5.705143 2.852571 6.838857 13.714286-7.424 17.152-20.004571 5.705143-40.009143 16.566857-58.294857 23.442286-17.700571 7.424-23.442286 10.276571-40.009143 13.129142-37.705143 6.838857-65.718857-13.714286-40.557714 10.861715 8.557714 8.009143 16.566857 13.129143 38.290285 12.580571 48.018286-1.718857 101.156571-59.428571 106.276572-33.718857 1.133714 5.705143-14.848 12.580571-27.428572 18.870857-44.580571 21.723429-75.995429 65.133714-104.557714 50.285714-25.709714-13.714286-51.419429-77.129143-50.870857-48.566857 0.585143 43.995429-57.709714 82.870857-30.866286 133.156572-17.700571 4.571429-57.161143 88.576-62.866286 131.986285-3.437714 25.161143 2.304 55.990857-3.986285 73.142858-8.557714 25.161143-47.433143-23.990857-34.852572-84.004572 2.304-10.276571 0-12.580571-2.852571-7.424-15.433143 28.013714-6.838857 67.437714 5.705143 94.866286 5.156571 11.995429 18.285714 17.152 28.013714 27.428571 20.004571 22.857143 98.852571 81.152 112.566857 95.414857 17.700571 16.566857 12.580571 55.442286-23.990857 59.428572 18.870857 35.437714 37.156571 38.838857 36.571429 96.585143 21.723429-11.446857 13.129143-36.571429 3.986285-52.553143-6.290286-11.446857-14.299429-16.566857-12.580571-19.419429 1.133714-1.718857 12.580571-11.446857 18.870857-3.986285 19.419429 21.723429 55.990857 25.709714 94.866286 20.553142 39.424-4.571429 81.700571-18.285714 101.156571-49.700571 9.142857-14.848 15.433143-20.004571 19.419429-17.152 4.571429 2.304 6.290286 12.580571 5.705143 29.696-0.585143 18.285714-8.009143 37.156571-13.129143 52.553143-5.156571 17.700571-6.838857 29.696 10.276571 30.281143 4.571429-32 13.714286-63.414857 16.018286-95.414857 2.852571-36.571429-23.442286-104.009143 5.156571-137.728 7.424-9.142857 16.566857-10.276571 29.147429-10.276572 1.718857-45.714286 72.009143-42.276571 95.414857-23.442286zM412.562286 219.428571c2.304-14.299429-4.571429-24.576-8.009143-25.709714-6.838857-1.718857-5.705143 8.557714-2.304 7.424 2.304 0 5.156571 3.437714 3.986286 8.557714-1.133714 6.838857-0.585143 11.446857 4.571428 11.446858 0.585143 0 1.718857 0 1.718857-1.718858z m239.433143 112.566858c-2.304-10.861714-10.276571-6.838857-19.419429-12.580572-10.861714-6.838857-13.129143-18.285714-17.152-14.299428-11.995429 13.129143 14.848 40.557714 26.294857 42.861714 6.838857 1.133714 11.995429-8.009143 10.276572-16.018286zM550.290286 210.285714c0.585143-13.714286-11.446857-20.553143-14.299429-20.004571-7.424 0.585143-5.156571 3.986286-1.718857 5.156571 4.571429 1.133714 9.142857 9.142857 10.276571 17.700572 0 1.133714 5.705143-1.133714 5.705143-2.852572z m30.866285-133.156571c0.585143-2.852571-6.838857-6.290286-11.995428-10.276572-4.571429-4.571429-9.142857-8.557714-13.714286-8.557714-11.446857 1.133714-5.705143 13.129143-7.424 18.870857-2.304 6.290286-10.861714 11.446857-5.156571 16.018286 5.156571 3.986286 8.557714-6.290286 19.419428-10.276571 2.852571-1.133714 16.018286 0.585143 18.870857-5.705143z m322.852572 766.317714c70.290286 43.446857-26.294857 79.433143-67.986286 100.571429-32.585143 16.566857-75.995429 53.138286-92.013714 68.571428-11.995429 11.446857-61.696 17.152-89.709714 2.852572-32.585143-16.566857-15.433143-42.861714-65.718858-44.580572-25.161143-0.585143-49.700571-0.585143-74.276571-0.585143-21.723429 0.585143-43.446857 1.718857-65.718857 2.304-75.446857 1.718857-82.870857 50.285714-131.437714 48.566858-33.133714-1.133714-74.861714-27.428571-146.870858-42.276572-50.285714-10.276571-98.852571-13.129143-109.129142-35.437714s12.580571-47.433143 14.299428-69.156572c1.718857-29.147429-21.723429-68.571429-4.571428-83.419428 14.848-13.129143 46.299429-3.437714 66.852571-14.848 21.723429-12.580571 30.866286-22.272 30.866286-49.152 8.009143 27.428571-0.585143 49.700571-18.285715 60.562286-10.861714 6.838857-30.866286 10.276571-47.433142 8.557714-13.129143-1.133714-21.138286 0.585143-24.576 5.705143-5.156571 6.290286-3.437714 17.700571 2.852571 32.585143s13.714286 24.576 12.580571 42.861714c-0.585143 18.285714-21.138286 40.009143-17.700571 55.442286 1.133714 5.705143 6.838857 10.861714 21.138286 14.848 22.857143 6.290286 64.585143 12.580571 105.142857 22.272 45.129143 11.446857 92.013714 32 121.161143 28.013714 86.857143-11.995429 37.156571-105.142857 23.442285-127.414857-73.728-115.419429-122.294857-190.866286-161.133714-161.133715-9.728 8.009143-10.276571-19.419429-9.728-30.281142 1.718857-37.705143 20.553143-51.419429 32-80.566858 21.723429-55.442286 38.290286-118.857143 71.424-151.442285 24.576-32 63.414857-84.004571 70.838857-111.433143-6.290286-59.428571-8.009143-122.294857-9.142857-177.152-1.133714-58.843429 8.009143-110.299429 74.276572-146.285714C431.469714 3.437714 452.608 0 474.88 0c39.424-0.585143 83.419429 10.861714 111.433143 31.414857 44.580571 33.133714 72.557714 103.424 69.156571 153.709714-2.304 39.424 4.571429 80.018286 17.152 122.294858 14.848 49.700571 38.290286 84.553143 75.995429 124.562285 45.129143 48.018286 80.566857 142.299429 90.843428 202.276572 9.142857 55.990857-3.437714 90.843429-15.433142 92.562285-18.285714 2.852571-29.696 60.562286-86.857143 58.294858-36.571429-1.718857-40.009143-23.442286-50.285715-42.276572-16.566857-29.147429-33.133714-20.004571-39.424 10.861714-3.437714 15.433143-1.133714 38.290286 3.986286 55.442286 10.276571 35.986286 6.838857 69.705143 0.585143 111.433143-11.995429 78.848 55.442286 93.696 100.571429 55.990857 44.580571-37.156571 54.272-42.861714 110.299428-62.281143 85.138286-29.147429 56.576-54.857143 10.861714-70.290285-41.142857-13.714286-42.861714-82.870857-28.013714-96 3.437714 74.276571 42.276571 85.138286 58.294857 95.414857z"
|
305
|
-
fill="" p-id="2666"></path>
|
311
|
+
fill="#FFFFFF" p-id="2666"></path>
|
306
312
|
</svg>
|
307
313
|
{% elif plugin.server.platform == 'w' %}
|
308
|
-
<
|
309
|
-
p-id="3630" width="13" height="13">
|
310
|
-
<path
|
311
|
-
d="M456 484V160.1l-335.9 72V484H456zM512 484h391.8V64.2l-391.8 84V484zM456 540H120.2v251.9l335.9 72V540zM512 540v335.9l391.8 84V540H512z"
|
312
|
-
fill="#00adef" p-id="3631"></path>
|
313
|
-
</svg>
|
314
|
+
<image xlink:href="w.svg" width="13" height="13" />
|
314
315
|
{% else %}
|
315
|
-
<
|
316
|
-
p-id="5446" width="13" height="13">
|
317
|
-
<path
|
318
|
-
d="M185.952 688l23.872-33.824c85.536 43.232 186.816 67.808 333.184 62.272 0.992-42.304 5.696-82.72 14.496-118.848H396.736c3.776-172.288 67.168-325.024 138.592-441.28H51.264l0.192 740.32h512.64a658.112 658.112 0 0 1-20.832-138.048c-132.8 5.664-269.856-18.304-357.312-70.592z m86.752-422.016h46.848V375.52h-46.848V265.984z"
|
319
|
-
fill="#4F8FCC" p-id="5447"></path>
|
320
|
-
<path
|
321
|
-
d="M959.04 156.352H584.8c-65.472 100.576-129.984 236-144.32 398.976h169.44c-13.792 50.304-24.448 102.176-24.96 157.952 95.072-11.68 145.408-23.872 215.904-59.456l23.84 33.824c-61.312 36.672-148.224 59.2-239.744 67.584 1.408 46.944 8.448 93.984 22.08 141.472h352V156.352zM707.808 375.456h-46.88V265.92h46.88v109.536z"
|
322
|
-
fill="#BABEE0" p-id="5448"></path>
|
323
|
-
<path
|
324
|
-
d="M319.584 375.52h-46.88V265.984h46.848V375.52zM209.792 654.176L185.952 688c87.456 52.288 224.544 76.256 357.312 70.624a618.4 618.4 0 0 1-0.256-42.144c-146.368 5.536-247.68-19.072-333.216-62.304zM707.808 265.92v109.536h-46.88V265.92h46.88zM584.96 755.232c91.52-8.416 178.432-30.944 239.744-67.584l-23.84-33.824C730.368 689.408 680.032 701.6 584.96 713.28c0.544-55.744 11.2-107.616 24.96-157.952H440.48c14.336-163.008 78.848-298.432 144.32-398.976a1182.144 1182.144 0 0 1 73.76-101.024l-31.616-26.4a1066.656 1066.656 0 0 0-91.68 127.424C463.84 272.576 400.48 425.344 396.672 597.632H557.44c-8.8 36.128-13.504 76.544-14.496 118.848-0.32 13.92-0.352 27.872 0.256 42.144 1.92 45.056 8.704 91.68 20.832 138.048a604.48 604.48 0 0 0 46.624 124.256l38.016-18.304a602.912 602.912 0 0 1-41.632-105.952 571.936 571.936 0 0 1-22.08-141.44z"
|
325
|
-
fill="#224477" p-id="5449"></path>
|
326
|
-
</svg>
|
316
|
+
<image xlink:href="m.svg" width="13" height="13" />
|
327
317
|
{% endif %}
|
328
318
|
<div class="package_name"> {{ plugin.server.player_count }}/{{ plugin.server.max_players }} </div>
|
329
|
-
|
319
|
+
{% if plugin.server.vac_enabled %}
|
320
|
+
<img class="vac-icon" src="vac_white.png" alt="VAC Enabled">
|
321
|
+
{% else %}
|
322
|
+
{% endif %}
|
330
323
|
</div>
|
331
324
|
</div>
|
332
325
|
</div>
|
@@ -343,8 +336,6 @@
|
|
343
336
|
<span class="loaded-text"><b>©爱丽数码</b></span>
|
344
337
|
</div>
|
345
338
|
</div>
|
346
|
-
|
347
|
-
|
348
339
|
</body>
|
349
340
|
|
350
341
|
</html>
|
Binary file
|