nonebot-plugin-l4d2-server 1.1.1__py3-none-any.whl → 1.1.2__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.
Files changed (58) hide show
  1. nonebot_plugin_l4d2_server/config.py +82 -45
  2. nonebot_plugin_l4d2_server/l4_help/__init__.py +1 -1
  3. nonebot_plugin_l4d2_server/l4_image/convert.py +0 -69
  4. nonebot_plugin_l4d2_server/l4_image/html_img.py +35 -17
  5. nonebot_plugin_l4d2_server/l4_image/image_tools.py +1 -104
  6. nonebot_plugin_l4d2_server/l4_image/img/back_img/background.jpg +0 -0
  7. nonebot_plugin_l4d2_server/l4_image/img/template/normal.html +75 -167
  8. nonebot_plugin_l4d2_server/l4_image/img/template/style.css +264 -0
  9. nonebot_plugin_l4d2_server/l4_request/draw_msg.py +1 -18
  10. {nonebot_plugin_l4d2_server-1.1.1.dist-info → nonebot_plugin_l4d2_server-1.1.2.dist-info}/METADATA +2 -3
  11. nonebot_plugin_l4d2_server-1.1.2.dist-info/RECORD +57 -0
  12. nonebot_plugin_l4d2_server/l4_help/icon//344/273/213/347/273/215.png +0 -0
  13. nonebot_plugin_l4d2_server/l4_help/icon//344/273/273/345/212/241.png +0 -0
  14. nonebot_plugin_l4d2_server/l4_help/icon//344/277/241/346/201/257.png +0 -0
  15. nonebot_plugin_l4d2_server/l4_help/icon//345/205/254/345/221/212.png +0 -0
  16. nonebot_plugin_l4d2_server/l4_help/icon//345/210/200/345/211/221.png +0 -0
  17. nonebot_plugin_l4d2_server/l4_help/icon//345/210/207/346/215/242.png +0 -0
  18. nonebot_plugin_l4d2_server/l4_help/icon//345/210/240/351/231/244.png +0 -0
  19. nonebot_plugin_l4d2_server/l4_help/icon//345/210/267/346/226/260.png +0 -0
  20. nonebot_plugin_l4d2_server/l4_help/icon//345/215/241/347/273/204.png +0 -0
  21. nonebot_plugin_l4d2_server/l4_help/icon//345/223/252/351/207/214.png +0 -0
  22. nonebot_plugin_l4d2_server/l4_help/icon//345/234/260/345/233/276.png +0 -0
  23. nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/205/245.png +0 -0
  24. nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/207/272.png +0 -0
  25. nonebot_plugin_l4d2_server/l4_help/icon//345/275/261.png +0 -0
  26. nonebot_plugin_l4d2_server/l4_help/icon//346/213/274/345/233/276.png +0 -0
  27. nonebot_plugin_l4d2_server/l4_help/icon//346/216/242/347/264/242.png +0 -0
  28. nonebot_plugin_l4d2_server/l4_help/icon//346/216/250/351/200/201.png +0 -0
  29. nonebot_plugin_l4d2_server/l4_help/icon//346/224/266/351/233/206.png +0 -0
  30. nonebot_plugin_l4d2_server/l4_help/icon//346/224/273/347/225/245.png +0 -0
  31. nonebot_plugin_l4d2_server/l4_help/icon//346/233/264/346/226/260.png +0 -0
  32. nonebot_plugin_l4d2_server/l4_help/icon//346/235/220/346/226/231.png +0 -0
  33. nonebot_plugin_l4d2_server/l4_help/icon//346/237/245/350/257/242.png +0 -0
  34. nonebot_plugin_l4d2_server/l4_help/icon//346/240/241/351/252/214.png +0 -0
  35. nonebot_plugin_l4d2_server/l4_help/icon//346/257/217/346/234/210.png +0 -0
  36. nonebot_plugin_l4d2_server/l4_help/icon//346/267/261/346/270/212.png +0 -0
  37. nonebot_plugin_l4d2_server/l4_help/icon//346/267/273/345/212/240.png +0 -0
  38. nonebot_plugin_l4d2_server/l4_help/icon//346/270/205/351/231/244.png +0 -0
  39. nonebot_plugin_l4d2_server/l4_help/icon//347/212/266/346/200/201.png +0 -0
  40. nonebot_plugin_l4d2_server/l4_help/icon//347/255/276/345/210/260.png +0 -0
  41. nonebot_plugin_l4d2_server/l4_help/icon//347/273/221/345/256/232.png +0 -0
  42. nonebot_plugin_l4d2_server/l4_help/icon//350/241/250.png +0 -0
  43. nonebot_plugin_l4d2_server/l4_help/icon//350/241/250/346/203/205.png +0 -0
  44. nonebot_plugin_l4d2_server/l4_help/icon//350/247/222/350/211/262.png +0 -0
  45. nonebot_plugin_l4d2_server/l4_help/icon//350/256/260/345/275/225.png +0 -0
  46. nonebot_plugin_l4d2_server/l4_help/icon//351/205/215/347/275/256.png +0 -0
  47. nonebot_plugin_l4d2_server/l4_help/icon//351/207/215/345/220/257.png +0 -0
  48. nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.html +0 -299
  49. nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.png +0 -0
  50. nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.html +0 -341
  51. nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.png +0 -0
  52. nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.html +0 -355
  53. nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.png +0 -0
  54. nonebot_plugin_l4d2_server/l4_image/img/template/fingerprint.svg +0 -15
  55. nonebot_plugin_l4d2_server-1.1.1.dist-info/RECORD +0 -98
  56. {nonebot_plugin_l4d2_server-1.1.1.dist-info → nonebot_plugin_l4d2_server-1.1.2.dist-info}/WHEEL +0 -0
  57. {nonebot_plugin_l4d2_server-1.1.1.dist-info → nonebot_plugin_l4d2_server-1.1.2.dist-info}/entry_points.txt +0 -0
  58. {nonebot_plugin_l4d2_server-1.1.1.dist-info → nonebot_plugin_l4d2_server-1.1.2.dist-info}/licenses/LICENSE +0 -0
@@ -1,299 +0,0 @@
1
- <html>
2
-
3
- <head>
4
- <style>
5
- body {
6
- background-image: url("Bocchi_The_Rock.png");
7
- background-repeat: repeat;
8
- background-size: cover;
9
- margin: 0px;
10
- zoom: 150%;
11
- }
12
-
13
- /*页眉页脚文字颜色*/
14
- .loaded-text {
15
- color: #ffffff;
16
- /* 设置 .loaded-text 类的文字颜色 */
17
- font-family: "Tutumianhuatang", sans-serif;
18
- /* 设置第一个字体 */
19
- }
20
-
21
- /*这个选择器 > svg > image 会只选择 ..loaded-text 下直接子元素的 SVG 图像*/
22
- .loaded-text>svg>image {
23
- filter: drop-shadow(#fff 100px 0);
24
- /* 将阴影颜色改为白色 */
25
- transform: translateX(-100px);
26
- }
27
-
28
- /* Vac图标样式 */
29
- .vac-icon {
30
- width: 13px;
31
- height: auto;
32
- margin-left: 190px;
33
- }
34
-
35
- .image {
36
- display: flex;
37
- flex-direction: column;
38
- overflow: scroll;
39
- width: max-content;
40
- padding: 20px;
41
- }
42
-
43
- /*服务器序号及服务器名称颜色*/
44
- .plugin_name,
45
- .plugin_description {
46
- color: #ffffff;
47
- /* 将特定类的文字颜色改为你想要的颜色 */
48
- font-weight: bold;
49
- /* 将文字加粗 */
50
- font-family: "Tutumianhuatang", sans-serif;
51
- /* 设置第一个字体 */
52
- }
53
-
54
- .head {
55
- display: flex;
56
- flex-direction: row;
57
- align-items: center;
58
- justify-content: space-between;
59
- background-color: #f5f6f75e;
60
- padding-left: 20px;
61
- padding-right: 20px;
62
- padding-top: 10px;
63
- padding-bottom: 10px;
64
- border: 2px solid;
65
- border-radius: 50px;
66
- border-color: #e5e7eb;
67
- font-size: 16px;
68
- margin-bottom: 20px;
69
- font-family: "Tutumianhuatang", sans-serif;
70
- /* 设置第一个字体 */
71
- }
72
-
73
- .plugins {
74
- display: grid;
75
- grid-template-columns: auto auto auto;
76
- row-gap: 20px;
77
- column-gap: 20px;
78
- margin-bottom: 20px;
79
- }
80
-
81
- /*每个服务器卡片样式*/
82
- .plugin {
83
- display: flex;
84
- padding: 5px;
85
- border: 1px solid;
86
- border-radius: 5px;
87
- border-color: #e5e7eb;
88
- box-shadow: 0px 2px 6px 2px rgba(0, 0, 0, 0.2);
89
- background-color: #ffffff3d;
90
- }
91
-
92
- .plugin_meta {
93
- display: flex;
94
- flex-direction: column;
95
- padding: 5px;
96
- width: 250px;
97
- justify-content: space-between;
98
- }
99
-
100
- .plugin_name {
101
- font-size: 20px;
102
- font-family: "Tutumianhuatang", sans-serif;
103
- /* 设置第一个字体 */
104
- }
105
-
106
- .plugin_description {
107
- font-size: 15px;
108
- color: #efefef;
109
- margin-top: 5px;
110
- margin-bottom: 5px;
111
- font-family: "Tutumianhuatang", sans-serif;
112
- /* 设置第一个字体 */
113
- }
114
-
115
- .plugin_meta_line1 {
116
- display: flex;
117
- flex-direction: row;
118
- align-items: center;
119
- justify-content: space-between;
120
- }
121
-
122
- .plugin_meta_line2 {
123
- font-family: "Tutumianhuatang", sans-serif;
124
- /* 设置第一个字体 */
125
- }
126
-
127
- .plugin_meta_line3 {
128
- display: flex;
129
- flex-direction: row;
130
- align-items: center;
131
- color: #efefef;
132
- font-family: "Tutumianhuatang", sans-serif;
133
- /* 设置第一个字体 */
134
- }
135
-
136
- /*这个选择器 > svg > image 会只选择 .plugin_meta_line3 下直接子元素的 SVG 图像*/
137
- .plugin_meta_line3>svg>image {
138
- filter: drop-shadow(#fff 100px 0);
139
- /* 将阴影颜色改为白色 */
140
- transform: translateX(-100px);
141
- }
142
-
143
- .package_name_label {
144
- background-image: url(./fingerprint.svg);
145
- width: 13px;
146
- height: 13px;
147
- color: #efefef;
148
- margin-right: 8px;
149
- }
150
-
151
- .package_name {
152
- font-size: 13px;
153
- color: #efefef;
154
- }
155
-
156
- .switch {
157
- position: relative;
158
- display: inline-block;
159
- width: 40px;
160
- height: 24px;
161
- }
162
-
163
- .slider.round {
164
- border-radius: 24px;
165
- }
166
-
167
- .status_text {
168
- position: absolute;
169
- top: 50%;
170
- left: 50%;
171
- transform: translate(-50%, -50%);
172
- white-space: nowrap;
173
- /* 防止换行 */
174
- padding: 2px 6px;
175
- /* 添加一些内边距以增加可读性 */
176
- border-radius: 16px;
177
- /* 圆角 */
178
- font-family: "Tutumianhuatan", sans-serif;
179
- /* 设置第一个字体 */
180
- }
181
-
182
- .error {
183
- background-color: #999;
184
- /* 灰色背景 */
185
- color: white;
186
- /* 白色文字 */
187
-
188
- }
189
-
190
- .lack {
191
- background-color: #4CAF50;
192
- /* 绿色背景 */
193
- color: white;
194
- /* 白色文字 */
195
- }
196
-
197
- .full {
198
- background-color: #f44336;
199
- /* 红色背景 */
200
- color: white;
201
- /* 白色文字 */
202
- }
203
-
204
- .not_full {
205
- background-color: #2196F3;
206
- /* 蓝色背景 */
207
- color: white;
208
- /* 白色文字 */
209
- }
210
- </style>
211
- </head>
212
-
213
- <body>
214
- <div class="image">
215
- <div class="head">
216
- <span class="loaded-text"><b>已加载服务器</b></span>
217
- <span class="loaded-text">发送 “<b>查询指令+序号</b>” 查看详情</span>
218
- </div>
219
- <div class="plugins">
220
- {% for plugin in plugins %}
221
- <div class="plugin">
222
- <div class="plugin_meta">
223
- <div class="plugin_meta_line1">
224
- <div class="plugin_name">{{ plugin.command }}{{ plugin.id_ }}:{{ plugin.server.server_name }}</div>
225
- <div class="plugin_status">
226
- <label class="switch">
227
- <input class="checkbox" type="checkbox" {% if plugin.enabled %} checked {% endif %} />
228
- <span
229
- class="slider round {% if plugin.server.player_count >= plugin.server.max_players %} locked {% endif %}">
230
- <span
231
- class="lock {% if plugin.server.player_count >= plugin.server.max_players %} locked {% endif %}"></span>
232
- <span
233
- class="status_text {% if plugin.server.max_players == 0 %}error{% elif plugin.server.player_count / plugin.server.max_players < 0.5 %}lack{% elif plugin.server.player_count >= plugin.server.max_players %}full{% else %}not_full{% endif %}">
234
- {% if plugin.server.max_players == 0 %}
235
- 错误
236
- {% elif plugin.server.player_count / plugin.server.max_players < 0.5 %} 缺人 {% elif
237
- plugin.server.player_count>= plugin.server.max_players
238
- %}
239
- 已满
240
- {% else %}
241
- 未满
242
- {% endif %}
243
- </span>
244
- </span>
245
- </label>
246
- </div>
247
- </div>
248
- <div class="plugin_meta_line2">
249
- <font color="#113DEE">地图:{{ plugin.server.map_name }}</font><br>
250
- {% set player_count = plugin.player|length %}
251
- {% for i in range(max_count) %}
252
- {% set player = plugin.player[i] if i < player_count else None %} {% if player and player.name %} <font
253
- color="#ffffff">• {{ player.score }} | {{ player.name }}</font><br>
254
- {% else %}
255
- <!-- 如果玩家不存在或没有名字,则显示空行或占位符 -->
256
- <br>
257
- {% endif %}
258
- {% endfor %}
259
- </div>
260
- <div class="plugin_meta_line3">
261
- {% if plugin.server.platform == 'l' %}
262
- <image xlink:href="l.svg" width="13" height="13" fill="#FFFFFF" />
263
- </svg>
264
- {% elif plugin.server.platform == 'w' %}
265
- <image xlink:href="w.svg" width="13" height="13" fill="#00adef" />
266
- {% else %}
267
- <image xlink:href="m.svg" width="13" height="13" />
268
- {% endif %}
269
- <div class="package_name">&nbsp{{ plugin.server.player_count }}/{{ plugin.server.max_players }} </div>
270
- {% if plugin.server.vac_enabled %}
271
- <img class="vac-icon" src="vac.png" alt="VAC Enabled">
272
- {% else %}
273
- {% endif %}
274
- </div>
275
- </div>
276
- </div>
277
- {% endfor %}
278
- </div>
279
- <div class="head">
280
- <span class="loaded-text">
281
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"
282
- style="vertical-align: middle;">
283
- <image xlink:href="github.svg" width="20" height="20" />
284
- </svg>
285
- <b style="vertical-align: middle;">插件:Agnes4m</b>
286
- </span>
287
- <span class="loaded-text"><b>———— ©爱丽数码 ————</b></span>
288
- <span class="loaded-text">
289
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"
290
- style="vertical-align: middle;">
291
- <image xlink:href="bilibili.svg" width="20" height="20" fill="red" />
292
- </svg>
293
- <b style="vertical-align: middle;">插画:吃咖喱的poi</b>
294
- </span>
295
- </div>
296
- </div>
297
- </body>
298
-
299
- </html>