From 372e829b467056e2d33aab577911c5e92153cd9a Mon Sep 17 00:00:00 2001 From: alexandr_sizov Date: Fri, 7 Jan 2022 15:04:54 +0300 Subject: [PATCH 1/4] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BF=D0=B8=D1=82=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA=20=D0=B4=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B9=20=D1=81=206=20=D0=BF=D1=80=D0=BE=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=BE=D0=BF=D1=83=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=D0=BC=20=D0=92=D0=A3=D0=94=20=D0=BD=D0=B0=20?= =?UTF-8?q?717-=D0=9C=D0=A1=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/metrostroi/systems/sys_81_717_electric.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_717_electric.lua b/lua/metrostroi/systems/sys_81_717_electric.lua index c0ce62b..0608ec5 100644 --- a/lua/metrostroi/systems/sys_81_717_electric.lua +++ b/lua/metrostroi/systems/sys_81_717_electric.lua @@ -735,9 +735,10 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) S[31] = S[31]*(1-Train.VUD1.Value) S[32] = S[32]*(1-Train.VUD1.Value) else - Train:WriteTrainWire(16,S["D1"]*(Train.VUD1.Value*Train.VUD2.Value)) - S[31] = S["D1"]*(1-Train.DoorSelect.Value) - S[32] = S["D1"]*Train.DoorSelect.Value + S["D16"] = Train.VUD1.Value*Train.VUD2.Value + S[31] = (S["D1"]+T[16]*S["D16"])*(1-Train.DoorSelect.Value) + S[32] = (S["D1"]+T[16]*S["D16"])*Train.DoorSelect.Value + Train:WriteTrainWire(16,S["D1"]*S["D16"]) end Train:WriteTrainWire(12,S["D1"]*Train.KRZD.Value) Panel.DoorsLeft = S[31] From fcec3f50d6e10285aafd30aa78e6a6f01b77a014 Mon Sep 17 00:00:00 2001 From: alexandr_sizov Date: Fri, 7 Jan 2022 15:38:46 +0300 Subject: [PATCH 2/4] =?UTF-8?q?Revert=20"=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=B8=D1=82=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA=20=D0=B4=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B9=20=D1=81=2016=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=BE=D0=BF?= =?UTF-8?q?=D1=83=D1=89=D0=B5=D0=BD=D0=BE=D0=BC=20=D0=92=D0=A3=D0=94=20?= =?UTF-8?q?=D0=BD=D0=B0=20717-=D0=9C=D0=A1=D0=9A"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 372e829b467056e2d33aab577911c5e92153cd9a. --- lua/metrostroi/systems/sys_81_717_electric.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_717_electric.lua b/lua/metrostroi/systems/sys_81_717_electric.lua index 0608ec5..c0ce62b 100644 --- a/lua/metrostroi/systems/sys_81_717_electric.lua +++ b/lua/metrostroi/systems/sys_81_717_electric.lua @@ -735,10 +735,9 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) S[31] = S[31]*(1-Train.VUD1.Value) S[32] = S[32]*(1-Train.VUD1.Value) else - S["D16"] = Train.VUD1.Value*Train.VUD2.Value - S[31] = (S["D1"]+T[16]*S["D16"])*(1-Train.DoorSelect.Value) - S[32] = (S["D1"]+T[16]*S["D16"])*Train.DoorSelect.Value - Train:WriteTrainWire(16,S["D1"]*S["D16"]) + Train:WriteTrainWire(16,S["D1"]*(Train.VUD1.Value*Train.VUD2.Value)) + S[31] = S["D1"]*(1-Train.DoorSelect.Value) + S[32] = S["D1"]*Train.DoorSelect.Value end Train:WriteTrainWire(12,S["D1"]*Train.KRZD.Value) Panel.DoorsLeft = S[31] From 19a3d84dd9944c9e6a51992ec29621d6f2882151 Mon Sep 17 00:00:00 2001 From: alexandr_sizov Date: Fri, 7 Jan 2022 15:44:19 +0300 Subject: [PATCH 3/4] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BF=D0=B8=D1=82=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA=20=D0=B4=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B9=20=D1=81=2016=D0=9F=D0=9F=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BE=D0=BF=D1=83=D1=89=D0=B5=D0=BD=D0=BE=D0=BC=20=D0=92=D0=A3?= =?UTF-8?q?=D0=94=20=D0=B4=D0=BB=D1=8F=2081-717=D0=BC=D1=81=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/metrostroi/systems/sys_81_717_electric.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_717_electric.lua b/lua/metrostroi/systems/sys_81_717_electric.lua index c0ce62b..0608ec5 100644 --- a/lua/metrostroi/systems/sys_81_717_electric.lua +++ b/lua/metrostroi/systems/sys_81_717_electric.lua @@ -735,9 +735,10 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) S[31] = S[31]*(1-Train.VUD1.Value) S[32] = S[32]*(1-Train.VUD1.Value) else - Train:WriteTrainWire(16,S["D1"]*(Train.VUD1.Value*Train.VUD2.Value)) - S[31] = S["D1"]*(1-Train.DoorSelect.Value) - S[32] = S["D1"]*Train.DoorSelect.Value + S["D16"] = Train.VUD1.Value*Train.VUD2.Value + S[31] = (S["D1"]+T[16]*S["D16"])*(1-Train.DoorSelect.Value) + S[32] = (S["D1"]+T[16]*S["D16"])*Train.DoorSelect.Value + Train:WriteTrainWire(16,S["D1"]*S["D16"]) end Train:WriteTrainWire(12,S["D1"]*Train.KRZD.Value) Panel.DoorsLeft = S[31] From 02820581d363bbf8f6d4d13270f67fe424712cf7 Mon Sep 17 00:00:00 2001 From: alexandr_sizov Date: Fri, 7 Jan 2022 15:58:24 +0300 Subject: [PATCH 4/4] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BF=D0=B8=D1=82=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D0=BB=D0=B5=D0=B2=D1=8B?= =?UTF-8?q?=D1=85=20=D0=B4=D0=B2=D0=B5=D1=80=D0=B5=D0=B9=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BF=D1=83=D0=BB=D1=8C=D1=82=D0=B5=20=D0=BF=D0=BE=D0=BC=D0=BE?= =?UTF-8?q?=D1=89=D0=BD=D0=B8=D0=BA=D0=B0=20=D1=81=2016=D0=9F=D0=9F=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D0=BE=D0=BF=D1=83=D1=89=D0=B5=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=92=D0=97=D0=94=20=D0=BD=D0=B0=2081-717=D0=BB=D0=B2?= =?UTF-8?q?=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/metrostroi/systems/sys_81_717_electric.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/metrostroi/systems/sys_81_717_electric.lua b/lua/metrostroi/systems/sys_81_717_electric.lua index 0608ec5..a73d956 100644 --- a/lua/metrostroi/systems/sys_81_717_electric.lua +++ b/lua/metrostroi/systems/sys_81_717_electric.lua @@ -747,7 +747,11 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) S["12A"] = T[12]*Train.A12.Value if isLVZ then if isPA then AVI.ZD = S[16] end - Train:WriteTrainWire(31,S[31]*(Train.KDL.Value*(1-RC2))+S["D1"]*Train.VDL.Value+AVO["31"]*RC2 + S["12A"]*Train.A31.Value) + if isKSD then + Train:WriteTrainWire(31,S[31]*(Train.KDL.Value*(1-RC2))+(S["D1"]+T[16]*Train.VUD1.Value)*Train.VDL.Value+AVO["31"]*RC2 + S["12A"]*Train.A31.Value) + else + Train:WriteTrainWire(31,S[31]*(Train.KDL.Value*(1-RC2))+(S["D1"]+T[16]*Train.VUD1.Value*Train.VUD2.Value)*Train.VDL.Value+AVO["31"]*RC2 + S["12A"]*Train.A31.Value) + end Train:WriteTrainWire(32,S[32]*(Train.KDP.Value)*(1-RC2)+AVO["32"]*RC2 + S["12A"]*Train.A32.Value) elseif not isDot2 then Train:WriteTrainWire(31,S[31]*(Train.KDL.Value+Train.KDLR.Value+Train.VDL.Value)*(Train.ASNP.K1+(1-Train.VBD.Value)) + S["12A"]*Train.A31.Value)