From 93e1a0ff777cd1640d3e9afaf5dfe32cd89c6ccc Mon Sep 17 00:00:00 2001 From: snowy Date: Fri, 26 Apr 2024 15:11:31 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=85=A8=E6=96=B0=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=8C=85=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{vanilla_resource => vanilla_language}/lang/de.lang | 0 .../{vanilla_resource => vanilla_language}/lang/en.lang | 0 .../{vanilla_resource => vanilla_language}/lang/es.lang | 0 .../{vanilla_resource => vanilla_language}/lang/fr.lang | 0 .../{vanilla_resource => vanilla_language}/lang/ja.lang | 0 .../{vanilla_resource => vanilla_language}/lang/ko.lang | 0 .../{vanilla_resource => vanilla_language}/lang/ru.lang | 0 .../lang/zh-CN.lang | 0 .../lang/zh-HK.lang | 0 .../lang/zh-Kawaii.lang | 0 .../lang/zh-MS.lang | 0 .../lang/zh-SG.lang | 0 .../lang/zh-WY.lang | 0 liteyuki/resources/vanilla_language/metadata.yml | 3 +++ liteyuki/resources/vanilla_resource/metadata.yml | 2 +- liteyuki/utils/__init__.py | 2 +- liteyuki/utils/base/resource.py | 8 +++++--- 17 files changed, 10 insertions(+), 5 deletions(-) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/de.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/en.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/es.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/fr.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/ja.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/ko.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/ru.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/zh-CN.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/zh-HK.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/zh-Kawaii.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/zh-MS.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/zh-SG.lang (100%) rename liteyuki/resources/{vanilla_resource => vanilla_language}/lang/zh-WY.lang (100%) create mode 100644 liteyuki/resources/vanilla_language/metadata.yml diff --git a/liteyuki/resources/vanilla_resource/lang/de.lang b/liteyuki/resources/vanilla_language/lang/de.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/de.lang rename to liteyuki/resources/vanilla_language/lang/de.lang diff --git a/liteyuki/resources/vanilla_resource/lang/en.lang b/liteyuki/resources/vanilla_language/lang/en.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/en.lang rename to liteyuki/resources/vanilla_language/lang/en.lang diff --git a/liteyuki/resources/vanilla_resource/lang/es.lang b/liteyuki/resources/vanilla_language/lang/es.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/es.lang rename to liteyuki/resources/vanilla_language/lang/es.lang diff --git a/liteyuki/resources/vanilla_resource/lang/fr.lang b/liteyuki/resources/vanilla_language/lang/fr.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/fr.lang rename to liteyuki/resources/vanilla_language/lang/fr.lang diff --git a/liteyuki/resources/vanilla_resource/lang/ja.lang b/liteyuki/resources/vanilla_language/lang/ja.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/ja.lang rename to liteyuki/resources/vanilla_language/lang/ja.lang diff --git a/liteyuki/resources/vanilla_resource/lang/ko.lang b/liteyuki/resources/vanilla_language/lang/ko.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/ko.lang rename to liteyuki/resources/vanilla_language/lang/ko.lang diff --git a/liteyuki/resources/vanilla_resource/lang/ru.lang b/liteyuki/resources/vanilla_language/lang/ru.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/ru.lang rename to liteyuki/resources/vanilla_language/lang/ru.lang diff --git a/liteyuki/resources/vanilla_resource/lang/zh-CN.lang b/liteyuki/resources/vanilla_language/lang/zh-CN.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/zh-CN.lang rename to liteyuki/resources/vanilla_language/lang/zh-CN.lang diff --git a/liteyuki/resources/vanilla_resource/lang/zh-HK.lang b/liteyuki/resources/vanilla_language/lang/zh-HK.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/zh-HK.lang rename to liteyuki/resources/vanilla_language/lang/zh-HK.lang diff --git a/liteyuki/resources/vanilla_resource/lang/zh-Kawaii.lang b/liteyuki/resources/vanilla_language/lang/zh-Kawaii.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/zh-Kawaii.lang rename to liteyuki/resources/vanilla_language/lang/zh-Kawaii.lang diff --git a/liteyuki/resources/vanilla_resource/lang/zh-MS.lang b/liteyuki/resources/vanilla_language/lang/zh-MS.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/zh-MS.lang rename to liteyuki/resources/vanilla_language/lang/zh-MS.lang diff --git a/liteyuki/resources/vanilla_resource/lang/zh-SG.lang b/liteyuki/resources/vanilla_language/lang/zh-SG.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/zh-SG.lang rename to liteyuki/resources/vanilla_language/lang/zh-SG.lang diff --git a/liteyuki/resources/vanilla_resource/lang/zh-WY.lang b/liteyuki/resources/vanilla_language/lang/zh-WY.lang similarity index 100% rename from liteyuki/resources/vanilla_resource/lang/zh-WY.lang rename to liteyuki/resources/vanilla_language/lang/zh-WY.lang diff --git a/liteyuki/resources/vanilla_language/metadata.yml b/liteyuki/resources/vanilla_language/metadata.yml new file mode 100644 index 0000000..29895a8 --- /dev/null +++ b/liteyuki/resources/vanilla_language/metadata.yml @@ -0,0 +1,3 @@ +name: 轻雪语言资源包 +description: 全局的语言资源包,不可卸载 +version: 1.0.0 \ No newline at end of file diff --git a/liteyuki/resources/vanilla_resource/metadata.yml b/liteyuki/resources/vanilla_resource/metadata.yml index 214632c..4314779 100644 --- a/liteyuki/resources/vanilla_resource/metadata.yml +++ b/liteyuki/resources/vanilla_resource/metadata.yml @@ -1,3 +1,3 @@ -name: 轻雪资源包 +name: 轻雪原版资源包 description: 轻雪内置资源包,不可卸载 version: 1.0.0 \ No newline at end of file diff --git a/liteyuki/utils/__init__.py b/liteyuki/utils/__init__.py index 13d7f18..5429b88 100644 --- a/liteyuki/utils/__init__.py +++ b/liteyuki/utils/__init__.py @@ -7,7 +7,7 @@ import time import nonebot __NAME__ = "LiteyukiBot" -__VERSION__ = "6.2.8" # 60201 +__VERSION__ = "6.3.0" # 60201 import requests diff --git a/liteyuki/utils/base/resource.py b/liteyuki/utils/base/resource.py index bfec758..bd3e977 100644 --- a/liteyuki/utils/base/resource.py +++ b/liteyuki/utils/base/resource.py @@ -112,10 +112,12 @@ def load_resources(): shutil.rmtree(temp_resource_root) os.makedirs(temp_resource_root, exist_ok=True) - standard_resource_path = "liteyuki/resources" - load_resource_from_dir(standard_resource_path) - # 加载其他资源包 + # 加载内置资源 + standard_resources_path = "liteyuki/resources" + for resource_dir in os.listdir(standard_resources_path): + load_resource_from_dir(os.path.join(standard_resources_path, resource_dir)) + # 加载其他资源包 if not os.path.exists("resources"): os.makedirs("resources", exist_ok=True)