From 2b5cc47ae85b87aa831b1e1e117e262e4e96a64d Mon Sep 17 00:00:00 2001 From: Ivan Gordeev <70780122+kosmik641@users.noreply.github.com> Date: Fri, 30 Jul 2021 11:47:10 +0300 Subject: [PATCH] #289 (#301) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 81-717. Убраны засветы подсветки, если у клиента не включены тени * Global change. Фикс названия переменной в конфиге лампочки * 81-718. Убраны засветы от лампочек кнопок, если у клиента не включены тени --- .../gmod_subway_81-717_lvz/cl_init.lua | 24 +++++++++---------- .../gmod_subway_81-717_mvm/cl_init.lua | 12 +++++----- lua/entities/gmod_subway_81-718/cl_init.lua | 10 ++++---- lua/metrostroi/cl_util.lua | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lua/entities/gmod_subway_81-717_lvz/cl_init.lua b/lua/entities/gmod_subway_81-717_lvz/cl_init.lua index fe09a8c..c2e945e 100644 --- a/lua/entities/gmod_subway_81-717_lvz/cl_init.lua +++ b/lua/entities/gmod_subway_81-717_lvz/cl_init.lua @@ -2898,27 +2898,27 @@ ENT.Lights = { [32] = { "light", Vector(455 , 0, 52), Angle(0,0,0), Color(255,220,180), brightness = 0.2, scale = 2.5, texture = "sprites/light_glow02", changable = true, size = 2}, -- Manometers - [40] = { "headlight",Vector(451.9,-13.5,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062) ,Color(255,130,25),farz = 8,nearz = 2,shadows = 1,brightness = 1,fov = 145, hidden = "Controller_body" }, - [41] = { "headlight",Vector(451.8,-21,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062),Color(255,130,25),farz = 8,nearz = 2,shadows = 1,brightness = 1,fov = 140, hidden = "Controller_body" }, - [42] = { "headlight",Vector(450.3,13.1,-4.4+5.35),Angle(-136.613632-33,-95.636734-28,137.434570),Color(255,130,25),farz = 8,nearz = 2,shadows = 0,brightness = 1.5,fov = 120, hidden = "Controller_body" }, + [40] = { "headlight",Vector(451.9,-13.5,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062) ,Color(255,130,25),farz = 7,nearz = 2,shadows = 1,brightness = 1,fov = 145, hidden = "Controller_body" }, + [41] = { "headlight",Vector(451.8,-21,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062),Color(255,130,25),farz = 7,nearz = 2,shadows = 1,brightness = 1,fov = 140, hidden = "Controller_body" }, + [42] = { "headlight",Vector(450.3,13.1,-4.4+5.35),Angle(-136.613632-33,-95.636734-28,137.434570),Color(255,130,25),farz = 7,nearz = 2,shadows = 0,brightness = 1.5,fov = 120, hidden = "Controller_body" }, -- Voltmeter - [44] = { "headlight",Vector(450.273468,-32.306019,13.236823),Angle(-18.000000,25.541767,-90.600349),Color(255,130,25),farz = 10,nearz = 2,shadows = 1,brightness = 1,fov = 100, hidden = "Controller_body" }, - [45] = { "headlight",Vector(450.273468,-32.306019,18.236823),Angle(-12.000000,25.541767,-90.600349),Color(255,130,25),farz = 10,nearz = 2,shadows = 1,brightness = 1,fov = 100, hidden = "Controller_body" }, + [44] = { "headlight",Vector(450.273468,-32.306019,13.236823),Angle(-18.000000,25.541767,-90.600349),Color(255,130,25),farz = 5.05,nearz = 2,shadows = 1,brightness = 1,fov = 100, hidden = "Controller_body" }, + [45] = { "headlight",Vector(450.273468,-32.306019,18.236823),Angle(-12.000000,25.541767,-90.600349),Color(255,130,25),farz = 5.05,nearz = 2,shadows = 1,brightness = 1,fov = 100, hidden = "Controller_body" }, - [46] = { "headlight",Vector(452,-32.2,12+3.5),Angle(60,-30,180),Color(255,130,25),farz = 8,nearz = 2,shadows = 0,brightness = 1,fov = 130, hidden = "Controller_body" }, - [47] = { "headlight",Vector(454.3,-28.3,12+3.5),Angle(60,-30,180),Color(255,130,25),farz = 8,nearz = 2,shadows = 0,brightness = 1,fov = 130, hidden = "Controller_body" }, + [46] = { "headlight",Vector(452,-32.2,12+3.5),Angle(60,-30,180),Color(255,130,25),farz = 4,nearz = 2,shadows = 0,brightness = 1,fov = 130, hidden = "Controller_body" }, + [47] = { "headlight",Vector(454.3,-28.3,12+3.5),Angle(60,-30,180),Color(255,130,25),farz = 4,nearz = 2,shadows = 0,brightness = 1,fov = 130, hidden = "Controller_body" }, -- Manometers - [50] = { "headlight",Vector(451.9,-13.5,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062) ,Color(200,200,255),farz = 8,nearz = 2,shadows = 1,brightness = 2,fov = 145, hidden = "Controller_body" }, - [51] = { "headlight",Vector(451.8,-21,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062),Color(200,200,255),farz = 8,nearz = 2,shadows = 1,brightness = 2,fov = 140, hidden = "Controller_body" }, - [52] = { "headlight",Vector(450.3,13.1,-4.4+5.35),Angle(-136.613632-33,-95.636734-28,137.434570),Color(200,200,255),farz = 8,nearz = 2,shadows = 0,brightness = 2.5,fov = 120, hidden = "Controller_body" }, + [50] = { "headlight",Vector(451.9,-13.5,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062) ,Color(200,200,255),farz = 7,nearz = 2,shadows = 1,brightness = 2,fov = 145, hidden = "Controller_body" }, + [51] = { "headlight",Vector(451.8,-21,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062),Color(200,200,255),farz = 7,nearz = 2,shadows = 1,brightness = 2,fov = 140, hidden = "Controller_body" }, + [52] = { "headlight",Vector(450.3,13.1,-4.4+5.35),Angle(-136.613632-33,-95.636734-28,137.434570),Color(200,200,255),farz = 7,nearz = 2,shadows = 0,brightness = 2.5,fov = 120, hidden = "Controller_body" }, -- Voltmeter [54] = { "headlight",Vector(450.273468,-32.306019,13.236823),Angle(-18.000000,25.541767,-90.600349),Color(200,200,255),farz = 10,nearz = 2,shadows = 1,brightness = 2,fov = 100, hidden = "Controller_body" }, [55] = { "headlight",Vector(450.273468,-32.306019,18.236823),Angle(-12.000000,25.541767,-90.600349),Color(200,200,255),farz = 10,nearz = 2,shadows = 1,brightness = 2,fov = 100, hidden = "Controller_body" }, - [56] = { "headlight",Vector(452,-32.2,12+3.5),Angle(60,-30,180),Color(200,200,255),farz = 8,nearz = 2,shadows = 0,brightness = 2,fov = 130, hidden = "Controller_body" }, - [57] = { "headlight",Vector(454.3,-28.3,12+3.5),Angle(60,-30,180),Color(200,200,255),farz = 8,nearz = 2,shadows = 0,brightness = 2,fov = 130, hidden = "Controller_body" }, + [56] = { "headlight",Vector(452,-32.2,12+3.5),Angle(60,-30,180),Color(200,200,255),farz = 4,nearz = 2,shadows = 0,brightness = 2,fov = 130, hidden = "Controller_body" }, + [57] = { "headlight",Vector(454.3,-28.3,12+3.5),Angle(60,-30,180),Color(200,200,255),farz = 4,nearz = 2,shadows = 0,brightness = 2,fov = 130, hidden = "Controller_body" }, [70] = { "headlight",Vector( 425,-56,-70),Angle(0,-90,0),Color(255,220,180),brightness = 0.3,distance = 300 ,fov=120,shadows = 1, texture="effects/flashlight/soft", hidden = "Controller_body" }, diff --git a/lua/entities/gmod_subway_81-717_mvm/cl_init.lua b/lua/entities/gmod_subway_81-717_mvm/cl_init.lua index c37500d..33979d2 100644 --- a/lua/entities/gmod_subway_81-717_mvm/cl_init.lua +++ b/lua/entities/gmod_subway_81-717_mvm/cl_init.lua @@ -2599,13 +2599,13 @@ ENT.Lights = { [4] = { "headlight", Vector(365,-51,50), Angle(50,40,-0), Color(206,135,80), hfov=80, vfov=80,farz=100,brightness = 6,shadows=1, hidden="salon"}, -- Manometers - [40] = { "headlight",Vector(451.9,-13.5,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062) ,Color(255,125,25),farz = 8,nearz = 2,shadows = 1,brightness = 1,fov = 145,hidden = "pult_mvm_classic"}, - [41] = { "headlight",Vector(451.8,-21,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062),Color(255,125,25),farz = 8,nearz = 2,shadows = 1,brightness = 1,fov = 140,hidden = "pult_mvm_classic"}, - [42] = { "headlight",Vector(450.3,13.1,-4.4+5.35),Angle(-136.613632-33,-95.636734-28,137.434570),Color(255,125,25),farz = 8,nearz = 2,shadows = 0,brightness = 1.5,fov = 120,hidden = "pult_mvm_classic"}, - [43] = { "headlight",Vector(451.9-3,3.6+1,3.35+0.5),Angle(0,-90,0),Color(255,125,25),farz = 8,nearz = 2,shadows = 0,brightness = 1.5,fov = 80,hidden = "pult_mvm_classic"}, + [40] = { "headlight",Vector(451.9,-13.5,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062) ,Color(255,125,25),farz = 7,nearz = 2,shadows = 1,brightness = 1,fov = 145,hidden = "pult_mvm_classic"}, + [41] = { "headlight",Vector(451.8,-21,-2+5.35),Angle(52.571899-15-5,-129.269775+25+15,49.853062),Color(255,125,25),farz = 7,nearz = 2,shadows = 1,brightness = 1,fov = 140,hidden = "pult_mvm_classic"}, + [42] = { "headlight",Vector(450.3,13.1,-4.4+5.35),Angle(-136.613632-33,-95.636734-28,137.434570),Color(255,125,25),farz = 7,nearz = 2,shadows = 0,brightness = 1.5,fov = 120,hidden = "pult_mvm_classic"}, + [43] = { "headlight",Vector(451.9-3,3.6+1,3.35+0.5),Angle(0,-90,0),Color(255,125,25),farz = 7,nearz = 2,shadows = 0,brightness = 1.5,fov = 80,hidden = "pult_mvm_classic"}, -- Voltmeter - [44] = { "headlight",Vector(450.273468,-32.306019,13.236823),Angle(-18.000000,25.541767,-90.600349),Color(255,145,25),farz = 10,nearz = 2,shadows = 1,brightness = 1,fov = 100,hidden = "pult_mvm_classic" }, - [45] = { "headlight",Vector(450.273468,-32.306019,18.236823),Angle(-12.000000,25.541767,-90.600349),Color(255,125,25),farz = 10,nearz = 2,shadows = 1,brightness = 1,fov = 100,hidden = "pult_mvm_classic" }, + [44] = { "headlight",Vector(450.273468,-32.306019,13.236823),Angle(-18.000000,25.541767,-90.600349),Color(255,145,25),farz = 5.05,nearz = 2,shadows = 1,brightness = 1,fov = 100,hidden = "pult_mvm_classic" }, + [45] = { "headlight",Vector(450.273468,-32.306019,18.036823),Angle(-12.000000,25.541767,-90.600349),Color(255,125,25),farz = 5.05,nearz = 2,shadows = 1,brightness = 1,fov = 100,hidden = "pult_mvm_classic" }, -- Reverse [8] = { "light",Vector(460,-45, 52), Angle(0,0,0), Color(255,50,50), brightness = 0.2, scale = 2.5, texture = "sprites/light_glow02", size=2}, diff --git a/lua/entities/gmod_subway_81-718/cl_init.lua b/lua/entities/gmod_subway_81-718/cl_init.lua index 160714d..1fe4772 100644 --- a/lua/entities/gmod_subway_81-718/cl_init.lua +++ b/lua/entities/gmod_subway_81-718/cl_init.lua @@ -309,7 +309,7 @@ ENT.ButtonMap["Main"] = { model = "models/metrostroi_train/81-502/buttons/button_717_1.mdl",vmin=1,vmax=0,z=-14, var="SB1",speed=16, lamp = {model = "models/metrostroi_train/81-717/buttons/lamp_button_2.mdl",anim=true,var="HL3",speed=6,z=2.2, - lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=16,lnear=8,lshadows=0}, + lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=5,lnear=1,lshadows=0}, sprite = {bright=0.2,size=.5,scale=0.1,z=6,color=Color(255,130,40)}, sndvol = 0.07, snd = function(val) return val and "button3_on" or "button3_off" end,sndmin = 60, sndmax = 1e3/3, sndang = Angle(-90,0,0), }}, @@ -317,7 +317,7 @@ ENT.ButtonMap["Main"] = { model = "models/metrostroi_train/81-502/buttons/button_717_1.mdl",vmin=1,vmax=0,z=-14, var="SB2",speed=16, lamp = {model = "models/metrostroi_train/81-717/buttons/lamp_button_2.mdl",anim=true,var="HL4",speed=6,z=2.2, - lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=16,lnear=8,lshadows=0}, + lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=5,lnear=1,lshadows=0}, sprite = {bright=0.2,size=.5,scale=0.1,z=6,color=Color(255,130,40)}, sndvol = 0.07, snd = function(val) return val and "button3_on" or "button3_off" end,sndmin = 60, sndmax = 1e3/3, sndang = Angle(-90,0,0), }}, @@ -344,7 +344,7 @@ ENT.ButtonMap["Main"] = { model = "models/metrostroi_train/81-502/buttons/button_717_1.mdl",vmin=1,vmax=0,z=-12, var="SB4",speed=16, lamp = {model = "models/metrostroi_train/81-717/buttons/lamp_button_2.mdl",anim=true,var="HL5",speed=6,z=2.2, - lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=16,lnear=8,lshadows=0}, + lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=5,lnear=1,lshadows=0}, sprite = {bright=0.2,size=.5,scale=0.1,z=6,color=Color(255,130,40)}, sndvol = 0.07, snd = function(val) return val and "button3_on" or "button3_off" end,sndmin = 60, sndmax = 1e3/3, sndang = Angle(-90,0,0), tooltipFunc = function(ent) return ent:GetPackedBool("HL5") and Metrostroi.GetPhrase("Train.Buttons.HL5") end @@ -472,7 +472,7 @@ ENT.ButtonMap["Main"] = { {ID = "SB13Set",x=398, y=148, radius=20, tooltip="Отключение БВА", model = { model = "models/metrostroi_train/81-502/buttons/button_717_1.mdl",vmin=1,vmax=0,z=-12, lamp = {model = "models/metrostroi_train/81-717/buttons/lamp_button_2.mdl",anim=true,var="HL6",getfunc = function(ent) return ent:GetPackedRatio("HL6") end,speed=6,z=2.2, - lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=16,lnear=8,lshadows=0}, + lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=5,lnear=1,lshadows=0}, sprite = {bright=0.2,size=.5,scale=0.1,z=6,color=Color(255,130,40)}, var="SB13",speed=16, sndvol = 0.07, snd = function(val) return val and "button3_on" or "button3_off" end,sndmin = 60, sndmax = 1e3/3, sndang = Angle(-90,0,0), @@ -492,7 +492,7 @@ ENT.ButtonMap["Main"] = { {ID = "SB16Set",x=452, y=148, radius=20, tooltip="Отключение ББЭ", model = { model = "models/metrostroi_train/81-502/buttons/button_717_1.mdl",vmin=1,vmax=0,z=-12, lamp = {model = "models/metrostroi_train/81-717/buttons/lamp_button_2.mdl",anim=true,var="HL7",speed=6,z=2.2, - lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=16,lnear=8,lshadows=0}, + lcolor=Color(255,130,40),lz = 16,lfov=160,lfar=5,lnear=1,lshadows=0}, sprite = {bright=0.2,size=.5,scale=0.1,z=6,color=Color(255,130,40)}, var="SB16",speed=16, sndvol = 0.07, snd = function(val) return val and "button3_on" or "button3_off" end,sndmin = 60, sndmax = 1e3/3, sndang = Angle(-90,0,0), diff --git a/lua/metrostroi/cl_util.lua b/lua/metrostroi/cl_util.lua index 41586c6..7ce6fbf 100644 --- a/lua/metrostroi/cl_util.lua +++ b/lua/metrostroi/cl_util.lua @@ -427,7 +427,7 @@ function Metrostroi.GenerateClientProps() self.Lights[lname] = { "headlight", Metrostroi.PositionFromPanel(id,config.pos or buttons.ID,(config.z or 0.2)+(lconfig.z or 0.2)+(lconfig.lz or 0.2),(config.x or 0)+(lconfig.x or 0)+(lconfig.lx or 0),(config.y or 0)+(lconfig.y or 0)+(lconfig.ly or 0)), Metrostroi.AngleFromPanel(id,lconfig.lang or lconfig.ang or config.ang)+Angle(90,0,0), - lconfig.lcolor,farz = lconfig.lfarz or 8,nearz = lconfig.lnearz or 1,shadows = lconfig.lshadows or 1,brightness = lconfig.lbright or 1,fov = lconfig.lfov,texture=lconfig.ltex or "effects/flashlight/soft",panellight=true, + lconfig.lcolor,farz = lconfig.lfar or 8,nearz = lconfig.lnear or 1,shadows = lconfig.lshadows or 1,brightness = lconfig.lbright or 1,fov = lconfig.lfov,texture=lconfig.ltex or "effects/flashlight/soft",panellight=true, hidden = lname, } --[[self.ClientProps[lname.."TEST"] = {