From 9947789b6c5a38158f1cd0098442fd7d2ae91a79 Mon Sep 17 00:00:00 2001 From: Moon Horse Date: Tue, 21 Dec 2021 12:47:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=AD=D1=82=D0=BE=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D0=9A=D0=A0=D0=A3=20?= =?UTF-8?q?=D0=B2=203=20=D1=80=D1=83=D0=BA=D0=B8=20=D0=B8=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D1=81=D1=80=D0=B0=D0=B1=D0=B0=D1=82=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=9054=20=D0=BF=D1=80=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D0=B5=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B2=D0=B5=D1=80=D1=81=D0=B0=20=D0=B2=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=20=D0=B2=20=D0=BE=D0=B1=D0=B5=D0=B8=D1=85=20=D0=BA?= =?UTF-8?q?=D0=B0=D0=B1=D0=B8=D0=BD=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/metrostroi/systems/sys_81_714_electric.lua | 1 + lua/metrostroi/systems/sys_81_717_electric.lua | 7 ++++++- lua/metrostroi/systems/sys_yar_13b.lua | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_714_electric.lua b/lua/metrostroi/systems/sys_81_714_electric.lua index 6723fc7..b597ac3 100644 --- a/lua/metrostroi/systems/sys_81_714_electric.lua +++ b/lua/metrostroi/systems/sys_81_714_electric.lua @@ -78,6 +78,7 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) if isMVM then Train:WriteTrainWire(71,S["33D"]*Train.OtklBV.Value) end + Train.RPvozvrat.VozRpPressed = T[17]~=0 --Вагонная часть S["10A"] = BO*Train.A30.Value S["ZR"] = (1-Train.RRP.Value)+(B*Train.A39.Value*(1-Train.RPvozvrat.Value)*Train.RRP.Value)*-1 diff --git a/lua/metrostroi/systems/sys_81_717_electric.lua b/lua/metrostroi/systems/sys_81_717_electric.lua index 7f0eafb..83b4202 100644 --- a/lua/metrostroi/systems/sys_81_717_electric.lua +++ b/lua/metrostroi/systems/sys_81_717_electric.lua @@ -88,7 +88,11 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) S["F7"] = S["F"]*KV["F-F7"]+S["14b"]*KRU["11/3-FR1"] Train:WriteTrainWire(5,S["10AK"]*KV["10AK-5"] + KRU["5/3-ZM31"]*-10) - Train:WriteTrainWire(4,S["10AK"]*KV["10AK-4"] + --[[max(0,min(1,T[4])*KV["4-0"]*-10)]]KV["4-0"]*-10) + Train:WriteTrainWire(4,S["10AK"]*KV["10AK-4"]) --[[max(0,min(1,T[4])*KV["4-0"]*-10)KV["4-0"]*-10]] + if T[4]*KV["4-0"] ~= 0 then + Train.A54:TriggerInput("Set",0) + Train:WriteTrainWire(5,0) + end --Train:WriteTrainWire(4,S["10AK"]*KV["10AK-4"]*(1-T[4]*KV["4-0"]*-10)) Panel.LST = T[6]*Train.A40.Value @@ -451,6 +455,7 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) Panel.L1 = T[57] end Panel.M8 = S["V2"]*Train.PVK.Value + Train.RPvozvrat.VozRpPressed = T[17]~=0 local ASNP_VV = Train.ASNP_VV ASNP_VV.Power = BO*Train.AS1.Value*Train.R_ASNPOn.Value diff --git a/lua/metrostroi/systems/sys_yar_13b.lua b/lua/metrostroi/systems/sys_yar_13b.lua index d209f6e..82da9b9 100644 --- a/lua/metrostroi/systems/sys_yar_13b.lua +++ b/lua/metrostroi/systems/sys_yar_13b.lua @@ -30,6 +30,7 @@ function TRAIN_SYSTEM:Initialize() latched = true, -- RPvozvrat latches into place power_open = "None", -- Power source for the open signal power_close = "Mechanical", -- Power source for the close signal + VozRpPressed = false, -- Added to override the blocking action of the energized RP relays on RPVozvrat }) -- Реле времени РВ1 @@ -93,13 +94,13 @@ function TRAIN_SYSTEM:Think() end --self.RUTTarget = 250 + 150*self.Train.Pneumatic.WeightLoadRatio -- RPvozvrat operation - Train.RPvozvrat:TriggerInput("Close", - (Train.DR1.Value == 1.0) or + Train.RPvozvrat:TriggerInput("Close", not Train.RPvozvrat.VozRpPressed and + ((Train.DR1.Value == 1.0) or (Train.DR2.Value == 1.0) or (Train.RPL.Value == 1.0) or (Train.RP1_3.Value == 1.0) or (Train.RP2_4.Value == 1.0) or (Train.RZ_1.Value == 1.0) or (Train.RZ_2.Value == 1.0) or - (Train.RZ_3.Value == 1.0)) + (Train.RZ_3.Value == 1.0))) end