mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
81-722.
Дополнительные проверки в БМЦИК для таблицы БНТ
This commit is contained in:
@@ -1192,7 +1192,7 @@ function TRAIN_SYSTEM:CANUpdate()
|
|||||||
local Announcer = self.Announcer
|
local Announcer = self.Announcer
|
||||||
local lTbl = Metrostroi.SarmatUPOSetup[self.Train:GetNW2Int("Announcer")][Announcer.Line]
|
local lTbl = Metrostroi.SarmatUPOSetup[self.Train:GetNW2Int("Announcer")][Announcer.Line]
|
||||||
local lTblCount = #lTbl
|
local lTblCount = #lTbl
|
||||||
local ledTbl = lTbl.LED
|
local ledTbl = lTbl.LED or {}
|
||||||
local currLed, nextLed = 0,0
|
local currLed, nextLed = 0,0
|
||||||
local station = Announcer.Station
|
local station = Announcer.Station
|
||||||
if Announcer.AVTDepart then
|
if Announcer.AVTDepart then
|
||||||
@@ -1206,10 +1206,10 @@ function TRAIN_SYSTEM:CANUpdate()
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i=(Announcer.Path and #ledTbl or 1),station,(Announcer.Path and -1 or 1) do
|
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
|
end
|
||||||
if Announcer.AVTDepart or not Announcer.OnStation then
|
if Announcer.AVTDepart or not Announcer.OnStation then
|
||||||
nextLed = ledTbl[station]
|
nextLed = ledTbl[station] or 0
|
||||||
currLed = currLed - nextLed
|
currLed = currLed - nextLed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user