杂项(station_broadcast): 更新版本至v1.0.50并添加列车ETA调试日志
该调试日志会打印列车名称、ETA秒数、计时tick数及服务器tick率,仅在列车ETA不超过60秒且未触发过接近播报时输出,用于辅助排查列车接近播报的逻辑问题
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
-- 1. Configuration & Constants
|
-- 1. Configuration & Constants
|
||||||
local APP_VERSION_TEXT = "v1.0.49"
|
local APP_VERSION_TEXT = "v1.0.50"
|
||||||
|
|
||||||
local CONFIG = {
|
local CONFIG = {
|
||||||
CLOUD_URL = "ws://stabadmin.fse-media.group",
|
CLOUD_URL = "ws://stabadmin.fse-media.group",
|
||||||
@@ -2664,7 +2664,11 @@ function Main.loop()
|
|||||||
local delayMinutes = math.floor(delayTicks / ((State.tickRate or 20) * 60))
|
local delayMinutes = math.floor(delayTicks / ((State.tickRate or 20) * 60))
|
||||||
if delayMinutes < 0 then delayMinutes = 0 end
|
if delayMinutes < 0 then delayMinutes = 0 end
|
||||||
local displayDelayMinutes = math.max(delayMinutes, tonumber(delayTextByKey[announceKey]) or 0)
|
local displayDelayMinutes = math.max(delayMinutes, tonumber(delayTextByKey[announceKey]) or 0)
|
||||||
|
|
||||||
|
if etaSeconds <= 60 and not State.announcedApproaching[announceKey] then
|
||||||
|
Utils.log("DEBUG", string.format("Train: %s, ETA: %.1fs, Ticks: %d, Rate: %.1f", trainName, etaSeconds, etaTicks, State.tickRate or 20))
|
||||||
|
end
|
||||||
|
|
||||||
table.insert(newUpcoming, {
|
table.insert(newUpcoming, {
|
||||||
trainName = trainName,
|
trainName = trainName,
|
||||||
dest = destination,
|
dest = destination,
|
||||||
|
|||||||
Reference in New Issue
Block a user