feat: 新的背景图

fix: 命令冲突
docs: 添加了命令头和nickname冲突的解释
This commit is contained in:
2024-04-06 04:23:01 +08:00
parent 468a534d85
commit bc856b4aa9
32 changed files with 213 additions and 11638 deletions

View File

@ -35,7 +35,8 @@ def load_resource_from_dir(path: str):
with open(os.path.join(path, "metadata.yml"), "r", encoding="utf-8") as f:
metadata = yaml.safe_load(f)
else:
metadata = ResourceMetadata()
# 没有metadata.yml文件不是一个资源包
return
metadata["path"] = path
if os.path.exists(os.path.join(path, "lang")):
from liteyuki.utils.language import load_from_dir
@ -64,4 +65,4 @@ def get_files(path: str, abs_path: bool = False) -> list[str]:
Returns: 文件绝对路径
"""
return [os.path.abspath(file) for file in _resource_data if file.startswith(path)] if abs_path else [
file for file in _resource_data if file.startswith(path)]
file for file in _resource_data if file.startswith(path)]