1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00
* Global change.
Замена всех устаревших функции на аналогичные

* Global change.
Добавил локальные переменные там, где это было рентабельно.
This commit is contained in:
Ivan Gordeev
2021-07-26 09:18:18 +03:00
committed by GitHub
parent 4a2786967d
commit 373073e661
29 changed files with 121 additions and 123 deletions

View File

@@ -212,10 +212,10 @@ function TRAIN_SYSTEM:Think(dT)
self.Signal0 = ars:GetARS(0,Train) or ars:GetARS(2,Train)
self.Special = ars:Get325HzAproove0() and not ars:GetARS(2,Train)
self.NoFreq = ars:GetARS(1,Train) or not (self.Signal80 or self.Signal70 or self.Signal60 or self.Signal40 or self.Signal0)
if GetConVarNumber("metrostroi_ars_printnext") == Train:EntIndex() then RunConsoleCommand("say",ars.Name,tostring(arsback and arsback.Name),tostring(ars.NextSignalLink and ars.NextSignalLink.Name or "unknown"),tostring(pos.node1.path.id),tostring(Metrostroi.TrainDirections[Train])) end
if GetConVar("metrostroi_ars_printnext"):GetInt() == Train:EntIndex() then RunConsoleCommand("say",ars.Name,tostring(arsback and arsback.Name),tostring(ars.NextSignalLink and ars.NextSignalLink.Name or "unknown"),tostring(pos.node1.path.id),tostring(Metrostroi.TrainDirections[Train])) end
self.RealNoFreq = not (self.Signal80 or self.Signal70 or self.Signal60 or self.Signal40 or self.Signal0)
else
if GetConVarNumber("metrostroi_ars_printnext") == Train:EntIndex() then RunConsoleCommand("say","LOSE SIGNAL",tostring(pos and pos.node1.path.id or "unknown"),tostring(Metrostroi.TrainDirections[Train])) end
if GetConVar("metrostroi_ars_printnext"):GetInt() == Train:EntIndex() then RunConsoleCommand("say","LOSE SIGNAL",tostring(pos and pos.node1.path.id or "unknown"),tostring(Metrostroi.TrainDirections[Train])) end
if (self.CheckedNF and self.CheckedNF > 1) or (self.CheckedNF == 0 and self.NoFreq) or self.RealNoFreq then
self.Alert = nil
self.Signal80 = false