Private
Public Access
1
0

Rewritten sending helper and logic

This commit is contained in:
Jan Grießhaber
2026-01-10 18:24:52 +01:00
parent 8fc41c2e5a
commit 2e3ea7dd4d
14 changed files with 317 additions and 138 deletions

View File

@@ -272,13 +272,13 @@ function GetTrainTripStats()
end
if #tripParts > 400 then
log("Sending at " .. tripCount .. " trips")
helpers.send_udp(udpAddress, table.concat(tripParts, "\n"), serverIndex)
SendChunked(table.concat(tripParts, "\n"))
tripParts = {}
tripParts[#tripParts + 1] = "---train-trips---\n"
end
end
--tripParts[#tripParts+1] = "--train-fin--"
helpers.send_udp(udpAddress, table.concat(tripParts, "\n"), serverIndex)
SendChunked(table.concat(tripParts, "\n"))
log("Counted " .. tripCount .. " trips")
--return table.concat(tripParts,"\n")
end
@@ -326,6 +326,6 @@ function SendTrainStats()
GetTrainTripStats()
end
log("Sending Train statistics")
helpers.send_udp(udpAddress, table.concat(returnParts, "\n"), serverIndex)
SendChunked(table.concat(returnParts, "\n"))
end
end