1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Auxiliary air reservoir simulation added

This commit is contained in:
Moon Horse
2025-12-04 01:56:50 +03:00
parent d01446d9e9
commit 3e0162a4a1
2 changed files with 32 additions and 20 deletions

View File

@@ -206,7 +206,7 @@ function TRAIN_SYSTEM:TriggerInput(name,value)
if (name == "Block") then
self.Blocked = value
elseif (name == "Close") and (value > self.trigger_level) and (self.Value ~= 1.0 or self.TargetValue ~= 1.0) then --(self.TargetValue ~= 1.0 and self.rpb))
if self.pneumatic and self.Train.Pneumatic.TrainLinePressure < 3 then return end
if self.pneumatic and self.Train.Pneumatic.ExtendedTrainLinePressure < 3 then return end
if (not self.ChangeTime) or (self.TargetValue ~= 1.0) then
self.ChangeTime = self.Time + FailSim.Value(self,"CloseTime")
end
@@ -234,7 +234,7 @@ function TRAIN_SYSTEM:TriggerInput(name,value)
if self.ChangeTime==self.Time and self.Train.DeltaTime then self:Think(self.Train.DeltaTime) end
elseif name == "Set" then
if self.pneumatic and value > 0 and self.Train.Pneumatic.TrainLinePressure < 3 then return end
if self.pneumatic and value > 0 and self.Train.Pneumatic.ExtendedTrainLinePressure < 3 then return end
if self.maxvalue then
if not self.ChangeTime then
self.ChangeTime = self.Time + FailSim.Value(self,"OpenTime")