From 439ed9ea3c3acd42a273d484437e8cbbe458d4eb Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Mon, 3 Aug 2026 11:28:32 +0800 Subject: [PATCH] =?UTF-8?q?chore(client):=20=E5=A2=9E=E5=8A=A0=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E6=97=A5=E5=BF=97=E4=BB=A5=E5=AF=BC=E5=87=BA=20NBT=20?= =?UTF-8?q?stop=20=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用于排查非停站指令(如设置最高速度、新建时刻表区段)的 NBT 结构, 以便后续在代码中精准过滤这些非车站指令。 --- station_broadcast.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/station_broadcast.lua b/station_broadcast.lua index eae687e..18c8471 100644 --- a/station_broadcast.lua +++ b/station_broadcast.lua @@ -1,6 +1,6 @@ -- 1. Configuration & Constants -local APP_VERSION_TEXT = "v1.0.51" +local APP_VERSION_TEXT = "v1.0.52" local CONFIG = { CLOUD_URL = "ws://stabadmin.fse-media.group", @@ -2626,6 +2626,16 @@ function Main.loop() cleanupTimestampMap(State.announcedAlerts, now, tonumber(CONFIG.ALERT_COOLDOWN_MS) or 300000) for i, stop in ipairs(data.TrainStops) do + -- [DEBUG] Dump first stop to file for inspection + if i == 1 and not State.dumpedStop then + State.dumpedStop = true + local f = fs.open("stop_dump.json", "w") + if f then + f.write(textutils.serializeJSON(stop)) + f.close() + Utils.log("DEBUG", "Dumped stop structure to stop_dump.json") + end + end local st = stop.Station if st then local trainName = st.TrainName or "Unknown"