From fc955128abca0f278512d5df6da06f54e7341383 Mon Sep 17 00:00:00 2001 From: Ilya Krasnow Date: Sun, 10 Apr 2022 01:33:33 +0300 Subject: [PATCH 1/5] Fixes --- lua/entities/gmod_subway_em509/init.lua | 1 + lua/entities/gmod_subway_ezh/init.lua | 3 ++- lua/entities/gmod_subway_ezh3/init.lua | 3 ++- lua/metrostroi/systems/sys_igla_cbki1.lua | 2 +- models/metrostroi_train/81-710/710_asotp.dx80.vtx | 3 --- models/metrostroi_train/81-710/710_asotp.dx90.vtx | 3 --- models/metrostroi_train/81-710/710_asotp.mdl | 3 --- models/metrostroi_train/81-710/710_asotp.sw.vtx | 3 --- models/metrostroi_train/81-710/710_asotp.vvd | 3 --- 9 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 models/metrostroi_train/81-710/710_asotp.dx80.vtx delete mode 100644 models/metrostroi_train/81-710/710_asotp.dx90.vtx delete mode 100644 models/metrostroi_train/81-710/710_asotp.mdl delete mode 100644 models/metrostroi_train/81-710/710_asotp.sw.vtx delete mode 100644 models/metrostroi_train/81-710/710_asotp.vvd diff --git a/lua/entities/gmod_subway_em509/init.lua b/lua/entities/gmod_subway_em509/init.lua index 9f8ca9a..f609d6f 100644 --- a/lua/entities/gmod_subway_em509/init.lua +++ b/lua/entities/gmod_subway_em509/init.lua @@ -13,6 +13,7 @@ ENT.SyncTable = { "DriverValveBLDisconnect","DriverValveTLDisconnect","EmergencyBrakeValve", "UKSDisconnect", "GV", "R_Program1","R_Program1H","R_Program2H","UAVA","UAVAC", + "R_ASNPOn","R_ASNPDown","R_ASNPUp","R_ASNPPath","R_ASNPMenu","IGLA1","IGLA2", } ENT.SyncFunctions = { "" diff --git a/lua/entities/gmod_subway_ezh/init.lua b/lua/entities/gmod_subway_ezh/init.lua index 661269a..b3d00c2 100644 --- a/lua/entities/gmod_subway_ezh/init.lua +++ b/lua/entities/gmod_subway_ezh/init.lua @@ -10,7 +10,8 @@ ENT.SyncTable = { "AB1","AB2", "RRIEnable","RRIAmplifier", "DriverValveBLDisconnect","DriverValveTLDisconnect","EPK","EmergencyBrakeValve","UAVA","UAVAC", - "GV" + "GV", + "R_ASNPOn","R_ASNPDown","R_ASNPUp","R_ASNPPath","R_ASNPMenu","IGLA1","IGLA2", } ENT.SyncFunctions = { "" diff --git a/lua/entities/gmod_subway_ezh3/init.lua b/lua/entities/gmod_subway_ezh3/init.lua index e75dae9..e8b24eb 100644 --- a/lua/entities/gmod_subway_ezh3/init.lua +++ b/lua/entities/gmod_subway_ezh3/init.lua @@ -11,7 +11,8 @@ ENT.SyncTable = { "SAMMSchemeOff","SAMMStart","SAMMReset","SAMMOn","SAMMBlok","SAMMX2","SAMMAhead","SAMMAccept","SAMMUnit", "RRIEnable","RRIAmplifier", "DriverValveBLDisconnect","DriverValveTLDisconnect","EPK","EmergencyBrakeValve","UAVA","UAVAC", - "GV" + "GV", + "R_ASNPOn","R_ASNPDown","R_ASNPUp","R_ASNPPath","R_ASNPMenu","IGLA1","IGLA2", } function ENT:Initialize() diff --git a/lua/metrostroi/systems/sys_igla_cbki1.lua b/lua/metrostroi/systems/sys_igla_cbki1.lua index a33340d..ff49cb4 100644 --- a/lua/metrostroi/systems/sys_igla_cbki1.lua +++ b/lua/metrostroi/systems/sys_igla_cbki1.lua @@ -420,7 +420,7 @@ else self.Error = CurTime()%0.5 > 0.25 elseif self.State == 2 then if #self.Log > 100 then table.remove(self.Log,1) end - local Standby = CurTime()-self.StandbyTimer > 60 + local Standby = CurTime()-self.StandbyTimer > (self.State2>=2 and 60 or 10) if self.State2 > 0 and Standby then self.State2 = 0 end if self.ShowTimeTimer and self.ShowTimeTimer ~= true and CurTime()-self.ShowTimeTimer > 1.5 then self.ShowTime = not self.ShowTime diff --git a/models/metrostroi_train/81-710/710_asotp.dx80.vtx b/models/metrostroi_train/81-710/710_asotp.dx80.vtx deleted file mode 100644 index b76b27e..0000000 --- a/models/metrostroi_train/81-710/710_asotp.dx80.vtx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0790d3f0c2fe9a33d7be967d004646cae539047d65f86d5f787e787a132b178 -size 61193 diff --git a/models/metrostroi_train/81-710/710_asotp.dx90.vtx b/models/metrostroi_train/81-710/710_asotp.dx90.vtx deleted file mode 100644 index c626899..0000000 --- a/models/metrostroi_train/81-710/710_asotp.dx90.vtx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1a91ecfab0a28c1435524cef145b1029e3c07b5ab61cb0caf26a183a8712853f -size 61193 diff --git a/models/metrostroi_train/81-710/710_asotp.mdl b/models/metrostroi_train/81-710/710_asotp.mdl deleted file mode 100644 index c7021f5..0000000 --- a/models/metrostroi_train/81-710/710_asotp.mdl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec290dfbcd313325037d180e6e1457ed20e277feec6ded3ffba367d757bcab18 -size 5940 diff --git a/models/metrostroi_train/81-710/710_asotp.sw.vtx b/models/metrostroi_train/81-710/710_asotp.sw.vtx deleted file mode 100644 index 9a72b2d..0000000 --- a/models/metrostroi_train/81-710/710_asotp.sw.vtx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2db09059a20210fbc220d773836507acdf755fbf3e90769218853de8c1cc6942 -size 61105 diff --git a/models/metrostroi_train/81-710/710_asotp.vvd b/models/metrostroi_train/81-710/710_asotp.vvd deleted file mode 100644 index 661991f..0000000 --- a/models/metrostroi_train/81-710/710_asotp.vvd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:854372460b11c67a16934ddac670ee243dd66163c0dc885aebb6d7471bfc33f9 -size 260160 From cd43f78a247be2db44033da689091bf4eb00fd1a Mon Sep 17 00:00:00 2001 From: Ilya Krasnow Date: Sun, 10 Apr 2022 01:44:10 +0300 Subject: [PATCH 2/5] Update sys_igla_cbki1.lua --- lua/metrostroi/systems/sys_igla_cbki1.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/metrostroi/systems/sys_igla_cbki1.lua b/lua/metrostroi/systems/sys_igla_cbki1.lua index ff49cb4..4c8b48c 100644 --- a/lua/metrostroi/systems/sys_igla_cbki1.lua +++ b/lua/metrostroi/systems/sys_igla_cbki1.lua @@ -420,7 +420,7 @@ else self.Error = CurTime()%0.5 > 0.25 elseif self.State == 2 then if #self.Log > 100 then table.remove(self.Log,1) end - local Standby = CurTime()-self.StandbyTimer > (self.State2>=2 and 60 or 10) + local Standby = CurTime()-self.StandbyTimer > (self.State2==3 and 60 or 10) if self.State2 > 0 and Standby then self.State2 = 0 end if self.ShowTimeTimer and self.ShowTimeTimer ~= true and CurTime()-self.ShowTimeTimer > 1.5 then self.ShowTime = not self.ShowTime From 72f8718009a40ab86ecb9533c7fb05586e3b06e9 Mon Sep 17 00:00:00 2001 From: Ilya Krasnow Date: Sun, 10 Apr 2022 03:02:40 +0300 Subject: [PATCH 3/5] Update train_spawner.lua --- lua/weapons/gmod_tool/stools/train_spawner.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/weapons/gmod_tool/stools/train_spawner.lua b/lua/weapons/gmod_tool/stools/train_spawner.lua index 6571ce2..2ec100a 100644 --- a/lua/weapons/gmod_tool/stools/train_spawner.lua +++ b/lua/weapons/gmod_tool/stools/train_spawner.lua @@ -504,6 +504,7 @@ function TOOL:RightClick(trace) for k,v in pairs(ent.CustomSpawnerUpdates) do if k ~= "BaseClass" then v(ent) end end hook.Run("MetrostroiSpawnerUpdate",ent,self.Settings) ent:UpdateTextures() + ent._Settings = self.Settings table.insert(trains,ent) if self.Train.Spawner.postfunc then self.Train.Spawner.postfunc(trains,self.Settings.WagNum) end end From 9f0c13563175d6089fa7502d3db38421583f7842 Mon Sep 17 00:00:00 2001 From: Ilya Krasnow Date: Sun, 10 Apr 2022 04:12:47 +0300 Subject: [PATCH 4/5] Additional func asnp --- lua/metrostroi/systems/sys_81_71_asnp.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lua/metrostroi/systems/sys_81_71_asnp.lua b/lua/metrostroi/systems/sys_81_71_asnp.lua index 90a22f9..ef5d39b 100644 --- a/lua/metrostroi/systems/sys_81_71_asnp.lua +++ b/lua/metrostroi/systems/sys_81_71_asnp.lua @@ -245,6 +245,12 @@ if CLIENT then self:PrintText(0,1,Arrived and "Отпр." or "Приб.") end if State == 7 then + if Train:GetNW2Bool("ASNP:StopMessage",false) then + self:PrintText(3,0,"ПЕРЕД ОТПРАВЛЕНИЕМ") + self:PrintText(0,1,"НАЖМИ КНОПКУ ОБЪЯВИТЬ") + return + end + local Line = Train:GetNW2Int("ASNP:Line",1) local ltbl = stbl[Line] @@ -692,6 +698,7 @@ function TRAIN_SYSTEM:Trigger(name,value) self:Zero() end self:Play(self.Arrived) + self.StopMessage = false self.PlayNextArmed = true end end @@ -767,6 +774,17 @@ function TRAIN_SYSTEM:Think() Train:SetNW2Int("ASNP:FirstStation",self.FirstStation) Train:SetNW2Int("ASNP:LastStation",self.LastStation) Train:SetNW2Bool("ASNP:Path",self.Path) + Train:SetNW2Bool("ASNP:StopMessage",self.StopMessage) + + if self.State>1 and self.State~=7 then + self.StateTime = self.StateTime or CurTime()+10 + if self.StateTime and CurTime()>self.StateTime then + for i=self.State,6 do + self:Trigger("R_ASNPMenu",true) + end + self.StateTime = false + end + end Train:SetNW2Bool("ASNP:Station",self.Station) Train:SetNW2Bool("ASNP:Arrived",self.Arrived) From 54714f653f85f321eef40982d722437555ee03cc Mon Sep 17 00:00:00 2001 From: Ilya Krasnow Date: Sun, 10 Apr 2022 04:30:58 +0300 Subject: [PATCH 5/5] Fixes --- lua/entities/gmod_subway_em509/init.lua | 1 - lua/entities/gmod_subway_ezh/init.lua | 2 +- lua/entities/gmod_subway_ezh3/init.lua | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/entities/gmod_subway_em509/init.lua b/lua/entities/gmod_subway_em509/init.lua index f609d6f..f5b476e 100644 --- a/lua/entities/gmod_subway_em509/init.lua +++ b/lua/entities/gmod_subway_em509/init.lua @@ -8,7 +8,6 @@ ENT.BogeyDistance = 650 -- Needed for gm trainspawner ENT.SyncTable = { "VB","AV","VU","VU1","VU2","VU3","RST", "50V", "KU8","KU10","KU10R","KU9","KU2","KU1","KU1","KU11","KU13","KU3","KU4","KU5","UV1","KU6","KU7","KU6K","KU7K","KU14","KU15","UV1","KU16", "PanelLamp","OtklAVU","KRR","HPass", - "R_ASNPMenu","R_ASNPUp","R_ASNPDown","R_ASNPOn", "RRIEnable","RRIAmplifier", "DriverValveBLDisconnect","DriverValveTLDisconnect","EmergencyBrakeValve", "UKSDisconnect", "GV", diff --git a/lua/entities/gmod_subway_ezh/init.lua b/lua/entities/gmod_subway_ezh/init.lua index b3d00c2..617e578 100644 --- a/lua/entities/gmod_subway_ezh/init.lua +++ b/lua/entities/gmod_subway_ezh/init.lua @@ -6,7 +6,7 @@ ENT.BogeyDistance = 650 -- Needed for gm trainspawner --"DURASelectMain","DURASelectAlternate","DURAToggleChannel","DURAPowerToggle", ENT.SyncTable = { - "VB","AV","VU","VU1","VU2","VU3","DoorSelect","KU4","KU5","KU9","KU15","KU14","KU1","VAH","VAD","KU16","KU2","KU3","KU3L","KU13","KU6","KU7","KU10","KU8","KU11","KRR","OtklAVU","ARS","ALS","KVT","KB","KAH","R_UNch","R_ZS","R_G","R_Radio","R_ASNPOn","R_Program1","R_Program2","R_Program1H","R_Program2H","RC1","ALSFreq","PB","KU6K","RST","UOS", + "VB","AV","VU","VU1","VU2","VU3","DoorSelect","KU4","KU5","KU9","KU15","KU14","KU1","VAH","VAD","KU16","KU2","KU3","KU3L","KU13","KU6","KU7","KU10","KU8","KU11","KRR","OtklAVU","ARS","ALS","KVT","KB","KAH","R_UNch","R_ZS","R_G","R_Radio","R_Program1","R_Program2","R_Program1H","R_Program2H","RC1","ALSFreq","PB","KU6K","RST","UOS", "AB1","AB2", "RRIEnable","RRIAmplifier", "DriverValveBLDisconnect","DriverValveTLDisconnect","EPK","EmergencyBrakeValve","UAVA","UAVAC", diff --git a/lua/entities/gmod_subway_ezh3/init.lua b/lua/entities/gmod_subway_ezh3/init.lua index e8b24eb..441d9fa 100644 --- a/lua/entities/gmod_subway_ezh3/init.lua +++ b/lua/entities/gmod_subway_ezh3/init.lua @@ -6,7 +6,7 @@ ENT.BogeyDistance = 650 -- Needed for gm trainspawner --"DURASelectMain","DURASelectAlternate","DURAToggleChannel","DURAPowerToggle", ENT.SyncTable = { - "VB","DoorSelect","V4","V5","KU9","KU15","V1","VU14","V2","V3","V6","KU12","KU7","V10","KU8","OtklAVU","KU10","KU11","KRR","R_UNch","R_ZS","R_G","R_Radio","R_Program1","R_Program2","Ring","PB","RC1","VAH","VAD","ARS","ALS","KVT","KB","KAH","VU1","VU2","VU3","AV","VU","PLights","GLights","RST","RUM","KRR","R_ASNPOn", + "VB","DoorSelect","V4","V5","KU9","KU15","V1","VU14","V2","V3","V6","KU12","KU7","V10","KU8","OtklAVU","KU10","KU11","KRR","R_UNch","R_ZS","R_G","R_Radio","R_Program1","R_Program2","Ring","PB","RC1","VAH","VAD","ARS","ALS","KVT","KB","KAH","VU1","VU2","VU3","AV","VU","PLights","GLights","RST","RUM","KRR", "R_Program1H","R_Program2H", "SAMMSchemeOff","SAMMStart","SAMMReset","SAMMOn","SAMMBlok","SAMMX2","SAMMAhead","SAMMAccept","SAMMUnit", "RRIEnable","RRIAmplifier",