DR -> DR SDK #16
@ -160,7 +160,7 @@ class _DR_runtime(Options):
|
|||||||
sys.path.append(self.mod_path)
|
sys.path.append(self.mod_path)
|
||||||
for mod_path in paths:
|
for mod_path in paths:
|
||||||
try:
|
try:
|
||||||
if mod_path.is_dir: # 处理文件夹 mod
|
if mod_path.is_dir() and mod_path.name != '__pycache__': # 处理文件夹 mod
|
||||||
if importlib.util.find_spec(mod_path.name) is not None:
|
if importlib.util.find_spec(mod_path.name) is not None:
|
||||||
module = importlib.import_module(mod_path.name)
|
module = importlib.import_module(mod_path.name)
|
||||||
mods.append(mod_path.name)
|
mods.append(mod_path.name)
|
||||||
@ -171,6 +171,7 @@ class _DR_runtime(Options):
|
|||||||
module = importlib.import_module(mod_path.name)
|
module = importlib.import_module(mod_path.name)
|
||||||
mods.append(mod_path.name)
|
mods.append(mod_path.name)
|
||||||
elif mod_path.suffix == '.py': # 处理单文件 mod
|
elif mod_path.suffix == '.py': # 处理单文件 mod
|
||||||
|
print(f'importing mod {mod_path=} {mod_path.stem}')
|
||||||
module = importlib.import_module(mod_path.stem)
|
module = importlib.import_module(mod_path.stem)
|
||||||
mods.append(mod_path.stem)
|
mods.append(mod_path.stem)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -7,8 +7,8 @@ fonts_folder = "libs/fonts"
|
|||||||
|
|
||||||
[window]
|
[window]
|
||||||
style = "None"
|
style = "None"
|
||||||
width = 1406
|
width = 958
|
||||||
height = 900
|
height = 587
|
||||||
visible = true
|
visible = true
|
||||||
gui_scale = 1
|
gui_scale = 1
|
||||||
caption = "Difficult Rocket v{DR_version}|DR_rs v{DR_Rust_get_version}"
|
caption = "Difficult Rocket v{DR_version}|DR_rs v{DR_Rust_get_version}"
|
||||||
@ -19,6 +19,5 @@ full_screen = false
|
|||||||
width = 1024
|
width = 1024
|
||||||
height = 768
|
height = 768
|
||||||
gui_scale = 1
|
gui_scale = 1
|
||||||
|
|
||||||
[game.mods]
|
[game.mods]
|
||||||
path = "mods"
|
path = "mods"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
from MCDR.version import Version
|
from MCDR.version import Version
|
||||||
from Difficult_Rocket.mod import ModInfo
|
from Difficult_Rocket.api.mod import ModInfo
|
||||||
|
|
||||||
INFO = ModInfo(
|
INFO = ModInfo(
|
||||||
mod_id="Difficult_Rocket_mod",
|
mod_id="Difficult_Rocket_mod",
|
||||||
|
Loading…
Reference in New Issue
Block a user