Files
emod-cli/debug_mod/DEBUG_ENV_SCRIPT/modMain.py
Blank038 94b1b9a1f5 refactor(debug-mod): 使用原生 System 替换 QuMod
删除未使用的大型 QuMod 加载框架,改为直接注册客户端和服务端 System,并显式管理按键监听、输出包装与双端销毁。

IPC 网络线程仅负责收包,所有 ModAPI 回调由游戏线程 Update 派发,同时补充断线重连、分帧读取和幂等关闭。
2026-07-21 20:52:10 +08:00

45 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
from mod.common.mod import Mod
import mod.client.extraClientApi as clientApi
import mod.server.extraServerApi as serverApi
from .Lifecycle import install_output_wrapper
MOD_NAME = "EmodCliDebug"
MOD_VERSION = "1.0.0"
SERVER_SYSTEM_NAME = "EmodCliDebugServer"
SERVER_SYSTEM_PATH = "DEBUG_ENV_SCRIPT.DebugServerSystem.DebugServerSystem"
CLIENT_SYSTEM_NAME = "EmodCliDebugClient"
CLIENT_SYSTEM_PATH = "DEBUG_ENV_SCRIPT.DebugClientSystem.DebugClientSystem"
install_output_wrapper()
@Mod.Binding(name=MOD_NAME, version=MOD_VERSION)
class EmodCliDebugMod(object):
@Mod.InitServer()
def server_init(self):
serverApi.RegisterSystem(
MOD_NAME,
SERVER_SYSTEM_NAME,
SERVER_SYSTEM_PATH,
)
@Mod.InitClient()
def client_init(self):
clientApi.RegisterSystem(
MOD_NAME,
CLIENT_SYSTEM_NAME,
CLIENT_SYSTEM_PATH,
)
@Mod.DestroyServer()
def server_destroy(self):
pass
@Mod.DestroyClient()
def client_destroy(self):
pass