summaryrefslogtreecommitdiff
path: root/gamemode/client
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/client')
-rw-r--r--gamemode/client/cl_inventory.lua63
1 files changed, 4 insertions, 59 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 598ca97..c4e1134 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -10,58 +10,38 @@ local dPanelHeight = 400
local curDisplay = nil
local buttons = {
-
-
{
-
txt = "Inventory",
admin = false,
-
},
{
-
txt = "Structures",
admin = false,
-
},
{
-
txt = "Combinations",
admin = false,
-
},
{
-
txt = "Equipment",
admin = false,
-
},
{
-
txt = "Props",
admin = false,
-
},
{
-
txt = "Tools",
admin = false,
-
},
{
-
txt = "Prop Protection",
admin = false,
-
},
{
-
txt = "Admin",
admin = true,
-
},
-
-
}
surface.CreateFont( "gmNameFont", {
@@ -512,10 +492,7 @@ local PANEL = {}
function PANEL:Init()
self.ActiveTool = "Weld"
self.Tools = vgui.Create( "DListLayout", self )
- --self.Tools:EnableVerticalScrollbar( true )
self.Tools:SetSize(dPanelWidth/3, dPanelWidth)
- --self.Tools:SetSpacing( 5 )
- --self.Tools:SetPadding( 5 )
function self.Tools:Paint()
draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 75, 75, 75 ) )
end
@@ -593,39 +570,6 @@ function PANEL:Init()
GetConVar(colorvars["Blue"]):SetInt(t.b)
end
self.cp:AddItem(color,color_cube)
- --[[
- elseif(type == "ComboBox") then
-
- print("Createing combo box!")
- local DComboBox, label = self.cp:ComboBox(table.Label, nil)
- for k,v in pairs(table.Options) do
- DComboBox:AddChoice(k,v)
- end
- DComboBox.OnSelect = function( panel, index, value )
- for k,v in pairs(table.Options[value]) do
- print("Setting " .. k .. " to " .. v)
- GetConVar(k):SetInt(v)
- end
- end
- print("Adding combo box to control")
- self.cp:AddItem(DComboBox)
- print("Done!")
- elseif(type == "PropSelect") then
- local grid = vgui.Create( "DGrid" )
- grid:SetPos( 10, 30 )
- grid:SetCols( 5 )
- grid:SetColWide( 36 )
- for k,v in pairs(table.Models) do
- local icon = vgui.Create( "DModelPanel", Panel )
- icon:SetSize( 32, 32 )
- icon:SetModel( k )
- icon.DoClick = function()
- GetConVar(table.ConVar):SetString(k)
- end
- grid:AddItem(icon)
- end
- self.cp:AddItem(grid)
- ]]
elseif(type == "Label") then
self.cp:AddItem(vgui.Create("DLabel"):SetText(table.Text))
elseif(type == "Button") then
@@ -653,10 +597,11 @@ function PANEL:Init()
for k,v in pairs(spawnmenu.GetTools()[1]["Items"]) do
for i,j in pairs(v) do
if(istable(j)) then
- local isprohibitied = false
- for l,m in pairs(GMS.ProhibitedStools) do
+ local isprohibitied = true
+ for l,m in pairs(GMS.AllowedStools) do
+ print("Checking: " .. j.ItemName)
if(j.ItemName == m) then
- isprohibitied = true
+ isprohibitied = false
end
end
if(!isprohibitied) then