port: ServerStateChecker + module (batch 2 P2)

Verbatim 40250 CServerStateChecker and the ServerStateChecker Python
module replace the stub; PythonBoot owns the instance like
CPythonApplication::m_kServerStateChecker. The fake server gets a state
port that answers CG_STATE_CHECKER the way CInputHandshake and
CInputDB::RespondChannelStatus do; login_flow requests the channel list
after the character list (live: {1: 1, 2: 1}).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-24 00:27:35 +09:00
co-authored by Claude Opus 5.5
parent be5a68ff35
commit ce9f96398e
13 changed files with 362 additions and 32 deletions
@@ -5,7 +5,6 @@
#include "../EterLib/UIRenderCommands.h"
// GameplayModuleConstants.cpp: each module's 40250 constants.
void AddStubConstants_ServerStateChecker(PyObject* poModule);
void AddStubConstants_background(PyObject* poModule);
void AddStubConstants_event(PyObject* poModule);
void AddStubConstants_eventMgr(PyObject* poModule);
@@ -34,20 +33,6 @@ PyObject* stub_call_named(const char* name, PyObject* result = nullptr) {
return result ? result : Py_BuildValue("i", 0);
}
// 40250 UserInterface/ServerStateCheckerModule.cpp: ServerStateChecker export names.
PyObject* stub_ServerStateChecker_Create(PyObject*, PyObject*) { return stub_call_named("ServerStateChecker.Create", Py_BuildNone()); }
PyObject* stub_ServerStateChecker_Update(PyObject*, PyObject*) { return stub_call_named("ServerStateChecker.Update", Py_BuildNone()); }
PyObject* stub_ServerStateChecker_Request(PyObject*, PyObject*) { return stub_call_named("ServerStateChecker.Request", Py_BuildNone()); }
PyObject* stub_ServerStateChecker_AddChannel(PyObject*, PyObject*) { return stub_call_named("ServerStateChecker.AddChannel", Py_BuildNone()); }
PyObject* stub_ServerStateChecker_Initialize(PyObject*, PyObject*) { return stub_call_named("ServerStateChecker.Initialize", Py_BuildNone()); }
PyMethodDef methods_ServerStateChecker[] = {
{ "Create", stub_ServerStateChecker_Create, METH_VARARGS },
{ "Update", stub_ServerStateChecker_Update, METH_VARARGS },
{ "Request", stub_ServerStateChecker_Request, METH_VARARGS },
{ "AddChannel", stub_ServerStateChecker_AddChannel, METH_VARARGS },
{ "Initialize", stub_ServerStateChecker_Initialize, METH_VARARGS },
{ NULL, NULL }
};
// 40250 UserInterface/PythonBackgroundModule.cpp: background export names.
PyObject* stub_background_IsSoftwareTiling(PyObject*, PyObject*) { return stub_call_named("background.IsSoftwareTiling", Py_BuildValue("i", 0)); }
PyObject* stub_background_EnableSoftwareTiling(PyObject*, PyObject*) { return stub_call_named("background.EnableSoftwareTiling", Py_BuildNone()); }
@@ -892,11 +877,6 @@ PyMethodDef methods_udp[] = {
} // namespace
void init_2v0_gameplay_stubs() {
{
PyObject* module = Py_InitModule("ServerStateChecker", methods_ServerStateChecker);
PyModule_AddIntConstant(module, "__port_stub__", 1);
AddStubConstants_ServerStateChecker(module);
}
{
PyObject* module = Py_InitModule("background", methods_background);
PyModule_AddIntConstant(module, "__port_stub__", 1);