From 84226c4eb6ce183332ac13bbadaef291c9bd091d Mon Sep 17 00:00:00 2001 From: kosmik641 Date: Mon, 27 Mar 2023 20:00:58 +0300 Subject: [PATCH] =?UTF-8?q?81-722.=20=D0=94=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20=D0=B2=20=D0=91=D0=9C?= =?UTF-8?q?=D0=A6=D0=98=D0=9A=20=D0=B4=D0=BB=D1=8F=20=D1=82=D0=B0=D0=B1?= =?UTF-8?q?=D0=BB=D0=B8=D1=86=D1=8B=20=D0=91=D0=9D=D0=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/metrostroi/systems/sys_81_722_sarmat_upo.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_722_sarmat_upo.lua b/lua/metrostroi/systems/sys_81_722_sarmat_upo.lua index e8fc56d..ddd682b 100644 --- a/lua/metrostroi/systems/sys_81_722_sarmat_upo.lua +++ b/lua/metrostroi/systems/sys_81_722_sarmat_upo.lua @@ -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