1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00
Дополнительные проверки в БМЦИК для таблицы БНТ
This commit is contained in:
kosmik641
2023-03-27 20:00:58 +03:00
parent 5a58301de2
commit 84226c4eb6

View File

@@ -1192,7 +1192,7 @@ function TRAIN_SYSTEM:CANUpdate()
local Announcer = self.Announcer
local lTbl = Metrostroi.SarmatUPOSetup[self.Train:GetNW2Int("Announcer")][Announcer.Line]
local lTblCount = #lTbl
local ledTbl = lTbl.LED
local ledTbl = lTbl.LED or {}
local currLed, nextLed = 0,0
local station = Announcer.Station
if Announcer.AVTDepart then
@@ -1206,10 +1206,10 @@ function TRAIN_SYSTEM:CANUpdate()
end
for i=(Announcer.Path and #ledTbl or 1),station,(Announcer.Path and -1 or 1) do
currLed = currLed + ledTbl[i]
currLed = currLed + (ledTbl[i] or 0)
end
if Announcer.AVTDepart or not Announcer.OnStation then
nextLed = ledTbl[station]
nextLed = ledTbl[station] or 0
currLed = currLed - nextLed
end