DR -> DR SDK #16

Merged
shenjackyuanjie merged 41 commits from feature/dr-sdk into main 2023-05-03 00:40:53 +08:00
3 changed files with 3 additions and 54 deletions
Showing only changes of commit 3a093d105e - Show all commits

View File

@ -5,5 +5,6 @@
], ],
"python.analysis.extraPaths": [ "python.analysis.extraPaths": [
"./libs" "./libs"
] ],
"python.analysis.typeCheckingMode": "basic"
} }

View File

@ -4,13 +4,6 @@
# All rights reserved # All rights reserved
# ------------------------------- # -------------------------------
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
gitee: @shenjackyuanjie
"""
# system function # system function
from typing import Tuple, List from typing import Tuple, List

View File

@ -4,13 +4,6 @@
# All rights reserved # All rights reserved
# ------------------------------- # -------------------------------
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
gitee: @shenjackyuanjie
"""
# system function # system function
from typing import Tuple, List from typing import Tuple, List
@ -18,6 +11,7 @@ from typing import Tuple, List
from MCDR.version import Version from MCDR.version import Version
# from DR # from DR
from Difficult_Rocket.api.mod import MODInfo
from Difficult_Rocket import DR_runtime, Options from Difficult_Rocket import DR_runtime, Options
""" """
@ -26,45 +20,6 @@ mod系统参数
MOD_loader_version = "0.1.0.0" # mod系统版本 版本号遵守 semver ++ MOD_loader_version = "0.1.0.0" # mod系统版本 版本号遵守 semver ++
semver_loader_version = Version(MOD_loader_version) semver_loader_version = Version(MOD_loader_version)
"""
加载mod时会更改的参数
这里的只是范例,实际加载时会根据mod配置修改
"""
RequireVersion = Tuple[Version, Version]
# 第一个是最低兼容版本,第二个是最高兼容版本
# 例如: ("1.0.0", "1.1.0") 表示从1.0.0版本开始兼容,到1.1.0版本结束兼容
ForceRequire = bool
# TODO 完善中
class MODInfo(Options):
"""
加载mod时候的参数
"""
"""基本信息"""
name: str # mod 名称
version: Version # mod 版本
"""作者、描述"""
writer: str # 作者
link: str = "" # 作者链接
description: str = "" # 描述 (务必简洁明了)
info: str = "" # 其他信息 (可以很多很多)
"""版本相关信息"""
DR_version: RequireVersion = (DR_runtime.DR_version, DR_runtime.DR_version) # DR SDK 兼容版本
DR_Api_version: RequireVersion = (DR_runtime.API_version, DR_runtime.API_version) # DR Api版本
Mod_Require_version: List[Tuple[str, ForceRequire, RequireVersion]] = [] # mod 依赖版本
"""mod 状态"""
is_enable: bool = True # 是否启用
is_loaded: bool = False # 是否加载
"""mod 配置"""
config: Options = Options() # mod 配置存储
""" """
一些重置用函数 一些重置用函数
""" """