diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-01 11:29:11 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-01 11:29:11 -0400 |
| commit | 8947791ae22821974a02d34eeca73eca43cde9bd (patch) | |
| tree | abe7ba7833cf5d9d38b33fbb1faddf08c3c1efe9 | |
| parent | dc10ffe19c42aba8e365e2651c8368f5300531e9 (diff) | |
| download | gmstranded-8947791ae22821974a02d34eeca73eca43cde9bd.tar.gz gmstranded-8947791ae22821974a02d34eeca73eca43cde9bd.tar.bz2 gmstranded-8947791ae22821974a02d34eeca73eca43cde9bd.zip | |
Changed player-made items to require proper versions of their resources
| -rw-r--r-- | gamemode/client/cl_inventory.lua | 11 | ||||
| -rw-r--r-- | gamemode/craftablesystem/playermade/concrete.lua | 2 | ||||
| -rw-r--r-- | gamemode/craftablesystem/playermade/dough.lua | 4 | ||||
| -rw-r--r-- | gamemode/craftablesystem/playermade/flour.lua | 2 | ||||
| -rw-r--r-- | gamemode/craftablesystem/playermade/medicine.lua | 2 | ||||
| -rw-r--r-- | gamemode/craftablesystem/playermade/rope.lua | 2 | ||||
| -rw-r--r-- | gamemode/craftablesystem/playermade/urine.lua | 8 | ||||
| -rw-r--r-- | gamemode/craftablesystem/playermade/welder.lua | 2 |
8 files changed, 21 insertions, 12 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua index 30dd74c..815d0d9 100644 --- a/gamemode/client/cl_inventory.lua +++ b/gamemode/client/cl_inventory.lua @@ -21,6 +21,14 @@ local function createMenuFor(menu, tbl) end end +local function createTooltipTextFor(tbl) + local string = "" + for k,v in pairs(tbl) do + string = string .. (k .. " x" .. v .. "\n") + end + return string +end + local function createPanel() local frame = vgui.Create( "DFrame" ) frame:SetSize( invxsize, invysize ) @@ -59,10 +67,11 @@ local function createPanel() layout:Dock( FILL ) layout:MakeDroppable( "unique_name" ) -- Allows us to rearrange children for k,v in pairs(GMS.Combinations["Combinations"]) do - print("Combinator a " .. v.Name) + PrintTable(v) local combipanel = vgui.Create("DButton", layout) combipanel:SetSize(64,64) combipanel:SetText(v.Name) + combipanel:SetTooltip(createTooltipTextFor(v.Req)) combipanel.DoClick = function() print("I want to combine a " .. v.Name) LocalPlayer():ConCommand("gms_MakeCombination Combinations " .. v.Name) diff --git a/gamemode/craftablesystem/playermade/concrete.lua b/gamemode/craftablesystem/playermade/concrete.lua index 383c04d..a173ee3 100644 --- a/gamemode/craftablesystem/playermade/concrete.lua +++ b/gamemode/craftablesystem/playermade/concrete.lua @@ -6,7 +6,7 @@ COMBI.Description = "Concrete can be used for spawning concrete props." COMBI.Req = {} COMBI.Req["Sand"] = 5 -COMBI.Req["Water_Bottles"] = 2 +COMBI.Req["Water Bottles"] = 2 COMBI.Results = {} COMBI.Results["Concrete"] = 1 diff --git a/gamemode/craftablesystem/playermade/dough.lua b/gamemode/craftablesystem/playermade/dough.lua index 94e33cf..846a322 100644 --- a/gamemode/craftablesystem/playermade/dough.lua +++ b/gamemode/craftablesystem/playermade/dough.lua @@ -5,7 +5,7 @@ COMBI.Name = "Dough" COMBI.Description = "Dough is used for baking." COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 1 +COMBI.Req["Water Bottles"] = 1 COMBI.Req["Flour"] = 2 COMBI.Results = {} @@ -20,7 +20,7 @@ COMBI.Name = "Dough 10x" COMBI.Description = "Dough is used for baking." COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 7 +COMBI.Req["Water Bottles"] = 7 COMBI.Req["Flour"] = 15 COMBI.Results = {} diff --git a/gamemode/craftablesystem/playermade/flour.lua b/gamemode/craftablesystem/playermade/flour.lua index f72deca..4ebd77d 100644 --- a/gamemode/craftablesystem/playermade/flour.lua +++ b/gamemode/craftablesystem/playermade/flour.lua @@ -5,7 +5,7 @@ COMBI.Description = "Flour can be used for making dough." COMBI.Req = {} COMBI.Req["Stone"] = 1 -COMBI.Req["Grain_Seeds"] = 2 +COMBI.Req["Grain Seeds"] = 2 COMBI.Results = {} COMBI.Results["Flour"] = 1 diff --git a/gamemode/craftablesystem/playermade/medicine.lua b/gamemode/craftablesystem/playermade/medicine.lua index 4ad245c..223cc1c 100644 --- a/gamemode/craftablesystem/playermade/medicine.lua +++ b/gamemode/craftablesystem/playermade/medicine.lua @@ -5,7 +5,7 @@ COMBI.Description = "To restore your health." COMBI.Req = {} COMBI.Req["Herbs"] = 7 -COMBI.Req["Urine_Bottles"] = 2 +COMBI.Req["Urine Bottles"] = 2 COMBI.Results = {} COMBI.Results["Medicine"] = 5 diff --git a/gamemode/craftablesystem/playermade/rope.lua b/gamemode/craftablesystem/playermade/rope.lua index f07db29..4e6e15e 100644 --- a/gamemode/craftablesystem/playermade/rope.lua +++ b/gamemode/craftablesystem/playermade/rope.lua @@ -7,7 +7,7 @@ COMBI.Description = "Allows you to use Rope tool ( Using Rope Tool will consume COMBI.Req = {} COMBI.Req["Herbs"] = 5 COMBI.Req["Wood"] = 2 -COMBI.Req["Water_Bottles"] = 1 +COMBI.Req["Water Bottles"] = 1 COMBI.Results = {} COMBI.Results["Rope"] = 1 diff --git a/gamemode/craftablesystem/playermade/urine.lua b/gamemode/craftablesystem/playermade/urine.lua index 9c5761c..aed7d35 100644 --- a/gamemode/craftablesystem/playermade/urine.lua +++ b/gamemode/craftablesystem/playermade/urine.lua @@ -5,10 +5,10 @@ COMBI.Name = "Urine" COMBI.Description = "Drink some water and wait, used in gunpowder production." COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 2 +COMBI.Req["Water Bottles"] = 2 COMBI.Results = {} -COMBI.Results["Urine_Bottles"] = 1 +COMBI.Results["Urine Bottles"] = 1 GMS.RegisterCombi( COMBI, "Combinations" ) @@ -19,9 +19,9 @@ COMBI.Name = "Urine 10x" COMBI.Description = "Drink loads of water and wait, messy, but used in gunpowder production." COMBI.Req = {} -COMBI.Req["Water_Bottles"] = 20 +COMBI.Req["Water Bottles"] = 20 COMBI.Results = {} -COMBI.Results["Urine_Bottles"] = 10 +COMBI.Results["Urine Bottles"] = 10 GMS.RegisterCombi( COMBI, "Combinations" ) diff --git a/gamemode/craftablesystem/playermade/welder.lua b/gamemode/craftablesystem/playermade/welder.lua index cedcb97..33e1d01 100644 --- a/gamemode/craftablesystem/playermade/welder.lua +++ b/gamemode/craftablesystem/playermade/welder.lua @@ -7,7 +7,7 @@ COMBI.Description = "Allows you to use Weld Tool. You still need the Tool Gun th COMBI.Req = {} COMBI.Req[ "Wood" ] = 10 COMBI.Req[ "Stone" ] = 10 -COMBI.Req[ "Water_Bottles" ] = 1 +COMBI.Req[ "Water Bottles" ] = 1 COMBI.Results = {} COMBI.Results[ "Welder" ] = 1 |
