diff --git a/lua/entities/gmod_subway_81-502/init.lua b/lua/entities/gmod_subway_81-502/init.lua index afb337f..0d63d4a 100644 --- a/lua/entities/gmod_subway_81-502/init.lua +++ b/lua/entities/gmod_subway_81-502/init.lua @@ -372,7 +372,7 @@ function ENT:Think() self:SetPackedRatio("BLPressure", Pneumatic.ReservoirPressure/16.0) self:SetPackedRatio("TLPressure", Pneumatic.TrainLinePressure/16.0) self:SetPackedRatio("BCPressure", Pneumatic.BrakeCylinderPressure/6.0) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/150.0) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) diff --git a/lua/entities/gmod_subway_81-702/cl_init.lua b/lua/entities/gmod_subway_81-702/cl_init.lua index 978783d..3cfbe14 100644 --- a/lua/entities/gmod_subway_81-702/cl_init.lua +++ b/lua/entities/gmod_subway_81-702/cl_init.lua @@ -424,7 +424,7 @@ ENT.ButtonMap["BatteryVoltage"] = { scale = 0.0625, buttons = { - {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*100) end}, + {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*150) end}, } } @@ -1319,7 +1319,7 @@ function ENT:Think() self:Animate("brake",1-self:GetPackedRatio("CranePosition"),0.00, 0.48, 256,24) self:Animate("controller",controller[self:GetNW2Int("ControllerPosition",0)+1],0.148, 0.333, 2,false) self:Animate("reverser",self:GetPackedRatio("ReverserPosition"),0.6, 0.4, 4,false) - self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.62,0.495,45,3) + self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.63,0.39,45,3) self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0,0.5,3,false) self:ShowHide("reverser",self:GetNW2Int("WrenchMode",0)==1) self:ShowHide("rcureverser",self:GetNW2Int("WrenchMode",0)==3) diff --git a/lua/entities/gmod_subway_81-702/init.lua b/lua/entities/gmod_subway_81-702/init.lua index c1bb61e..7f8a682 100644 --- a/lua/entities/gmod_subway_81-702/init.lua +++ b/lua/entities/gmod_subway_81-702/init.lua @@ -277,7 +277,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/82.0) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) -- Update ARS system (no ars on E) diff --git a/lua/entities/gmod_subway_81-702_int/cl_init.lua b/lua/entities/gmod_subway_81-702_int/cl_init.lua index 7b24f97..729d339 100644 --- a/lua/entities/gmod_subway_81-702_int/cl_init.lua +++ b/lua/entities/gmod_subway_81-702_int/cl_init.lua @@ -387,7 +387,7 @@ ENT.ButtonMap["BatteryVoltage"] = { scale = 0.0625, buttons = { - {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*100) end}, + {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*150) end}, } } @@ -1109,7 +1109,7 @@ function ENT:Think() self:Animate("brake",1-self:GetPackedRatio("CranePosition"),0.00, 0.48, 256,24) self:Animate("controller",controller[self:GetNW2Int("ControllerPosition",0)+1],0.148, 0.333, 2,false) self:Animate("reverser",self:GetPackedRatio("ReverserPosition"),0.6, 0.4, 4,false) - self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.62,0.495,45,3) + self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.63,0.39,45,3) self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0,0.5,3,false) self:ShowHide("reverser",self:GetNW2Int("WrenchMode",0)==1) self:ShowHide("rcureverser",self:GetNW2Int("WrenchMode",0)==3) diff --git a/lua/entities/gmod_subway_81-702_int/init.lua b/lua/entities/gmod_subway_81-702_int/init.lua index f2eaeb4..b4f55c5 100644 --- a/lua/entities/gmod_subway_81-702_int/init.lua +++ b/lua/entities/gmod_subway_81-702_int/init.lua @@ -264,7 +264,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/82.0) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) -- Update ARS system (no ars on E) diff --git a/lua/entities/gmod_subway_81-703/cl_init.lua b/lua/entities/gmod_subway_81-703/cl_init.lua index 1729320..8054b17 100644 --- a/lua/entities/gmod_subway_81-703/cl_init.lua +++ b/lua/entities/gmod_subway_81-703/cl_init.lua @@ -457,7 +457,7 @@ ENT.ButtonMap["BatteryVoltage"] = { scale = 0.0625, buttons = { - {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*100) end}, + {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*150) end}, } } @@ -1298,7 +1298,7 @@ function ENT:Think() self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0.77,0,3,false) self:ShowHide("reverser",self:GetNW2Int("WrenchMode",0)==1) self:ShowHide("rcureverser",self:GetNW2Int("WrenchMode",0)==3) - self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"), 0.637,0.4885,45,3) + self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.62,0.38,45,3) self:Animate("brake_line",self:GetPackedRatio("BLPressure"),0.6285, 0.84, 256,2)--,,0.01) self:Animate("train_line",self:GetPackedRatio("TLPressure"),0.6285, 0.843, 256,2)--,,0.01) diff --git a/lua/entities/gmod_subway_81-703/init.lua b/lua/entities/gmod_subway_81-703/init.lua index da887dc..095ea65 100644 --- a/lua/entities/gmod_subway_81-703/init.lua +++ b/lua/entities/gmod_subway_81-703/init.lua @@ -297,7 +297,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/82.0) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedBool("EmergencyBrakeValve",self.EmergencyBrakeValve.Value > 0) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) diff --git a/lua/entities/gmod_subway_81-703_int/cl_init.lua b/lua/entities/gmod_subway_81-703_int/cl_init.lua index e5d11d5..671d869 100644 --- a/lua/entities/gmod_subway_81-703_int/cl_init.lua +++ b/lua/entities/gmod_subway_81-703_int/cl_init.lua @@ -410,7 +410,7 @@ ENT.ButtonMap["BatteryVoltage"] = { scale = 0.0625, buttons = { - {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*100) end}, + {ID = "!BatteryVoltage", x=0,y=0,w=60,h=60,tooltip="",tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*150) end}, } } @@ -1184,7 +1184,7 @@ function ENT:Think() self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0.77,0,3,false) self:ShowHide("reverser",self:GetNW2Int("WrenchMode",0)==1) self:ShowHide("rcureverser",self:GetNW2Int("WrenchMode",0)==3) - self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"), 0.637,0.4885,45,3) + self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.62,0.38,45,3) self:Animate("brake_line",self:GetPackedRatio("BLPressure"),0.6285, 0.84, 256,2)--,,0.01) self:Animate("train_line",self:GetPackedRatio("TLPressure"),0.6285, 0.843, 256,2)--,,0.01) diff --git a/lua/entities/gmod_subway_81-703_int/init.lua b/lua/entities/gmod_subway_81-703_int/init.lua index 92ee367..e4a4f81 100644 --- a/lua/entities/gmod_subway_81-703_int/init.lua +++ b/lua/entities/gmod_subway_81-703_int/init.lua @@ -283,7 +283,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/82.0) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedBool("EmergencyBrakeValve",self.EmergencyBrakeValve.Value > 0) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) --print(self.LK1.Value,self.LK2.Value,self.LK3.Value,self.LK4.Value,self.LK5.Value,self.TSH.Value) diff --git a/lua/entities/gmod_subway_81-719/init.lua b/lua/entities/gmod_subway_81-719/init.lua index 815625b..57982cd 100644 --- a/lua/entities/gmod_subway_81-719/init.lua +++ b/lua/entities/gmod_subway_81-719/init.lua @@ -320,8 +320,8 @@ function ENT:Think() self:SetPackedRatio("TLPressure", self.Pneumatic.TrainLinePressure/16.0) self:SetPackedRatio("BCPressure", math.min(3.2,self.Pneumatic.BrakeCylinderPressure)/6.0) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/150.0) - self:SetPackedRatio("BatteryCurrent",self.Panel["V1"]*math.Clamp((self.Battery.Voltage-75)*0.01,-0.01,1)) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) + self:SetPackedRatio("BatteryCurrent",Panel["V1"]*math.Clamp((self.Battery.Voltage-75)*0.01,-0.01,1)) -- Exchange some parameters between engines, pneumatic system, and real world self.Engines:TriggerInput("Speed",self.Speed) diff --git a/lua/entities/gmod_subway_em508/init.lua b/lua/entities/gmod_subway_em508/init.lua index cc31954..d0c1cb1 100644 --- a/lua/entities/gmod_subway_em508/init.lua +++ b/lua/entities/gmod_subway_em508/init.lua @@ -275,7 +275,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/150) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedRatio("Speed", self.Speed/100) diff --git a/lua/entities/gmod_subway_em508t/cl_init.lua b/lua/entities/gmod_subway_em508t/cl_init.lua index 19147b9..6637a14 100644 --- a/lua/entities/gmod_subway_em508t/cl_init.lua +++ b/lua/entities/gmod_subway_em508t/cl_init.lua @@ -678,7 +678,7 @@ ENT.ClientProps["voltmeter"] = { ENT.ClientProps["volt1"] = { model = "models/metrostroi_train/81-710/ezh3_voltages.mdl", - pos = Vector(463.263306,-19.963984,7.809407), + pos = Vector(463.263306,-19.963984,7.709407), ang = Angle(-90.000000,0.000000,0.000000), bscale = Vector(1,1,1.3), hideseat = 0.2, @@ -1018,7 +1018,7 @@ function ENT:Think() self:Animate("controller",self:GetPackedRatio("ControllerPosition"),0, 0.31, 2,false) self:Animate("reverser",self:GetPackedRatio("ReverserPosition"),0.6, 0.4, 4,false) self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0.77,0,3,false) - self:Animate("volt1", self:GetPackedRatio("BatteryVoltage"),0.6182,0.39,45,3) + self:Animate("volt1", self:GetPackedRatio("BatteryVoltage"),0.62,0.385,45,3) self:ShowHide("reverser",self:GetNW2Int("WrenchMode",0)==1) self:ShowHide("rcureverser",self:GetNW2Int("WrenchMode",0)==3) diff --git a/lua/entities/gmod_subway_em508t/init.lua b/lua/entities/gmod_subway_em508t/init.lua index c5f97cd..9efa7a8 100644 --- a/lua/entities/gmod_subway_em508t/init.lua +++ b/lua/entities/gmod_subway_em508t/init.lua @@ -272,7 +272,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/150) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedRatio("Speed", self.Speed/100) diff --git a/lua/entities/gmod_subway_em509/init.lua b/lua/entities/gmod_subway_em509/init.lua index f5b476e..6153f32 100644 --- a/lua/entities/gmod_subway_em509/init.lua +++ b/lua/entities/gmod_subway_em509/init.lua @@ -322,7 +322,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/150) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedBool("EmergencyBrakeValve",self.EmergencyBrakeValve.Value > 0) -- Update ARS system (no ars on E) diff --git a/lua/entities/gmod_subway_ezh/init.lua b/lua/entities/gmod_subway_ezh/init.lua index 617e578..8e725f5 100644 --- a/lua/entities/gmod_subway_ezh/init.lua +++ b/lua/entities/gmod_subway_ezh/init.lua @@ -357,7 +357,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/150) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) -- Update ARS system (no ars on E) self:SetPackedRatio("ALSSpeed", self.ALSCoil.Speed/100.0) diff --git a/lua/entities/gmod_subway_ezh1/init.lua b/lua/entities/gmod_subway_ezh1/init.lua index d62f44e..ecfa69b 100644 --- a/lua/entities/gmod_subway_ezh1/init.lua +++ b/lua/entities/gmod_subway_ezh1/init.lua @@ -274,7 +274,7 @@ function ENT:Think() self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Engines.E24/2000.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/150) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedRatio("Speed", self.Speed/100) diff --git a/lua/entities/gmod_subway_ezh3/cl_init.lua b/lua/entities/gmod_subway_ezh3/cl_init.lua index 6015d1e..e88826a 100644 --- a/lua/entities/gmod_subway_ezh3/cl_init.lua +++ b/lua/entities/gmod_subway_ezh3/cl_init.lua @@ -350,7 +350,7 @@ ENT.ButtonMap["Panel"] = { sprite = {bright=0.20,size=0.25,scale=0.05,vscale=0.04,color=Color(136, 159, 211),y=0,z=-3,lamp="light_SD",hidden="ezh3_lsd"} }}, - {ID = "!BatteryVoltage", x=120-80,y=25,tooltip="",w=60, h=50,tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*100) end}, + {ID = "!BatteryVoltage", x=120-80,y=25,tooltip="",w=60, h=50,tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.BatteryVoltage"),ent:GetPackedRatio("BatteryVoltage")*150) end}, {ID = "!EnginesCurrent", x=120-8,y=25,tooltip="",w=60, h=50,tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.EnginesCurrent"),ent:GetPackedRatio("EnginesCurrent")*1000-500) end}, {ID = "!HighVoltage", x=120+80-18,y=25,tooltip="",w=60, h=50,tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.HighVoltage"),ent:GetPackedRatio("EnginesVoltage")*1000) end}, {ID = "!Speedometer", x=352,y=25,tooltip="",w=85, h=70,tooltipFunc = function(ent) return Format(Metrostroi.GetPhrase("Train.Buttons.Speed"),ent:GetPackedRatio("Speed")*100) end}, @@ -1158,7 +1158,7 @@ ENT.ClientProps["voltmeter"] = { ENT.ClientProps["ampermeter"] = { model = "models/metrostroi_train/81-710/ezh3_voltages.mdl", - pos = Vector(448.20+10.09,-24.66,-6.69), + pos = Vector(448.20+10.09,-24.69,-6.69), ang = Angle(-62,0,0), hideseat = 0.2, } @@ -1166,7 +1166,7 @@ ENT.ClientProps["ampermeter"] = { ENT.ClientProps["volt1"] = { model = "models/metrostroi_train/81-710/ezh3_voltages.mdl", pos = Vector(448.20+10.35,-20.57,-6.69), - ang = Angle(-62,0,0), + ang = Angle(-62,-5,0), hideseat = 0.2, } ENT.ClientProps["speed1"] = { @@ -1719,7 +1719,7 @@ function ENT:Think() self:Animate("brake_cylinder",self:GetPackedRatio("BCPressure"), 0.052, 0.794,nil,2)--,,0.03) self:Animate("voltmeter",self:GetPackedRatio("EnginesVoltage"), 0.632,0.36,92,2) self:Animate("ampermeter",self:GetPackedRatio("EnginesCurrent"), 0.632,0.36,nil, nil,92,20,3) - self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.613,0.455,72,2) + self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.632,0.368,45,2) self:Animate("speed1",self:GetPackedRatio("Speed"),0.645, 0.363, nil, nil, 90,200,20) diff --git a/lua/entities/gmod_subway_ezh3/init.lua b/lua/entities/gmod_subway_ezh3/init.lua index 441d9fa..3c8342b 100644 --- a/lua/entities/gmod_subway_ezh3/init.lua +++ b/lua/entities/gmod_subway_ezh3/init.lua @@ -334,7 +334,7 @@ function ENT:Think() self:SetPackedRatio("TLPressure", Pneumatic.TrainLinePressure/16.0) self:SetPackedRatio("BCPressure", math.min(2.7,Pneumatic.BrakeCylinderPressure)/6.0) self:SetPackedRatio("EnginesVoltage", self.Electric.Main750V/1000.0) - self:SetPackedRatio("BatteryVoltage",self.Panel["V1"]*self.Battery.Voltage/100) + self:SetPackedRatio("BatteryVoltage",Panel["V1"]*self.Battery.Voltage/150.0) self:SetPackedRatio("EnginesCurrent", 0.5 + 0.5*(self.Electric.I24/500.0)) self:SetPackedBool("RT300",self.Electric.ThyristorControllerPower*self.Electric.ThyristorControllerWork>0) diff --git a/lua/metrostroi/systems/sys_81_501_electric.lua b/lua/metrostroi/systems/sys_81_501_electric.lua index 73390bc..8a972b1 100644 --- a/lua/metrostroi/systems/sys_81_501_electric.lua +++ b/lua/metrostroi/systems/sys_81_501_electric.lua @@ -261,6 +261,7 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train, dT) )/750*(0.5+0.5*B*Train.VB.Value*Train.KZ1.Value) )) Panel.MainLights2 = Panel.MainLights1*Train.KO.Value + Train.Battery:TriggerInput("Charge", Train.VB.Value*Panel.MainLights1) Train.KK:TriggerInput("Set",T[22]*(1-Train.TRK.Value)) Train.KO:TriggerInput("Close",T[27]) diff --git a/lua/metrostroi/systems/sys_81_502_electric.lua b/lua/metrostroi/systems/sys_81_502_electric.lua index af779c1..0a65727 100644 --- a/lua/metrostroi/systems/sys_81_502_electric.lua +++ b/lua/metrostroi/systems/sys_81_502_electric.lua @@ -392,6 +392,8 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train, dT) )/750*(0.5+0.5*B*Train.VB.Value*Train.KZ1.Value) )) Panel.MainLights2 = Panel.MainLights1*Train.KO.Value + Train.Battery:TriggerInput("Charge", Train.VB.Value*Panel.MainLights1) + Panel.VPR = B*(1-Train.VR.Value)+T[10]*Train.VR.Value Panel.Ring = T[42] diff --git a/lua/metrostroi/systems/sys_81_702_electric.lua b/lua/metrostroi/systems/sys_81_702_electric.lua index a45db5d..f47e746 100644 --- a/lua/metrostroi/systems/sys_81_702_electric.lua +++ b/lua/metrostroi/systems/sys_81_702_electric.lua @@ -158,6 +158,7 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train, dT) )/750*(0.5+0.5*B*Train.VB.Value*Train.KZ1.Value) )) Panel.MainLights2 = Panel.MainLights1*Train.KO.Value + Train.Battery:TriggerInput("Charge", Train.VB.Value*Panel.MainLights1) Panel.VPR = C(self.Aux750V>250) diff --git a/lua/metrostroi/systems/sys_81_703_electric.lua b/lua/metrostroi/systems/sys_81_703_electric.lua index a6551d0..e5ff4ae 100644 --- a/lua/metrostroi/systems/sys_81_703_electric.lua +++ b/lua/metrostroi/systems/sys_81_703_electric.lua @@ -404,6 +404,7 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train) )/750*(0.5+0.5*B*Train.VB.Value*Train.KZ1.Value) )) Panel.MainLights2 = Panel.MainLights1*Train.KO.Value + Train.Battery:TriggerInput("Charge", Train.VB.Value*Panel.MainLights1) Panel.VPR = BO*Train.RST.Value diff --git a/lua/metrostroi/systems/sys_81_703i_electric.lua b/lua/metrostroi/systems/sys_81_703i_electric.lua index 086420f..4353ea0 100644 --- a/lua/metrostroi/systems/sys_81_703i_electric.lua +++ b/lua/metrostroi/systems/sys_81_703i_electric.lua @@ -326,6 +326,7 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train) )/750*(0.5+0.5*B*Train.VB.Value*Train.KZ1.Value) )) Panel.MainLights2 = Panel.MainLights1*Train.KO.Value + Train.Battery:TriggerInput("Charge", Train.VB.Value*Panel.MainLights1) if isKVL or isE then Train.KK:TriggerInput("Set",T[22])