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