From 6a75e3d516d59094e135107a7ce1086916c7e02a Mon Sep 17 00:00:00 2001 From: shenjack-mac <3695888@qq.com> Date: Sat, 22 Apr 2023 21:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D=E3=80=81update=20logs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Difficult_Rocket/api/mod/__init__.py | 2 +- Difficult_Rocket/mod/__init__.py | 2 +- Difficult_Rocket/utils/translate.py | 2 +- docs/src/update_logs.md | 36 ++++++++++++++++++++++++++-- mods/dr_game/__init__.py | 4 ++-- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/Difficult_Rocket/api/mod/__init__.py b/Difficult_Rocket/api/mod/__init__.py index 0c7eb47..f0bb74d 100644 --- a/Difficult_Rocket/api/mod/__init__.py +++ b/Difficult_Rocket/api/mod/__init__.py @@ -26,7 +26,7 @@ ForceRequire = bool # TODO 完善中 -class MODInfo(Options): +class ModInfo(Options): """ 加载mod时候的参数 """ diff --git a/Difficult_Rocket/mod/__init__.py b/Difficult_Rocket/mod/__init__.py index 2df3a16..5333e93 100644 --- a/Difficult_Rocket/mod/__init__.py +++ b/Difficult_Rocket/mod/__init__.py @@ -11,7 +11,7 @@ from typing import Tuple, List from MCDR.version import Version # from DR -from Difficult_Rocket.api.mod import MODInfo +from Difficult_Rocket.api.mod import ModInfo from Difficult_Rocket import DR_runtime, Options """ diff --git a/Difficult_Rocket/utils/translate.py b/Difficult_Rocket/utils/translate.py index bd98a4c..63f5de1 100644 --- a/Difficult_Rocket/utils/translate.py +++ b/Difficult_Rocket/utils/translate.py @@ -122,7 +122,7 @@ class Translates: return self def __call__(self, *args, **kwargs) -> str: - return self.__str__() + return str(self) def copy(self): return self.__copy__() diff --git a/docs/src/update_logs.md b/docs/src/update_logs.md index 2a409dd..83c7ffb 100644 --- a/docs/src/update_logs.md +++ b/docs/src/update_logs.md @@ -22,6 +22,40 @@ - [![Readme-gitee](https://img.shields.io/badge/Readme-中文(点我!)-blue.svg?style=flat-square)](../../README.md) - Using [SemVer 2.0.0](https://semver.org/) to manage version +## 202305 DR `0.8.0.0` + DR_api `0.1.0.0` + +> 啊哈! mod 加载来啦! + +### Remove + +- `game.config` + - 已删除 + - Removed + + +### Changes + +- `main.toml` + - `game.mods.path` + - 存储 mod 的路径 + - Store the path of the mod +- `Difficult_Rocket.mod.MODInfo` -> `Difficult_Rocket.api.mod.ModInfo` + - 用于存储 mod 的信息 + - Used to store information about the mod +- `Difficult_Rocket.DR_runtime` + - 添加 `mod_path: str` 字段 + - 添加 `DR_Mod_List: List[Tuple[str, Version]]` 字段 + - 添加 `load_mods() -> None` 方法 + - 添加 `find_mods -> List[str]` 方法 + - Add `mod_path: str` field + - Add `DR_Mod_List: List[Tuple[str, Version]]` field + - Add `load_mods() -> None` method + - Add `find_mods -> List[str]` method + +### Mod Loader + +- `ModInfo` + ## 20230422 DR `0.7.2.2` + DR_rs `0.2.6.1` + DR_api `0.0.2.0` + 14 ### DR_rs V 0.2.6.1 @@ -556,8 +590,6 @@ long_version: 一个用于标记内部协议的整数 - 尝试加载 `icon` - 更新了主项目 -## 20220627 - ## 20220511 V 0.6.3 - 咕了好久的 update log 了 diff --git a/mods/dr_game/__init__.py b/mods/dr_game/__init__.py index 0779a16..f6a9679 100644 --- a/mods/dr_game/__init__.py +++ b/mods/dr_game/__init__.py @@ -5,9 +5,9 @@ # ------------------------------- from MCDR.version import Version -from Difficult_Rocket.mod import MODInfo +from Difficult_Rocket.mod import ModInfo -INFO = MODInfo( +INFO = ModInfo( mod_id="Difficult_Rocket_mod", name="Difficult_Rocket_mod", version=Version("0.7.2.0")