summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-08 19:50:07 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-08 19:50:07 -0400
commitf529fc47c87ce254aad2c0506259b9d7521d3512 (patch)
treeba832069036110de65e4a69a95241a299a6da9a2
parent232ee552f30a37d1b0080f4aa4de43d7639971a5 (diff)
parent5a7639b486aa9f672813fec32510e57a554d750b (diff)
downloadgmstranded-f529fc47c87ce254aad2c0506259b9d7521d3512.tar.gz
gmstranded-f529fc47c87ce254aad2c0506259b9d7521d3512.tar.bz2
gmstranded-f529fc47c87ce254aad2c0506259b9d7521d3512.zip
Merge branch 'master' of ssh://cogarr.net:43/home/git/gmstranded
-rw-r--r--content/materials/items/saltpetre.pngbin0 -> 6172 bytes
-rw-r--r--content/materials/items/sharksoup.pngbin3982 -> 0 bytes
-rw-r--r--content/materials/items/sulphur.png (renamed from content/materials/items/sulpher.png)bin7773 -> 7773 bytes
-rw-r--r--content/materials/items/wood_teak.png (renamed from content/materials/items/wook_teak.png)bin5265 -> 5265 bytes
-rw-r--r--gamemode/cl_panels.lua48
-rw-r--r--gamemode/client/cl_inventory.lua13
-rw-r--r--gamemode/craftablesystem/gunlabs/pistolgunlab.lua2
-rw-r--r--gamemode/itemsystem/items/deaddroppable.lua3
-rw-r--r--gamemode/itemsystem/items/medicine.lua8
9 files changed, 61 insertions, 13 deletions
diff --git a/content/materials/items/saltpetre.png b/content/materials/items/saltpetre.png
new file mode 100644
index 0000000..1faf4be
--- /dev/null
+++ b/content/materials/items/saltpetre.png
Binary files differ
diff --git a/content/materials/items/sharksoup.png b/content/materials/items/sharksoup.png
deleted file mode 100644
index ee259f3..0000000
--- a/content/materials/items/sharksoup.png
+++ /dev/null
Binary files differ
diff --git a/content/materials/items/sulpher.png b/content/materials/items/sulphur.png
index 06573cc..06573cc 100644
--- a/content/materials/items/sulpher.png
+++ b/content/materials/items/sulphur.png
Binary files differ
diff --git a/content/materials/items/wook_teak.png b/content/materials/items/wood_teak.png
index 9273638..9273638 100644
--- a/content/materials/items/wook_teak.png
+++ b/content/materials/items/wood_teak.png
Binary files differ
diff --git a/gamemode/cl_panels.lua b/gamemode/cl_panels.lua
index 43e133a..33f32e5 100644
--- a/gamemode/cl_panels.lua
+++ b/gamemode/cl_panels.lua
@@ -925,8 +925,8 @@ function PANEL:Paint( w, h )
surface.SetDrawColor( 200, 200, 200, 255 )
//surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() )*/
- surface.SetMaterial( self.BGTexID )
- surface.DrawTexturedRect( -( 128 - w ) / 2, -( 128 - h ) / 2, 128, 128 )
+ //surface.SetMaterial( self.BGTexID )
+ //surface.DrawTexturedRect( -( 128 - w ) / 2, -( 128 - h ) / 2, 128, 128 )
surface.SetDrawColor( StrandedBorderColor )
surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
@@ -955,8 +955,8 @@ function PANEL:Paint( w, h )
surface.SetDrawColor( 255, 255, 255, 255 )
- surface.SetMaterial( self.TexID )
- surface.DrawTexturedRect( -( 128 - w ) / 2, -( 128 - h ) / 2, 128, 128 )
+ //surface.SetMaterial( self.TexID )
+ //surface.DrawTexturedRect( -( 128 - w ) / 2, -( 128 - h ) / 2, 128, 128 )
local y = self:GetTall() / 2 + self:GetTall() / 4
draw.SimpleTextOutlined( self.CombiTable.Name, "DefaultSmall", self:GetWide() / 2, y, Color( 255, 255, 255, 255 ), 1, 1, 0.5, Color( 100, 100, 100, 140 ) )
@@ -965,7 +965,45 @@ function PANEL:Paint( w, h )
end
function PANEL:SetInfo( name, tbl )
- if ( tbl.Texture && Material( tbl.Texture ) ) then self.TexID = Material( tbl.Texture ) end
+ //if ( tbl.Texture && Material( tbl.Texture ) ) then self.TexID = Material( tbl.Texture ) end
+
+ local img = vgui.Create("DImage", self)
+ img:SetPos(20, 10)
+ img:SetSize(self:GetWide()-40, self:GetTall()-40)
+ img:SetImage("vgui/avatar_default")
+ PrintTable(tbl)
+ if (tbl.Results != nil) then
+
+ for k,v in pairs(tbl.Results) do
+ if(GMS.Resources[k] == nil) then --This resource is not registered!
+ img:SetImage("vgui/avatar_default")
+ print("Resource:" .. k .. " not registed! This might be a bug!")
+ continue
+ elseif(GMS.Resources[k].Icon == nil) then
+ img:SetImage("vgui/avatar_default")
+ print("Resource:" .. k .. " does not have an .Icon field! This might be a bug!")
+ continue
+ else
+ img:SetImage(GMS.Resources[k].Icon)
+ end
+
+ end
+
+ elseif (tbl.FoodValue != nil) then
+ img:SetPos(0, 0)
+ img:SetSize(self:GetSize())
+ img:SetImage("items/gms_none.png")
+
+ else
+
+ img:SetPos(0, -10)
+ img:SetSize(self:GetSize())
+ img:SetImage("items/gms_weapon.png")
+
+ end
+
+ //if (GMS.GetResourceByName(name).Icon != nil) then img:SetImage(GMS.GetResourceByName(name).Icon) else img:SetImage("vgui/avatar_default") end
+
self.Combi = name
self.CombiTable = tbl
end
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 73df961..c779384 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -413,8 +413,17 @@ function PANEL:Init()
// for some reason has stone twice? v
for j,k in SortedPairs(v.Results) do
if (j != "Stone") then
- icon = GMS.GetResourceByName(j).Icon
- if (icon != nil && icon != "test.png") then img:SetImage(icon) else img:SetImage("vgui/avatar_default") end
+ if(GMS.Resources[j] == nil) then --This resource is not registered!
+ img:SetImage("vgui/avatar_default")
+ print("Resource:" .. j .. " not registed! This might be a bug!")
+ continue
+ elseif(GMS.Resources[j].Icon == nil) then
+ img:SetImage("vgui/avatar_default")
+ print("Resource:" .. j .. " does not have an .Icon field! This might be a bug!")
+ continue
+ else
+ img:SetImage(GMS.Resources[j].Icon)
+ end
end
end
diff --git a/gamemode/craftablesystem/gunlabs/pistolgunlab.lua b/gamemode/craftablesystem/gunlabs/pistolgunlab.lua
index be79a1e..f336599 100644
--- a/gamemode/craftablesystem/gunlabs/pistolgunlab.lua
+++ b/gamemode/craftablesystem/gunlabs/pistolgunlab.lua
@@ -296,7 +296,7 @@ COMBI.Entity = "gms_pistolgunlab"
COMBI.Req = {}
COMBI.Req["Platinum Gunslide"] = 1
COMBI.Req["Platinum Gungrip"] = 1
-COMBI.Req["PLatinum Gunbarrel"] = 1
+COMBI.Req["Platinum Gunbarrel"] = 1
COMBI.Req["Platinum Gunmagazine"] = 1
COMBI.Req["Platinum Weapon Scope"] = 1
diff --git a/gamemode/itemsystem/items/deaddroppable.lua b/gamemode/itemsystem/items/deaddroppable.lua
index 9278e96..c820f20 100644
--- a/gamemode/itemsystem/items/deaddroppable.lua
+++ b/gamemode/itemsystem/items/deaddroppable.lua
@@ -42,6 +42,7 @@ local tbl = {
{"Resin","Something you can craft with!","items/resin.png"},
{"Rope","Something you can craft with!","items/rope.png"},
{"Salmon","Something you can craft with!","items/salmon.png"},
+ {"Saltpetre","Something you can craft with!","items/saltpetre.png"},
{"Sand","How in the world are you holding this stuff?","items/sand.png"},
{"Shark","Something you can craft with!","items/shark.png"},
{"Silver","Something you can craft with!","items/ingot_silver.png"},
@@ -51,7 +52,7 @@ local tbl = {
{"Steel Ore","Something you can craft with!","items/ore_steel.png"},
{"Stone","Something you can craft with!","items/stone.png"},
{"Strange Stone","Something you can craft with!","items/sulpher.png"},
- {"Sulpher","Watch out, it's explosive!","items/sulpher.png"},
+ {"Sulphur","Watch out, it's explosive!","items/sulphur.png"},
{"Teak","You've got wood.","items/wood_teak.png"},
{"Tech","You're blinded by SCIENCE!","items/ingot_tech.png"},
{"Tech Ore","Something you can craft with!","items/ore_tech.png"},
diff --git a/gamemode/itemsystem/items/medicine.lua b/gamemode/itemsystem/items/medicine.lua
index 1281883..405188d 100644
--- a/gamemode/itemsystem/items/medicine.lua
+++ b/gamemode/itemsystem/items/medicine.lua
@@ -11,14 +11,14 @@ if(SERVER) then
end
local client_use = function()
- net.Start("gms_eatberry")
+ net.Start("gms_usemedicine")
net.SendToServer()
end
local finisheduseing = function(player)
- self.Owner:DecResource( "Medicine", 1 )
- self.Owner:SendMessage( "You're feeling a bit better now.", 3, Color( 10, 200, 10, 255 ) )
- self.Owner:Heal( 10 )
+ player:DecResource( "Medicine", 1 )
+ player:SendMessage( "You're feeling a bit better now.", 3, Color( 10, 200, 10, 255 ) )
+ player:Heal( 10 )
end
local use_medicine = function(ln, player)