From 86b7cadd771635d38acde0e04b092ac022e2e5c9 Mon Sep 17 00:00:00 2001 From: Ivan Gordeev <70780122+kosmik641@users.noreply.github.com> Date: Mon, 12 Jul 2021 19:49:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=A1=D0=9D=D0=9F.=20(#277)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Дополнительные проверки на наличие конфига --- lua/metrostroi/systems/sys_81_71_asnp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_71_asnp.lua b/lua/metrostroi/systems/sys_81_71_asnp.lua index d8cb07f..2a1554a 100644 --- a/lua/metrostroi/systems/sys_81_71_asnp.lua +++ b/lua/metrostroi/systems/sys_81_71_asnp.lua @@ -762,7 +762,7 @@ function TRAIN_SYSTEM:Think() self.ASNPTimer = CurTime()-math.Rand(-0.3,0.3) end if self.State == -1 and self.ASNPTimer and CurTime()-self.ASNPTimer > 1 then - self.State = Metrostroi.ASNPSetup and 1 or -2 + self.State = Metrostroi.ASNPSetup and #Metrostroi.ASNPSetup > 0 and 1 or -2 end if Power and self.State > -1 then for k,v in pairs(self.TriggerNames) do @@ -772,7 +772,7 @@ function TRAIN_SYSTEM:Think() end end end - if not Metrostroi.ASNPSetup and self.State > 0 then + if (not Metrostroi.ASNPSetup or Metrostroi.ASNPSetup and #Metrostroi.ASNPSetup == 0) and self.State > 0 then self.State = -2 end local PSWork = Train.Panel.PassSchemeControl and Train.Panel.PassSchemeControl>0 and self.State==7