cheatengine 5.8.24 → 5.8.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ce_mcp_bridge.lua +16 -2
- package/package.json +1 -1
- package/src/pipe-client.js +12 -3
package/ce_mcp_bridge.lua
CHANGED
|
@@ -7621,8 +7621,22 @@ function Pipe.workerLoop()
|
|
|
7621
7621
|
end
|
|
7622
7622
|
end)
|
|
7623
7623
|
Context.lastActivityTime = 0 -- Heartbeat: reset on disconnect
|
|
7624
|
-
Utils.debugPrint("Client disconnected,
|
|
7625
|
-
|
|
7624
|
+
Utils.debugPrint("Client disconnected, recreating pipe for next connection...")
|
|
7625
|
+
|
|
7626
|
+
-- Recreate pipe instance for next client (Windows named pipes are single-client)
|
|
7627
|
+
pcall(function()
|
|
7628
|
+
if Context.pipeServer then
|
|
7629
|
+
Context.pipeServer.destroy()
|
|
7630
|
+
end
|
|
7631
|
+
end)
|
|
7632
|
+
Context.pipeServer = createPipe(Config.PIPE_NAME, Config.PIPE_BUFFER_SIZE, Config.PIPE_BUFFER_SIZE)
|
|
7633
|
+
|
|
7634
|
+
if not Context.pipeServer or not Context.pipeServer.Valid then
|
|
7635
|
+
Utils.debugPrint("Failed to recreate pipe, restarting worker loop...")
|
|
7636
|
+
sleep(100)
|
|
7637
|
+
else
|
|
7638
|
+
Utils.debugPrint("Pipe recreated, ready for next connection")
|
|
7639
|
+
end
|
|
7626
7640
|
end
|
|
7627
7641
|
end
|
|
7628
7642
|
Utils.debugPrint("Worker stopped")
|
package/package.json
CHANGED
package/src/pipe-client.js
CHANGED
|
@@ -200,11 +200,20 @@ class PipeClient extends EventEmitter {
|
|
|
200
200
|
const messages = {
|
|
201
201
|
[ERROR_FILE_NOT_FOUND]: (
|
|
202
202
|
"Cheat Engine MCP Bridge not running. " +
|
|
203
|
-
"
|
|
203
|
+
"Steps to fix:\n" +
|
|
204
|
+
"1. Open Cheat Engine\n" +
|
|
205
|
+
"2. Table -> Show Cheat Table Lua Script\n" +
|
|
206
|
+
"3. Load or paste ce_mcp_bridge.lua\n" +
|
|
207
|
+
"4. Click Execute\n" +
|
|
208
|
+
"5. Wait for 'MCP' label to appear in CE toolbar"
|
|
204
209
|
),
|
|
205
|
-
[ERROR_PIPE_BUSY]: "Pipe busy - another client may be connected",
|
|
210
|
+
[ERROR_PIPE_BUSY]: "Pipe busy - another client may be connected. Wait a moment and try again.",
|
|
206
211
|
[ERROR_ACCESS_DENIED]: "Access denied - try running as administrator",
|
|
207
|
-
[ERROR_BROKEN_PIPE]:
|
|
212
|
+
[ERROR_BROKEN_PIPE]: (
|
|
213
|
+
"Connection lost to Cheat Engine. " +
|
|
214
|
+
"This happens when CE is closed. " +
|
|
215
|
+
"Please restart CE and reload ce_mcp_bridge.lua"
|
|
216
|
+
),
|
|
208
217
|
};
|
|
209
218
|
|
|
210
219
|
const baseMsg = messages[winerrorCode] || `Connection failed (error ${winerrorCode})`;
|