summaryrefslogtreecommitdiff
path: root/gamemode
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode')
-rw-r--r--gamemode/client/cl_inventory.lua31
-rw-r--r--gamemode/craftablesystem/misc/stove.lua14
2 files changed, 38 insertions, 7 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 730ce78..076dd2a 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -539,17 +539,24 @@ function PANEL:Init()
end
return MatSelectPanel
end
+ self.PanelProxy.ClearControls = function()
+ self.PanelProxy.cp:Clear()
+ end
+ self.PanelProxy.AddItem = function(self,item)
+ print("----------AddItem called!--------------")
+ print("Adding:")
+ print(item)
+ local output = self.cp:AddItem(item)
+ print("-----------AddItem finished!-----------")
+ return output
+ end
self.PanelProxy.AddControl = function(self,type,table)
print("Adding control...")
print("Type:" .. type)
- print("Table:")
- PrintTable(table)
- print("I am:")
- PrintTable(self)
if(type == "Header") then
self.cp:ControlHelp(table.Description)
elseif(type == "Slider") then
- self.cp:NumSlider(table.Label,table.Command,table.Min,table.Max,0)
+ return self.cp:NumSlider(table.Label,table.Command,table.Min,table.Max,0)
elseif(type == "Checkbox") then
self.cp:CheckBox(table.Label,table.Command)
elseif(type == "RopeMaterial") then
@@ -585,8 +592,11 @@ function PANEL:Init()
GetConVar(colorvars["Blue"]):SetInt(t.b)
end
self.cp:AddItem(color,color_cube)
+ --[[
elseif(type == "ComboBox") then
- local DComboBox = vgui.Create( "DComboBox" )
+
+ 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
@@ -596,7 +606,9 @@ function PANEL:Init()
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 )
@@ -612,6 +624,11 @@ function PANEL:Init()
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
+ self.cp:Button(table.Label,table.Command)
else
print("I wanted to add a control, but I haven't written it yet!")
print("Type:" .. type)
@@ -1121,7 +1138,7 @@ function PANEL:Init()
end
function PANEL:Paint()
-
+
draw.RoundedBox(0,0,0,self:GetWide(), self:GetTall(), Color(48,48,48,125))
end
diff --git a/gamemode/craftablesystem/misc/stove.lua b/gamemode/craftablesystem/misc/stove.lua
index 3bf38f3..c93c433 100644
--- a/gamemode/craftablesystem/misc/stove.lua
+++ b/gamemode/craftablesystem/misc/stove.lua
@@ -15,6 +15,20 @@ COMBI.BuildSiteModel = "models/props_c17/furniturestove001a.mdl"
GMS.RegisterCombi( COMBI, "Structures" )
+/* Campfire */
+COMBI.Name = "Campfire"
+COMBI.Description = "A fire you can cook things over!"
+
+COMBI.Req = {}
+COMBI.Req["Stone"] = 10
+COMBI.Req["Wood"] = 15
+
+COMBI.Results = "gms_campfire"
+COMBI.Texture = "gms_icons/gms_stove.png"
+COMBI.BuildSiteModel = "models/XQM/Rails/gumball_1.mdl"
+
+GMS.RegisterCombi( COMBI, "Structures" )
+
/* Casserole */
local COMBI = {}