remove some raw Version import
This commit is contained in:
parent
58796cd79c
commit
c656da613f
@ -12,9 +12,7 @@ import importlib.util
|
||||
from pathlib import Path
|
||||
from typing import Optional, List, Tuple
|
||||
|
||||
from Difficult_Rocket.api.types import Options
|
||||
|
||||
from libs.MCDR.version import Version
|
||||
from Difficult_Rocket.api.types import Options, Version
|
||||
|
||||
game_version = Version("0.8.0.0") # 游戏版本
|
||||
build_version = Version("1.2.1.0") # 编译文件版本(与游戏本体无关)
|
||||
|
@ -23,10 +23,7 @@ else:
|
||||
Game = TypeVar("Game")
|
||||
ClientWindow = TypeVar("ClientWindow")
|
||||
from Difficult_Rocket import DR_runtime
|
||||
from Difficult_Rocket.utils.options import Options
|
||||
|
||||
# from libs
|
||||
from libs.MCDR.version import Version
|
||||
from Difficult_Rocket.api.types import Options, Version
|
||||
|
||||
RequireVersion = Tuple[Version, Version]
|
||||
# 第一个是最低兼容版本,第二个是最高兼容版本
|
||||
|
@ -4,8 +4,38 @@
|
||||
# All rights reserved
|
||||
# -------------------------------
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import List, Dict, Optional
|
||||
|
||||
from Difficult_Rocket.api.screen import BaseScreen
|
||||
from Difficult_Rocket import DR_option, DR_runtime
|
||||
from Difficult_Rocket.api.types import Options, Version
|
||||
from Difficult_Rocket.mod.api import ModInfo
|
||||
# from Difficult_Rocket import DR_option, DR_runtime
|
||||
|
||||
|
||||
class ModManager(Options):
|
||||
name = 'Mod Manager'
|
||||
logger: logging.Logger
|
||||
|
||||
mods_path: List[Path] = [Path('./mods')]
|
||||
loaded_mod_modules: Dict[str, ModInfo] = {}
|
||||
|
||||
def find_mods(self) -> List[Path]:
|
||||
"""
|
||||
查找mods文件夹下的所有mod
|
||||
:return:
|
||||
"""
|
||||
mods = []
|
||||
for path in self.mods_path:
|
||||
if not path.exists():
|
||||
path.mkdir(parents=True)
|
||||
continue
|
||||
for mod in path.iterdir():
|
||||
...
|
||||
|
||||
def init(self) -> None:
|
||||
self.logger = logging.getLogger('client')
|
||||
self.logger.name = 'mod_manager'
|
||||
self.logger.info('Mod Manager init')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user