From 1fb166948ab1885708a805c6395e272455fe7bac Mon Sep 17 00:00:00 2001 From: kosmik641 Date: Tue, 10 May 2022 16:22:52 +0300 Subject: [PATCH] =?UTF-8?q?81-722.=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=20=D1=81=D0=B8=D0=B3=D0=BD=D0=B0=D0=BB=D0=B0=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D1=8F=20=D0=B4=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B9=20=D0=B2=20=D1=81=D0=B8=D1=81=D1=82=D0=B5?= =?UTF-8?q?=D0=BC=D1=8B=20=D0=A6=D0=98=D0=9A.=20=D0=97=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=BA=D0=B0=20=D0=B4=D0=B2=D0=B5=D1=80=D0=B5=D0=B9?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=BB=D0=BE=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B8=20=D1=82=D1=83=D0=BC=D0=B1=D0=BB=D0=B5=D1=80?= =?UTF-8?q?=D0=B0=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=B2=D0=B5=D1=80=D0=B5=D0=B9=20=D0=B2=20=D0=90=D0=92?= =?UTF-8?q?=D0=A2.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20?= =?UTF-8?q?=D1=82=D1=80=D0=B8=D0=B3=D0=B3=D0=B5=D1=80=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=91=D0=9C=D0=A6=D0=98=D0=9A=20=D0=BE=D1=82=20=D1=82=D1=83?= =?UTF-8?q?=D0=BC=D0=B1=D0=BB=D0=B5=D1=80=D0=B0=20=D0=B2=20=D0=90=D0=92?= =?UTF-8?q?=D0=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/metrostroi/systems/sys_81_722_bukp.lua | 12 ++++++++---- lua/metrostroi/systems/sys_81_722_bukv.lua | 5 ----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_722_bukp.lua b/lua/metrostroi/systems/sys_81_722_bukp.lua index ba638ec..4cd545e 100644 --- a/lua/metrostroi/systems/sys_81_722_bukp.lua +++ b/lua/metrostroi/systems/sys_81_722_bukp.lua @@ -377,9 +377,14 @@ function TRAIN_SYSTEM:Think(dT) MFDU:Error(49,1,(Train.DoorBack.Value>0 and Train.DoorSelect.Value==1 or MFDU:ErrorGet("49_1") and self.BackDoors~=nil) and not self.States.CloseDoors) Train:CANWrite("BUKP",Train:GetWagonNumber(),"BUKV",self.Trains[#self.Trains].ID,"OpenRightBack",self.BackDoors and self.BackDoors~=true) - if self.CloseRing and (Train.DoorLeft1.Value > 0 or Train.DoorLeft2.Value > 0 or Train.DoorRight.Value > 0 or self.LSD) then self.CloseRing = false end - if (not self.CloseRing or self.CloseRing and CurTime()-self.CloseRing<0) and Train.DoorClose.Value==2 and not self.LSD then self.CloseRing = CurTime() end - self:CState("CloseDoors",RR and Train.SF7.Value>0 and (Train.DoorClose.Value == 0 or (not self.CloseRing and Train.DoorClose.Value==2 or self.CloseRing and CurTime()-self.CloseRing>4))) + if self.CloseDoorsDelay and Train.DoorClose.Value~=2 and (Train.DoorLeft1.Value > 0 or Train.DoorLeft2.Value > 0 or Train.DoorRight.Value > 0 or self.LSD) then + self.CloseDoorsDelay = nil + Train.BMCIK:TriggerInput("CloseDoorsAVT",false) + elseif not self.CloseDoorsDelay and Train.DoorClose.Value==2 and not self.LSD then + self.CloseDoorsDelay = CurTime()+4 + Train.BMCIK:TriggerInput("CloseDoorsAVT",true) + end + self:CState("CloseDoors",RR and Train.SF7.Value>0 and (Train.DoorClose.Value == 0 or self.CloseDoorsDelay and CurTime()>self.CloseDoorsDelay)) self:CState("PassLight",Train.PassLight.Value>0) self:CState("PassVent",Train.PassVent.Value-1) if BARSPower and Train.BARS.V2 > 0 or not BARSPower and math.abs(self.Speed) < 0.5 and self.PowerCommand < 0 then @@ -401,7 +406,6 @@ function TRAIN_SYSTEM:Think(dT) self:CState("PN1",false) self:CState("PN2",false) end - self:CState("CloseRing",self.CloseRing and (CurTime()-self.CloseRing)%1<=0.5) --[[ self:CState("RVPB",(1-Train.RV["KRO5-6"])*Train.SF2.Value > 0) self.ControllerState = stength diff --git a/lua/metrostroi/systems/sys_81_722_bukv.lua b/lua/metrostroi/systems/sys_81_722_bukv.lua index 6fe93e7..c1e52f4 100644 --- a/lua/metrostroi/systems/sys_81_722_bukv.lua +++ b/lua/metrostroi/systems/sys_81_722_bukv.lua @@ -265,11 +265,6 @@ function TRAIN_SYSTEM:Think() else self.Strength = 0 end - local clRing = self:Get("CloseRing") - if self.CloseRing ~= clRing then - self.CloseRing = clRing - if clRing then Train:PlayOnce("door_alarm",1,1) end - end self.DisableLights = self:Get("PVU2") and 1 or 0 self.EnableLights = self:Get("PassLight") and 1 or 0 self.DisablePSN = self:Get("PVU3") and 1 or 0