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

Merge pull request #363 from metrostroi-repo/#341

#341 #333
This commit is contained in:
HellReach
2021-12-28 18:08:44 +03:00
committed by GitHub
7 changed files with 9 additions and 10 deletions

View File

@@ -174,7 +174,7 @@ function Metrostroi.AddSkin(category,name,tbl)
if not texture or not texture.defaults then return end if not texture or not texture.defaults then return end
for k,v in pairs(texture.defaults) do for k,v in pairs(texture.defaults) do
local id = VGUI[k].ID local id = VGUI[k].ID
print(List:GetOptionData(List:GetSelectedID()),id,VGUI[id],v) -- print(List:GetOptionData(List:GetSelectedID()),id,VGUI[id],v)
if id and VGUI[id] then if id and VGUI[id] then
VGUI[id](v,true) VGUI[id](v,true)
end end

View File

@@ -28,7 +28,6 @@ function ENT:Initialize()
end end
function ENT:OnRemove() function ENT:OnRemove()
print(12323)
self:RemoveModels() self:RemoveModels()
--self.LightType = 0 --self.LightType = 0
--hook.Remove("PostDrawOpaqueRenderables") --hook.Remove("PostDrawOpaqueRenderables")

View File

@@ -284,7 +284,7 @@ local function EditCSEnts()
set = set..Format("\tbodygroup = %d,\n",bodygroup) set = set..Format("\tbodygroup = %d,\n",bodygroup)
end end
set = set.."}\n" set = set.."}\n"
print(set) -- print(set)
end,"Print settings","Print LUA part to clipboard and print it") end,"Print settings","Print LUA part to clipboard and print it")
PrSet:Dock(RIGHT) PrSet:Dock(RIGHT)
end end

View File

@@ -920,7 +920,7 @@ function Metrostroi.Load(name,keep_signs)
-- Create paths definition -- Create paths definition
Metrostroi.Paths = {} Metrostroi.Paths = {}
if true then return end if true then return end
print(type(TrackLoadedData)) -- print(type(TrackLoadedData))
for pathID,path in pairs(TrackLoadedData) do for pathID,path in pairs(TrackLoadedData) do
local currentPath = { id = pathID } local currentPath = { id = pathID }
Metrostroi.Paths[pathID] = currentPath Metrostroi.Paths[pathID] = currentPath
@@ -1114,7 +1114,7 @@ function Metrostroi.Load(name,keep_signs)
if auto then if auto then
for k,v in pairs(auto) do for k,v in pairs(auto) do
local ent = ents.Create("gmod_track_autodrive_plate") local ent = ents.Create("gmod_track_autodrive_plate")
print(k,v,ent) -- print(k,v,ent)
if IsValid(ent) then if IsValid(ent) then
ent:SetPos(v.Pos) ent:SetPos(v.Pos)
ent:SetAngles(v.Angles) ent:SetAngles(v.Angles)

View File

@@ -79,10 +79,10 @@ if Turbostroi and not TURBOSTROI then
if IsValid(Player(index)) then if IsValid(Player(index)) then
if value==0 then if value==0 then
Player(index):PrintMessage( HUD_PRINTCONSOLE, "--START" ) Player(index):PrintMessage( HUD_PRINTCONSOLE, "--START" )
print("--START") -- print("--START")
end end
Player(index):PrintMessage( HUD_PRINTCONSOLE, system ) Player(index):PrintMessage( HUD_PRINTCONSOLE, system )
print(system) -- print(system)
end end
end, end,
} }
@@ -155,7 +155,7 @@ if Turbostroi and not TURBOSTROI then
if not IsValid(ply) or not ply:IsSuperAdmin() then return end if not IsValid(ply) or not ply:IsSuperAdmin() then return end
local train = ply:GetTrain() local train = ply:GetTrain()
if IsValid(train) then if IsValid(train) then
print(cmd:sub(1,2),cmd:sub(3,4)) -- print(cmd:sub(1,2),cmd:sub(3,4))
SendMessage(train,6,cmd:sub(1,255),cmd:sub(256,511),ply:UserID(),0) SendMessage(train,6,cmd:sub(1,255),cmd:sub(256,511),ply:UserID(),0)
end end
end) end)

View File

@@ -59,7 +59,7 @@ else
self.Reloaded = true self.Reloaded = true
local rn = Format("%03d",self.RouteNumber) local rn = Format("%03d",self.RouteNumber)
print(self.RouteNumber) -- print(self.RouteNumber)
for i=1,2 do for i=1,2 do
if IsValid(scents["route"..i]) then if IsValid(scents["route"..i]) then
scents["route"..i]:SetSkin(rn[i]) scents["route"..i]:SetSkin(rn[i])

View File

@@ -75,7 +75,7 @@ function TRAIN_SYSTEM:Play(dep)
self:AnnQueue(math.Rand(0.0,0.2)) self:AnnQueue(math.Rand(0.0,0.2))
if self.Noise then self:AnnQueue{"noise_start",self.Noise} else self:AnnQueue("noise_end") end if self.Noise then self:AnnQueue{"noise_start",self.Noise} else self:AnnQueue("noise_end") end
self:AnnQueue{math.Rand(0.0,0.2), stbl.tone or "tone"} self:AnnQueue{math.Rand(0.0,0.2), stbl.tone or "tone"}
if lastst then self:AnnQueue{-1} end if lastst and not stbl.ignorelast then self:AnnQueue{-1} end
self:AnnQueue(msg) self:AnnQueue(msg)
self:AnnQueue{math.Rand(0.1,0.4),"noise_end","buzz_end_upo"} self:AnnQueue{math.Rand(0.1,0.4),"noise_end","buzz_end_upo"}
if self.Clicks then self:AnnQueue("click2") end if self.Clicks then self:AnnQueue("click2") end