mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-04 00:52:33 +00:00
release branch init
This commit is contained in:
@@ -41,7 +41,6 @@ include("shared.lua")
|
||||
ENT.ClientProps = {}
|
||||
ENT.ButtonMap = {}
|
||||
ENT.AutoAnims = {}
|
||||
ENT.AutoAnimNames = {}
|
||||
ENT.ClientSounds = {}
|
||||
--------------------------------------------------------------------------------
|
||||
ENT.ClientPropsInitialized = false
|
||||
@@ -125,7 +124,6 @@ ENT.ButtonMap["RearDoor"] = {
|
||||
var="RearDoor",sndid="door_cab_b",
|
||||
sndvol = 1, snd = function(val) return val and "door_cab_open" or "door_cab_close" end,
|
||||
sndmin = 90, sndmax = 1e3, sndang = Angle(-90,0,0),
|
||||
noTooltip = true,
|
||||
}},
|
||||
}
|
||||
}
|
||||
@@ -137,10 +135,13 @@ ENT.ButtonMap["FrontPneumatic"] = {
|
||||
width = 800,
|
||||
height = 100,
|
||||
scale = 0.1,
|
||||
hideseat=0.2,
|
||||
hide=true,
|
||||
screenHide = true,
|
||||
|
||||
buttons = {
|
||||
{ID = "FrontBrakeLineIsolationToggle",x=000, y=0, w=400, h=100, tooltip="",var="FbI",states={"Train.Buttons.Opened","Train.Buttons.Closed"}},
|
||||
{ID = "FrontTrainLineIsolationToggle",x=400, y=0, w=400, h=100, tooltip="",var="FtI",states={"Train.Buttons.Opened","Train.Buttons.Closed"}},
|
||||
{ID = "FrontBrakeLineIsolationToggle",x=000, y=0, w=400, h=100, tooltip=""},
|
||||
{ID = "FrontTrainLineIsolationToggle",x=400, y=0, w=400, h=100, tooltip=""},
|
||||
}
|
||||
}
|
||||
ENT.ClientProps["FrontBrake"] = {--
|
||||
@@ -165,10 +166,13 @@ ENT.ButtonMap["RearPneumatic"] = {
|
||||
width = 800,
|
||||
height = 100,
|
||||
scale = 0.1,
|
||||
hideseat=0.2,
|
||||
hide=true,
|
||||
screenHide = true,
|
||||
|
||||
buttons = {
|
||||
{ID = "RearBrakeLineIsolationToggle",x=000, y=0, w=400, h=100, tooltip="",var="RbI",states={"Train.Buttons.Opened","Train.Buttons.Closed"}},
|
||||
{ID = "RearTrainLineIsolationToggle",x=400, y=0, w=400, h=100, tooltip="",var="RtI",states={"Train.Buttons.Opened","Train.Buttons.Closed"}},
|
||||
{ID = "RearBrakeLineIsolationToggle",x=000, y=0, w=400, h=100, tooltip=""},
|
||||
{ID = "RearTrainLineIsolationToggle",x=400, y=0, w=400, h=100, tooltip=""},
|
||||
}
|
||||
}
|
||||
ENT.ClientProps["RearTrain"] = {--
|
||||
@@ -198,7 +202,6 @@ ENT.ButtonMap["FrontDoor"] = {
|
||||
var="FrontDoor",sndid="door_cab_f",
|
||||
sndvol = 1, snd = function(val) return val and "door_cab_open" or "door_cab_close" end,
|
||||
sndmin = 90, sndmax = 1e3, sndang = Angle(-90,0,0),
|
||||
noTooltip = true,
|
||||
}},
|
||||
}
|
||||
}
|
||||
@@ -328,7 +331,6 @@ ENT.ButtonMap["GV"] = {
|
||||
var="GV",sndid = "gv_wrench",
|
||||
sndvol = 0.8,sndmin = 80, sndmax = 1e3/3, sndang = Angle(-90,0,0),
|
||||
snd = function(val) return val and "gv_f" or "gv_b" end,
|
||||
states={"Train.Buttons.Disconnected","Train.Buttons.On"}
|
||||
}},
|
||||
}
|
||||
}
|
||||
@@ -700,21 +702,17 @@ function ENT:Think()
|
||||
|
||||
local work = self:GetPackedBool("AnnPlay")
|
||||
for k,v in ipairs(self.AnnouncerPositions) do
|
||||
if IsValid(self.Sounds["announcer"..k]) then
|
||||
if self.Sounds["announcer"..k] and IsValid(self.Sounds["announcer"..k]) then
|
||||
self.Sounds["announcer"..k]:SetVolume(work and (v[3] or 1) or 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:OnAnnouncer(volume)
|
||||
return self:GetPackedBool("AnnPlay") and volume or 0
|
||||
end
|
||||
|
||||
function ENT:Draw()
|
||||
self.BaseClass.Draw(self)
|
||||
end
|
||||
|
||||
function ENT:DrawPost()
|
||||
function ENT:DrawPost(special)
|
||||
self.RTMaterial:SetTexture("$basetexture", self.Tickers)
|
||||
self:DrawOnPanel("Tickers",function(...)
|
||||
surface.SetMaterial(self.RTMaterial)
|
||||
|
||||
Reference in New Issue
Block a user