summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/materials/test.pngbin0 -> 424 bytes
-rw-r--r--gamemode/cl_init.lua1
-rw-r--r--gamemode/client/cl_inventory.lua81
-rw-r--r--gamemode/client/cl_syncronize.lua28
-rw-r--r--gamemode/configure_me.lua17
-rw-r--r--gamemode/init.lua1
-rw-r--r--gamemode/itemsystem/common.lua46
-rw-r--r--gamemode/itemsystem/items/anexample.lua18
-rw-r--r--gamemode/itemsystem/items/baits.lua26
-rw-r--r--gamemode/itemsystem/items/bananaseeds.lua26
-rw-r--r--gamemode/itemsystem/items/berry.lua49
-rw-r--r--gamemode/itemsystem/items/grainseeds.lua26
-rw-r--r--gamemode/itemsystem/items/herbs.lua26
-rw-r--r--gamemode/itemsystem/items/melonseeds.lua26
-rw-r--r--gamemode/itemsystem/items/orangeseeds.lua26
-rw-r--r--gamemode/itemsystem/loaditems.lua29
-rw-r--r--gamemode/processes.lua2
-rw-r--r--gamemode/server/entity_functions.lua2
-rw-r--r--gamemode/server/player_functions.lua44
-rw-r--r--gamemode/shared.lua2
20 files changed, 439 insertions, 37 deletions
diff --git a/content/materials/test.png b/content/materials/test.png
new file mode 100644
index 0000000..2a7b434
--- /dev/null
+++ b/content/materials/test.png
Binary files differ
diff --git a/gamemode/cl_init.lua b/gamemode/cl_init.lua
index 2d1cb98..776f894 100644
--- a/gamemode/cl_init.lua
+++ b/gamemode/cl_init.lua
@@ -1,6 +1,7 @@
include( "configure_me.lua")
include( "utility.lua")
includeFolder("craftablesystem",true)
+includeFolder("itemsystem",true)
includeFolder("client",true)
include( "shared.lua" )
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 9e18040..94690ac 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -1,29 +1,82 @@
print("Custom inventory loaded")
+--Some calculations to draw the inventory nicely
+local scrx = ScrW()
+local scry = ScrH()
+--Make the menu 30% of the x to the closest 64 and 100% of the y
+local invxadj = ((scrx*0.4)%64)
+local invxsize = (scrx*0.40)-invxadj-38 --no idea why the 38 works, but it does
+local invysize = scry
+
+local function createMenuFor(menu, tbl)
+ for k,v in pairs(tbl) do
+ if(isfunction(v)) then --This is a dead-end, add the menu
+ local thisoption = menu:AddOption(k,v)
+ else --Otherwise it should be a table, recursively call to create
+ local submenu = menu:AddSubMenu(k)
+ createMenuFor(submenu,v)
+ end
+ end
+end
+
local function createPanel()
local frame = vgui.Create( "DFrame" )
- frame:SetSize( 300, 300 )
+ frame:SetSize( invxsize, invysize )
frame:SetTitle( "Inventory" )
frame:MakePopup()
- frame:Center()
+ frame:SetPos(scrx-invxsize,0)
- local layout = vgui.Create( "DTileLayout", frame )
- layout:SetBaseSize( 32 ) -- Tile size
- layout:Dock( FILL )
+ local tabsheet = vgui.Create("DPropertySheet", frame)
+ tabsheet:Dock(FILL)
- //Draw a background so we can see what it's doing
- --layout:SetDrawBackground( true )
- --layout:SetBackgroundColor( Color( 0, 100, 100 ) )
+ local invtab = vgui.Create("DPanel",tabsheet)
+ tabsheet:AddSheet( "Inventory", invtab, "icon16/database.png" )
+ local equiptab = vgui.Create("DPanel",tabsheet)
+ tabsheet:AddSheet( "Equipment", equiptab, "icon16/user.png" )
+ local proptab = vgui.Create("DPanel",tabsheet)
+ tabsheet:AddSheet( "Props", proptab, "icon16/wrench.png" )
+ if(LocalPlayer():IsAdmin()) then
+ local admintab = vgui.Create("DPanel",tabsheet)
+ tabsheet:AddSheet("Admin", admintab, "icon16/bullet_star.png")
+ end
+
+ --Inventory
+ local layout = vgui.Create( "DTileLayout", invtab )
+ layout:SetBaseSize( 64 ) -- Tile size
+ layout:Dock( FILL )
layout:MakeDroppable( "unique_name" ) -- Allows us to rearrange children
+ PrintTable(Resources)
for k, v in SortedPairs( Resources ) do
- layout:Add( Label( v .. k) )
- end
- /*
- for i = 1, 32 do
- layout:Add( Label( " Label " .. i ) )
+ local selection = vgui.Create("DImageButton")
+ if(GMS.Resources[k] == nil) then --This resource is not registered!
+ selection:SetImage("vgui/avatar_default")
+ print("Resource:" .. k .. " not registed! This might be a bug!")
+ continue
+ elseif(GMS.Resources[k].Icon == nil) then
+ selection:SetImage("vgui/avatar_default")
+ print("Resource:" .. k .. " does not have an .Icon field! This might be a bug!")
+ continue
+ else
+ selection:SetImage(GMS.Resources[k].Icon)
+ end
+
+ selection:SetSize(64,64)
+ selection.DoClick = function()
+ if(GMS.Resources[k].UniqueData) then
+ print("We should expand menu to show all uniqueid's")
+ else
+ if(GMS.Resources[k].Actions == nil) then
+ print("gamemode/client/cl_inventory.lua: Looking for actions for " .. k .. " but found nil!")
+ return
+ end
+ local menu = vgui.Create("DMenu")
+ createMenuFor(menu,GMS.Resources[k].Actions)
+ menu:Open()
+ end
+ end
+ layout:Add( selection )
end
- */
end
local invpanel = nil
diff --git a/gamemode/client/cl_syncronize.lua b/gamemode/client/cl_syncronize.lua
new file mode 100644
index 0000000..32d667c
--- /dev/null
+++ b/gamemode/client/cl_syncronize.lua
@@ -0,0 +1,28 @@
+--Makes sure the player knows about things like inventory, skills, experience ect.
+
+net.Receive( "gms_SetResource", function( length, pl)
+ print("Setresources message sent from server")
+ local name = net.ReadString()
+ if(GMS.GetResourceByName(name).UniqueData) then
+ local restable = net.ReadTable()
+ PrintTable(restable)
+ if(Resources[name] == nil) then
+ Resources[name] = {}
+ end
+ table.insert(Resources[name],restable.UniqueDataID,restable)
+ else
+ if(Resources[name] == nil) then
+ Resources[name] = 0
+ end
+ print("Getting with bitcount:" .. GMS.NETINT_BITCOUNT)
+ local num = net.ReadInt(GMS.NETINT_BITCOUNT)
+ print("Resource name: " .. name)
+ print("Resource num: " .. num)
+ Resources[name] = num
+ end
+ print("Finished resource get")
+end)
+
+concommand.Add("gms_cl_printresources",function(ply,cmd,args)
+ PrintTable(Resources)
+end)
diff --git a/gamemode/configure_me.lua b/gamemode/configure_me.lua
index e52b961..86bbd89 100644
--- a/gamemode/configure_me.lua
+++ b/gamemode/configure_me.lua
@@ -9,3 +9,20 @@
//Make sure that this is the gamemode folder name
GM.GAMEMODE_FOLDER_NAME = "gmsurvival"
+
+
+if (GMS == nil) then GMS = {} end
+
+//If you're experienceing network latency, lowering this might help. If too low, might cause graphical errors on the client when displaying resources
+//max:32
+GMS.NETINT_BITCOUNT = 16
+
+//NPC's that drop loot balls
+GMS.LootableNPCs = {
+ "npc_antlion",
+ "npc_antlionguard",
+ "npc_crow",
+ "npc_seagull",
+ "npc_pigeon",
+ "npc_zombie"
+}
diff --git a/gamemode/init.lua b/gamemode/init.lua
index 6441444..eb00238 100644
--- a/gamemode/init.lua
+++ b/gamemode/init.lua
@@ -8,6 +8,7 @@ AddCSLuaFolder("itemsystem",true)
includeFolder("server",false)
includeFolder("craftablesystem",true)
includeFolder("itemsystem",true)
+AddCSLuaFile( "configure_me.lua" )
-- Send clientside files
diff --git a/gamemode/itemsystem/common.lua b/gamemode/itemsystem/common.lua
new file mode 100644
index 0000000..f7d6c72
--- /dev/null
+++ b/gamemode/itemsystem/common.lua
@@ -0,0 +1,46 @@
+--This file holds a bunch of common functions that happen in items. They're seperated out here so that they're easy to change if there's a bug somewhere.
+
+--Freezes the player, creates the loading bar, and calls ondone when the timer is up.
+function startProcessGeneric(player, string, time, ondone)
+ if(player.InProcess) then
+ self.Owner:SendMessage("You can't do that much at once!", 3, Color(255, 255, 255, 255))
+ return
+ end
+ player.InProcess = true
+ player:Freeze(true)
+ player:MakeProcessBar( string, time, false )
+ timer.Create( "process", time, 1, function()
+ player:Freeze(false)
+ player.InProcess = false
+ player:StopProcessBar()
+ ondone()
+ end)
+end
+
+if(SERVER) then
+ util.AddNetworkString( "gms_dropresources" )
+end
+function genericDropResource(player, resource, ammount)
+ if(CLIENT) then
+ net.Start("gms_dropresources")
+ net.WriteString(resource)
+ net.WriteInt(ammount,GMS.NETINT_BITCOUNT)
+ net.SendToServer()
+ end
+ if(SERVER) then
+ if(player.Resources[resource] <= ammount) then
+ player:SendMessage("You don't have that many to drop!", 3, Color(255, 255, 255, 255))
+ return
+ end
+ local res = ply:GetResource( Type )
+
+ if ( ammount > res ) then
+ ammount = res
+ end
+ ply:DropResource( Type, int )
+ ply:DecResource( Type, int )
+ end
+end
+net.Receive( "gms_dropresources", function(len,pl)
+ genericDropResource(pl,net.ReadString(),net.ReadInt(GMS.NETINT_BITCOUNT))
+end)
diff --git a/gamemode/itemsystem/items/anexample.lua b/gamemode/itemsystem/items/anexample.lua
new file mode 100644
index 0000000..19cdbd7
--- /dev/null
+++ b/gamemode/itemsystem/items/anexample.lua
@@ -0,0 +1,18 @@
+--This file is to help developers add new items to the game
+
+ITEM = {}
+
+--The name of this item
+ITEM.Name = "An Example"
+
+--A description that shows up when hovering over the item in the inventory
+ITEM.Description = "Why did I even write this? No one will ever read it!"
+
+--The icon that this item users, relative to the gmsurvival/content/materials directory
+ITEM.Icon = "test.png"
+
+--If this item has "unique data", for example batteries that run out of charge
+ITEM.UniqueData = false
+
+--Be sure to register when everything is said and done!
+GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/items/baits.lua b/gamemode/itemsystem/items/baits.lua
new file mode 100644
index 0000000..47bf1d0
--- /dev/null
+++ b/gamemode/itemsystem/items/baits.lua
@@ -0,0 +1,26 @@
+ITEM = {}
+
+ITEM.Name = "Baits"
+ITEM.Description = "Something you can plant!"
+ITEM.Icon = "test.png"
+ITEM.UniqueData = false
+
+local drop1 = function(player)
+ print("Drop 1 called")
+end
+
+local dropall = function(player)
+ print("Drop all called")
+end
+
+local dropx = function(player)
+ print("Drop x called")
+end
+
+ITEM.Actions = {}
+ITEM.Actions["Drop"] = {}
+ITEM.Actions["Drop"]["Drop 1"] = drop1
+ITEM.Actions["Drop"]["Drop all"] = dropall
+ITEM.Actions["Drop"]["Drop X"] = dropx
+
+GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/items/bananaseeds.lua b/gamemode/itemsystem/items/bananaseeds.lua
new file mode 100644
index 0000000..358ed63
--- /dev/null
+++ b/gamemode/itemsystem/items/bananaseeds.lua
@@ -0,0 +1,26 @@
+ITEM = {}
+
+ITEM.Name = "Banana Seeds"
+ITEM.Description = "Something you can plant!"
+ITEM.Icon = "test.png"
+ITEM.UniqueData = false
+
+local drop1 = function(player)
+ print("Drop 1 called")
+end
+
+local dropall = function(player)
+ print("Drop all called")
+end
+
+local dropx = function(player)
+ print("Drop x called")
+end
+
+ITEM.Actions = {}
+ITEM.Actions["Drop"] = {}
+ITEM.Actions["Drop"]["Drop 1"] = drop1
+ITEM.Actions["Drop"]["Drop all"] = dropall
+ITEM.Actions["Drop"]["Drop X"] = dropx
+
+GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/items/berry.lua b/gamemode/itemsystem/items/berry.lua
index 610147f..2021ffd 100644
--- a/gamemode/itemsystem/items/berry.lua
+++ b/gamemode/itemsystem/items/berry.lua
@@ -1,6 +1,53 @@
ITEM = {}
-ITEM.Name = "Berry"
+ITEM.Name = "Berries"
ITEM.Description = "A delicious edible!"
+ITEM.Icon = "test.png"
+ITEM.UniqueData = false
+
+if(SERVER) then
+ util.AddNetworkString( "gms_eatberry" )
+end
+
+local eat = function(ln, player)
+ if(CLIENT) then
+ net.Start("gms_eatberry")
+ net.SendToServer()
+ end
+ if(SERVER) then
+ if(player.Resources[ITEM.Name] <= 0) then
+ player:SendMessage( "You don't have enough to do that!", 3, Color( 10, 200, 10, 255 ) )
+ return
+ end
+ startProcessGeneric(player,"Eating some berries",3,function()
+ player:DecResource( "Berries", 1 )
+ player:SendMessage( "You're a little less hungry and thirsty now.", 3, Color( 10, 200, 10, 255 ) )
+ --Set hunger and thirst
+ player:SetFood(math.Clamp(player.Hunger+100,0,1000))
+ player:SetThirst(math.Clamp(player.Thirst+100,0,1000))
+ end)
+ end
+end
+net.Receive( "gms_eatberry", eat)
+
+local drop1 = function(player)
+ genericDropResource(player,ITEM.Name,1)
+end
+
+local dropall = function(player)
+ genericDropResource(player,ITEM.Name,9999)
+end
+
+local dropx = function(player)
+ print("Drop x called")
+end
+
+ITEM.Actions = {}
+ITEM.Actions["EatBerry"] = eat
+
+ITEM.Actions["Drop"] = {}
+ITEM.Actions["Drop"]["Drop 1"] = drop1
+ITEM.Actions["Drop"]["Drop all"] = dropall
+ITEM.Actions["Drop"]["Drop X"] = dropx
GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/items/grainseeds.lua b/gamemode/itemsystem/items/grainseeds.lua
new file mode 100644
index 0000000..9b22a0b
--- /dev/null
+++ b/gamemode/itemsystem/items/grainseeds.lua
@@ -0,0 +1,26 @@
+ITEM = {}
+
+ITEM.Name = "Grain Seeds"
+ITEM.Description = "Something you can plant, or mash up into flour"
+ITEM.Icon = "test.png"
+ITEM.UniqueData = false
+
+local drop1 = function(player)
+ print("Drop 1 called")
+end
+
+local dropall = function(player)
+ print("Drop all called")
+end
+
+local dropx = function(player)
+ print("Drop x called")
+end
+
+ITEM.Actions = {}
+ITEM.Actions["Drop"] = {}
+ITEM.Actions["Drop"]["Drop 1"] = drop1
+ITEM.Actions["Drop"]["Drop all"] = dropall
+ITEM.Actions["Drop"]["Drop X"] = dropx
+
+GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/items/herbs.lua b/gamemode/itemsystem/items/herbs.lua
new file mode 100644
index 0000000..9db5417
--- /dev/null
+++ b/gamemode/itemsystem/items/herbs.lua
@@ -0,0 +1,26 @@
+ITEM = {}
+
+ITEM.Name = "Herbs"
+ITEM.Description = "Something you can plant!"
+ITEM.Icon = "test.png"
+ITEM.UniqueData = false
+
+local drop1 = function(player)
+ print("Drop 1 called")
+end
+
+local dropall = function(player)
+ print("Drop all called")
+end
+
+local dropx = function(player)
+ print("Drop x called")
+end
+
+ITEM.Actions = {}
+ITEM.Actions["Drop"] = {}
+ITEM.Actions["Drop"]["Drop 1"] = drop1
+ITEM.Actions["Drop"]["Drop all"] = dropall
+ITEM.Actions["Drop"]["Drop X"] = dropx
+
+GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/items/melonseeds.lua b/gamemode/itemsystem/items/melonseeds.lua
new file mode 100644
index 0000000..874ac46
--- /dev/null
+++ b/gamemode/itemsystem/items/melonseeds.lua
@@ -0,0 +1,26 @@
+ITEM = {}
+
+ITEM.Name = "Melon Seeds"
+ITEM.Description = "Something you can plant!"
+ITEM.Icon = "test.png"
+ITEM.UniqueData = false
+
+local drop1 = function(player)
+ print("Drop 1 called")
+end
+
+local dropall = function(player)
+ print("Drop all called")
+end
+
+local dropx = function(player)
+ print("Drop x called")
+end
+
+ITEM.Actions = {}
+ITEM.Actions["Drop"] = {}
+ITEM.Actions["Drop"]["Drop 1"] = drop1
+ITEM.Actions["Drop"]["Drop all"] = dropall
+ITEM.Actions["Drop"]["Drop X"] = dropx
+
+GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/items/orangeseeds.lua b/gamemode/itemsystem/items/orangeseeds.lua
new file mode 100644
index 0000000..33fd698
--- /dev/null
+++ b/gamemode/itemsystem/items/orangeseeds.lua
@@ -0,0 +1,26 @@
+ITEM = {}
+
+ITEM.Name = "Orange Seeds"
+ITEM.Description = "Something you can plant!"
+ITEM.Icon = "test.png"
+ITEM.UniqueData = false
+
+local drop1 = function(player)
+ print("Drop 1 called")
+end
+
+local dropall = function(player)
+ print("Drop all called")
+end
+
+local dropx = function(player)
+ print("Drop x called")
+end
+
+ITEM.Actions = {}
+ITEM.Actions["Drop"] = {}
+ITEM.Actions["Drop"]["Drop 1"] = drop1
+ITEM.Actions["Drop"]["Drop all"] = dropall
+ITEM.Actions["Drop"]["Drop X"] = dropx
+
+GMS.RegisterResource(ITEM)
diff --git a/gamemode/itemsystem/loaditems.lua b/gamemode/itemsystem/loaditems.lua
index 8f8313b..a77ffb3 100644
--- a/gamemode/itemsystem/loaditems.lua
+++ b/gamemode/itemsystem/loaditems.lua
@@ -1,14 +1,35 @@
+//Loads Loads all the items in the gamemode, these should go into gamemode/itemsystem/itmes folder.
+//Also adds a console command gms_printrestable, that prints all the (base) resource tables and their values.
+//Keep in mind that if an item has UniqueData set to true, it's instance may be different than that shown in gms_printrestable
+
GMS.Resources = {}
+
function GMS.RegisterResource( tbl )
- local sname = string.Replace(tbl.Name, " ", "_")
- print("Registering " .. sname)
- GMS.Resources[sname] = tbl
+ if(tbl == nil) then
+ print("/gamemode/itemsystem/loaditems.lua: Attempted to register a nil entity! This might be a bug!")
+ return
+ end
+ if(tbl.Name == nil) then
+ print("/gamemode/itemsystem/loaditems.lua: Attempted to register an item with no name:")
+ PrintTable(tbl)
+ print("This might be a bug!")
+ return
+ end
+ if(tbl.UniqueData) then
+ tbl.UniqueDataID = -1
+ end
+ print("Registering item:" .. tbl.Name)
+ GMS.Resources[tbl.Name] = tbl
end
-function GMS.GetItemByName(name)
+function GMS.GetResourceByName(name)
if(GMS.Resources[name]) then
return GMS.Resources[name]
else
print("Resource " .. name .. " does not exist! This might be a bug!")
end
end
+
+concommand.Add("gms_printrestable",function(ply,cmd,args)
+ PrintTable(GMS.Resources)
+end)
diff --git a/gamemode/processes.lua b/gamemode/processes.lua
index b75db3b..4b7fc15 100644
--- a/gamemode/processes.lua
+++ b/gamemode/processes.lua
@@ -218,7 +218,7 @@ function PROCESS:OnStop()
local res = self.Results[math.random( 1, #self.Results )]
local amount = math.random( 1, 3 )
- self.Owner:IncResource( string.gsub( res, " ", "_" ), amount )
+ self.Owner:IncResource( res , amount )
self.Owner:IncXP( "Harvesting", math.Clamp( math.Round( 50 / self.Owner:GetSkill( "Harvesting" ) ), 1, 1000 ) )
self.Owner:SendMessage( res .. " ( " .. amount .. "x )", 3, Color( 10, 200, 10, 255 ) )
self.Owner:EmitSound( Sound( "items/ammo_pickup.wav" ) )
diff --git a/gamemode/server/entity_functions.lua b/gamemode/server/entity_functions.lua
index e5b91c1..4894ad1 100644
--- a/gamemode/server/entity_functions.lua
+++ b/gamemode/server/entity_functions.lua
@@ -53,8 +53,6 @@ function EntityMeta:DropToGround()
self:SetPos( tr.HitPos )
end
-GMS.LootableNPCs = { "npc_antlion", "npc_antlionguard", "npc_crow", "npc_seagull", "npc_pigeon", "npc_zombie" }
-
function EntityMeta:IsLootableNPC()
return table.HasValue( GMS.LootableNPCs, self:GetClass() )
end
diff --git a/gamemode/server/player_functions.lua b/gamemode/server/player_functions.lua
index b4cc7c0..b335553 100644
--- a/gamemode/server/player_functions.lua
+++ b/gamemode/server/player_functions.lua
@@ -140,17 +140,39 @@ function PlayerMeta:DecXP( skill, int )
umsg.End()
end
+util.AddNetworkString( "gms_SetResource" )
+
function PlayerMeta:SetResource( resource, int )
- resource = string.Capitalize( resource )
- if ( !self.Resources[resource] ) then self.Resources[resource] = 0 end
+ print("SetResource called!")
+ if(isstring(resource)) then
+ resource = GMS.GetResourceByName(resource)
+ end
+ PrintTable(resource)
+ print(int)
+ if ( !self.Resources[resource] ) then self.Resources[resource] = 0 end
self.Resources[resource] = int
- umsg.Start( "gms_SetResource", self )
- umsg.String( resource )
- umsg.Short( int )
- umsg.End()
+ if(net.Start("gms_SetResource",false)) then
+ net.WriteString(resource.Name)
+ if(resource.UniqueData) then
+ if(self.Resources[resource.Name] == nil) then
+ self.Resources[resource.Name] = {}
+ end
+ table.insert(self.Resources[resource.Name],resource.UniqueDataID,resource)
+ net.WriteTable(resource)
+ else
+ if(self.Resources[resource.Name] == nil) then
+ self.Resources[resource.Name] = 0
+ end
+ self.Resources[resource.Name] = int
+ net.WriteInt(int, GMS.NETINT_BITCOUNT)
+ end
+ net.Send(self)
+ else
+ print("Error! could not send resource change data to client: " .. self:GetName())
+ end
end
function PlayerMeta:GetResource( resource )
@@ -173,10 +195,7 @@ function PlayerMeta:IncResource( resource, int )
self.Resources[resource] = self.Resources[resource] + int
end
- umsg.Start( "gms_SetResource", self )
- umsg.String( resource )
- umsg.Short( self:GetResource( resource ) )
- umsg.End()
+ self:SetResource(resource, self:GetResource( resource ))
end
function PlayerMeta:DecResource( resource, int )
@@ -192,10 +211,7 @@ function PlayerMeta:DecResource( resource, int )
self:UpdateNeeds()
end
- umsg.Start( "gms_SetResource", self )
- umsg.String( resource )
- umsg.Short( self:GetResource( resource ) )
- umsg.End()
+ self:SetResource(resource, self:GetResource( resource ))
end
function PlayerMeta:GetAllResources()
diff --git a/gamemode/shared.lua b/gamemode/shared.lua
index adde491..2cc0234 100644
--- a/gamemode/shared.lua
+++ b/gamemode/shared.lua
@@ -15,10 +15,10 @@ team.SetUp( 6, "Scavengers", Color( 8, 255, 0, 255 ) )
GMS = GMS or {}
GM.GAMEMODE_FOLDER_NAME = "gmstranded"
+include( "configure_me.lua" )
include( "utility.lua")
includeFolder("craftablesystem",true)
-
include( "spp/sh_spp.lua" )
include( "time_weather.lua" )