summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-04-16 13:46:20 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-04-16 13:46:20 -0400
commit88c8acfa90a71e50104b9c64b953eae939767f20 (patch)
tree9b9fb3b066b7ef5a5c578ae04ff453796f2b7041
parentae3407fe425a908344b281bd55e54a534445f20c (diff)
downloadgmstranded-88c8acfa90a71e50104b9c64b953eae939767f20.tar.gz
gmstranded-88c8acfa90a71e50104b9c64b953eae939767f20.tar.bz2
gmstranded-88c8acfa90a71e50104b9c64b953eae939767f20.zip
Moved player-made combinations into their own file
-rw-r--r--gamemode/combinations.lua333
-rw-r--r--gamemode/craftablesystem/loadcraftables.lua28
-rw-r--r--gamemode/craftablesystem/playermade/concrete.lua14
-rw-r--r--gamemode/craftablesystem/playermade/dough.lua29
-rw-r--r--gamemode/craftablesystem/playermade/flour.lua14
-rw-r--r--gamemode/craftablesystem/playermade/medicine.lua13
-rw-r--r--gamemode/craftablesystem/playermade/rope.lua15
-rw-r--r--gamemode/craftablesystem/playermade/spice.lua15
-rw-r--r--gamemode/craftablesystem/playermade/urine.lua27
-rw-r--r--gamemode/craftablesystem/playermade/welder.lua15
-rw-r--r--gamemode/init.lua1
-rw-r--r--gamemode/utility.lua12
12 files changed, 270 insertions, 246 deletions
diff --git a/gamemode/combinations.lua b/gamemode/combinations.lua
index 9409f3c..72e4abe 100644
--- a/gamemode/combinations.lua
+++ b/gamemode/combinations.lua
@@ -7,160 +7,7 @@ function GMS.RegisterCombi( tbl, group )
GMS.Combinations[ group ][ string.Replace( tbl.Name, " ", "_" ) ] = tbl
end
-/* ------------------------ Combinations ------------------------*/
-
-/* Flour */
-local COMBI = {}
-
-COMBI.Name = "Flour"
-COMBI.Description = "Flour can be used for making dough."
-
-COMBI.Req = {}
-COMBI.Req["Stone"] = 1
-COMBI.Req["Grain_Seeds"] = 2
-
-COMBI.Results = {}
-COMBI.Results["Flour"] = 1
-COMBI.Results["Stone"] = 1
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Spice */
-local COMBI = {}
-
-COMBI.Name = "Spices"
-COMBI.Description = "Spice can be used for various meals."
-
-COMBI.Req = {}
-COMBI.Req["Stone"] = 1
-COMBI.Req["Herbs"] = 2
-
-COMBI.Results = {}
-COMBI.Results["Spices"] = 1
-COMBI.Results["Stone"] = 1
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Dough */
-local COMBI = {}
-
-COMBI.Name = "Dough"
-COMBI.Description = "Dough is used for baking."
-
-COMBI.Req = {}
-COMBI.Req["Water_Bottles"] = 1
-COMBI.Req["Flour"] = 2
-
-COMBI.Results = {}
-COMBI.Results["Dough"] = 1
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Dough x10 */
-local COMBI = {}
-
-COMBI.Name = "Dough 10x"
-COMBI.Description = "Dough is used for baking."
-
-COMBI.Req = {}
-COMBI.Req["Water_Bottles"] = 7
-COMBI.Req["Flour"] = 15
-
-COMBI.Results = {}
-COMBI.Results["Dough"] = 10
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Rope */
-local COMBI = {}
-
-COMBI.Name = "Rope"
-COMBI.Description = "Allows you to use Rope tool ( Using Rope Tool will consume the Rope ) and used in fishing rod crafting."
-
-COMBI.Req = {}
-COMBI.Req["Herbs"] = 5
-COMBI.Req["Wood"] = 2
-COMBI.Req["Water_Bottles"] = 1
-
-COMBI.Results = {}
-COMBI.Results["Rope"] = 1
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Welder */
-local COMBI = {}
-
-COMBI.Name = "Welder"
-COMBI.Description = "Allows you to use Weld Tool. You still need the Tool Gun though."
-
-COMBI.Req = {}
-COMBI.Req[ "Wood" ] = 10
-COMBI.Req[ "Stone" ] = 10
-COMBI.Req[ "Water_Bottles" ] = 1
-
-COMBI.Results = {}
-COMBI.Results[ "Welder" ] = 1
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Concrete */
-local COMBI = {}
-
-COMBI.Name = "Concrete"
-COMBI.Description = "Concrete can be used for spawning concrete props."
-
-COMBI.Req = {}
-COMBI.Req["Sand"] = 5
-COMBI.Req["Water_Bottles"] = 2
-
-COMBI.Results = {}
-COMBI.Results["Concrete"] = 1
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Urine */
-local COMBI = {}
-
-COMBI.Name = "Urine"
-COMBI.Description = "Drink some water and wait, used in gunpowder production."
-
-COMBI.Req = {}
-COMBI.Req["Water_Bottles"] = 2
-
-COMBI.Results = {}
-COMBI.Results["Urine_Bottles"] = 1
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Urine 10x */
-local COMBI = {}
-
-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.Results = {}
-COMBI.Results["Urine_Bottles"] = 10
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
-/* Medicine */
-local COMBI = {}
-
-COMBI.Name = "Medicine"
-COMBI.Description = "To restore your health."
-
-COMBI.Req = {}
-COMBI.Req["Herbs"] = 7
-COMBI.Req["Urine_Bottles"] = 2
-
-COMBI.Results = {}
-COMBI.Results["Medicine"] = 5
-
-GMS.RegisterCombi( COMBI, "Combinations" )
-
+//Moved to craftablesystem/playermade/
/* ------------------------ Structures ------------------------*/
@@ -1746,38 +1593,38 @@ GMS.RegisterCombi( COMBI, "Cooking" )
/* Rock cake */
local COMBI = {}
-
+
COMBI.Name = "Rock Cake"
COMBI.Description = "Crunchy!"
COMBI.Entity = "gms_stove"
-
+
COMBI.Req = {}
COMBI.Req["Iron"] = 2
COMBI.Req["Herbs"] = 1
COMBI.FoodValue = 50
-
+
GMS.RegisterCombi( COMBI, "Cooking" )
/* Salad */
local COMBI = {}
-
+
COMBI.Name = "Salad"
COMBI.Description = "Everything for survival, I guess."
COMBI.Entity = "gms_stove"
-
+
COMBI.Req = {}
COMBI.Req["Herbs"] = 2
COMBI.FoodValue = 100
-
+
GMS.RegisterCombi( COMBI, "Cooking" )
/* Meal */
local COMBI = {}
-
+
COMBI.Name = "Meal"
COMBI.Description = "The ultimate meal. Delicious!"
COMBI.Entity = "gms_stove"
-
+
COMBI.Req = {}
COMBI.Req["Herbs"] = 5
COMBI.Req["Salmon"] = 1
@@ -1788,7 +1635,7 @@ COMBI.SkillReq = {}
COMBI.SkillReq["Cooking"] = 20
COMBI.FoodValue = 1000
-
+
GMS.RegisterCombi( COMBI, "Cooking" )
/* Shark soup */
@@ -1812,11 +1659,11 @@ GMS.RegisterCombi( COMBI, "Cooking" )
/* Bread */
local COMBI = {}
-
+
COMBI.Name = "Bread"
COMBI.Description = "Good old bread."
COMBI.Entity = "gms_stove"
-
+
COMBI.Req = {}
COMBI.Req["Dough"] = 2
COMBI.Req["Water_Bottles"] = 1
@@ -1830,11 +1677,11 @@ GMS.RegisterCombi( COMBI, "Cooking" )
/* Hamburger */
local COMBI = {}
-
+
COMBI.Name = "Hamburger"
COMBI.Description = "A hamburger! Yummy!"
COMBI.Entity = "gms_stove"
-
+
COMBI.Req = {}
COMBI.Req["Dough"] = 2
COMBI.Req["Water_Bottles"] = 1
@@ -1844,7 +1691,7 @@ COMBI.SkillReq = {}
COMBI.SkillReq["Cooking"] = 3
COMBI.FoodValue = 850
-
+
GMS.RegisterCombi( COMBI, "Cooking" )
/* ------------------------ Stone Workbench ------------------------*/
@@ -2121,49 +1968,49 @@ GMS.RegisterCombi( COMBI, "gms_ironworkbench" )
/*------------------------ Gun Lab ------------------------*/
-
+
/*HL2 Smg */
local COMBI = {}
-
+
COMBI.Name = "HL2 Machine Gun"
COMBI.Description = "Just a simple Machine Gun."
COMBI.Entity = "gms_smggunlab"
-
+
COMBI.Req = {}
COMBI.Req["Copper Gunslide"] = 1
COMBI.Req["Copper Gungrip"] = 1
COMBI.Req["Copper Gunbarrel"] = 1
COMBI.Req["Copper Gunmagazine"] = 1
-
+
COMBI.SkillReq = {}
COMBI.SkillReq["Weapon_Crafting"] = 15
COMBI.SkillReq["Hunting"] = 15
-
+
COMBI.Texture = "gms_icons/weapon_smg1.png"
COMBI.SwepClass = "weapon_smg1"
-
+
GMS.RegisterCombi( COMBI, "gms_smggunlab" )
-
+
/* HL2 Pistol */
local COMBI = {}
-
+
COMBI.Name = "Pistol"
COMBI.Description = "It's not great, but it does the job. Your first ordinary Pistol."
COMBI.Entity = "gms_pistolgunlab"
-
+
COMBI.Req = {}
COMBI.Req["Copper Gunslide"] = 1
COMBI.Req["Copper Gungrip"] = 1
COMBI.Req["Copper Gunbarrel"] = 1
COMBI.Req["Copper Gunmagazine"] = 1
-
+
COMBI.SkillReq = {}
COMBI.SkillReq["Weapon_Crafting"] = 10
COMBI.SkillReq["Hunting"] = 8
-
+
COMBI.Texture = "gms_icons/weapon_pistol.png"
COMBI.SwepClass = "weapon_pistol"
-
+
GMS.RegisterCombi( COMBI, "gms_pistolgunlab" )
local COMBI = {}
@@ -2171,28 +2018,28 @@ local COMBI = {}
COMBI.Name = "HL2 Shotgun"
COMBI.Description = "Just a simple Shotgun. Left click for single shot, right click for double shots"
COMBI.Entity = "gms_pistolgunlab"
-
+
COMBI.Req = {}
COMBI.Req["Iron Gunslide"] = 1
COMBI.Req["Iron Gungrip"] = 1
COMBI.Req["Iron Gunbarrel"] = 1
COMBI.Req["Iron Gunmagazine"] = 1
-
+
COMBI.SkillReq = {}
COMBI.SkillReq["Weapon_Crafting"] = 25
COMBI.SkillReq["Hunting"] = 20
-
+
COMBI.Texture = "gms_icons/gms_weapon.png"
COMBI.SwepClass = "weapon_shotgun"
-
+
GMS.RegisterCombi( COMBI, "gms_pistolgunlab" )
-local COMBI = {}
-
+local COMBI = {}
+
COMBI.Name = "HL2 Crossbow"
COMBI.Description = "A very Medieval weapon, shoots bolts with left click and zooms in with right click"
COMBI.Entity = "gms_pistolgunlab"
-
+
COMBI.Req = {}
COMBI.Req["Tech Gunslide"] = 1
COMBI.Req["Tech Gungrip"] = 1
@@ -2200,11 +2047,11 @@ COMBI.Req["Tech Gunbarrel"] = 1
COMBI.Req["Tech Gunmagazine"] = 1
COMBI.Req["Tech WeaponScope"] = 1
COMBI.Req["Rope"] = 2
-
+
COMBI.SkillReq = {}
COMBI.SkillReq["Weapon_Crafting"] = 75
COMBI.SkillReq["Hunting"] = 70
-
+
COMBI.Texture = "gms_icons/gms_weapon.png"
COMBI.SwepClass = "weapon_crossbow"
@@ -2283,31 +2130,31 @@ local COMBI = {}
COMBI.Name = "Copper Weapon Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Copper"] = 25
COMBI.Results = {}
COMBI.Results["Copper Weapon Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
-
-
+
+
/* Copper Reflex Scope */
local COMBI = {}
-
+
COMBI.Name = "Copper Reflex Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Copper"] = 25
-
+
COMBI.Results = {}
COMBI.Results["Copper Reflex Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
/* Iron Gunslide */
@@ -2381,31 +2228,31 @@ local COMBI = {}
COMBI.Name = "Iron Weapon Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Iron"] = 30
-
+
COMBI.Results = {}
COMBI.Results["Iron Weapon Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
-
-
+
+
/* Iron Reflex Scope */
local COMBI = {}
-
+
COMBI.Name = "Iron Reflex Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Iron"] = 30
COMBI.Results = {}
COMBI.Results["Iron Reflex Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
/* Tech Gunslide */
@@ -2479,31 +2326,31 @@ local COMBI = {}
COMBI.Name = "Tech Weapon Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Tech"] = 35
-
+
COMBI.Results = {}
COMBI.Results["Tech Weapon Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
-
-
+
+
/* Tech Reflex Scope */
local COMBI = {}
-
+
COMBI.Name = "Tech Reflex Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Tech"] = 35
COMBI.Results = {}
COMBI.Results["Tech Reflex Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
/* Silver Gunslide */
@@ -2577,31 +2424,31 @@ local COMBI = {}
COMBI.Name = "Silver Weapon Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Silver"] = 40
COMBI.Results = {}
COMBI.Results["Silver Weapon Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
-
-
+
+
/* Silver Reflex Scope */
local COMBI = {}
-
+
COMBI.Name = "Silver Reflex Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Silver"] = 40
COMBI.Results = {}
COMBI.Results["Silver Reflex Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
/* Gold Gunslide */
@@ -2675,31 +2522,31 @@ local COMBI = {}
COMBI.Name = "Gold Weapon Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Gold"] = 45
COMBI.Results = {}
COMBI.Results["Gold Weapon Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
-
-
+
+
/* Gold Reflex Scope */
local COMBI = {}
-
+
COMBI.Name = "Gold Reflex Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Gold"] = 45
COMBI.Results = {}
COMBI.Results["Gold Reflex Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
/* Steel Gunslide */
@@ -2773,31 +2620,31 @@ local COMBI = {}
COMBI.Name = "Steel Weapon Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Steel"] = 50
COMBI.Results = {}
COMBI.Results["Steel Weapon Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
-
-
+
+
/* Steel Reflex Scope */
local COMBI = {}
-
+
COMBI.Name = "Steel Reflex Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Steel"] = 50
COMBI.Results = {}
COMBI.Results["Steel Reflex Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
/* Platinum Gunslide */
@@ -2871,31 +2718,31 @@ local COMBI = {}
COMBI.Name = "Platinum Weapon Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Platinum"] = 55
-
+
COMBI.Results = {}
COMBI.Results["Platinum Weapon Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
-
-
+
+
/* Platinum Reflex Scope */
local COMBI = {}
-
+
COMBI.Name = "Platinum Reflex Scope"
COMBI.Description = "A weapon scope"
COMBI.Entity = "gms_gunchunks"
-
+
COMBI.Req = {}
COMBI.Req["Glass"] = 20
COMBI.Req["Platinum"] = 55
COMBI.Results = {}
COMBI.Results["Platinum Reflex Scope"] = 1
-
+
GMS.RegisterCombi( COMBI, "gms_gunchunks" )
/* Saltpetre */
@@ -3355,4 +3202,4 @@ COMBI.Max = 200
GMS.RegisterCombi( COMBI, "gms_advancedtransmutator" )
------------------------------------------------------------------------- \ No newline at end of file
+------------------------------------------------------------------------
diff --git a/gamemode/craftablesystem/loadcraftables.lua b/gamemode/craftablesystem/loadcraftables.lua
new file mode 100644
index 0000000..724401f
--- /dev/null
+++ b/gamemode/craftablesystem/loadcraftables.lua
@@ -0,0 +1,28 @@
+//Loads all the craftable things in the game! to make a new craftable, create a new file in any of playermade/ craftingtables/ workbenches/ or misc/, they will get automatically included
+
+GMS.Combinations = {}
+function GMS.RegisterCombi( tbl, group )
+ if ( !GMS.Combinations[ group ] ) then GMS.Combinations[ group ] = {} end
+ GMS.Combinations[ group ][ string.Replace( tbl.Name, " ", "_" ) ] = tbl
+end
+
+/*
+local folderpath = "gamemodes/" .. GM.GAMEMODE_FOLDER_NAME .. "/gamemode/craftablesystem/playermade/"
+print("Attempting to load folderpath " .. folderpath)
+local files, directories = file.Find(folderpath .. "*", "MOD")
+print("Files:")
+PrintTable(files)
+print("Directories:")
+PrintTable(directories)
+if(recursive) then
+ for k,v in pairs(directories) do
+ addResourceFolder(folderstring..v,recursive)
+ end
+end
+for k,v in pairs(files) do
+ include(folderstring .. "/".. v)
+end
+*/
+--include("craftablesystem/playermade/concrete.lua")
+--include("playermade/concrete.lua")
+--includeFolder("craftablesystem/playermade",false)
diff --git a/gamemode/craftablesystem/playermade/concrete.lua b/gamemode/craftablesystem/playermade/concrete.lua
new file mode 100644
index 0000000..383c04d
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/concrete.lua
@@ -0,0 +1,14 @@
+/* Concrete */
+local COMBI = {}
+
+COMBI.Name = "Concrete"
+COMBI.Description = "Concrete can be used for spawning concrete props."
+
+COMBI.Req = {}
+COMBI.Req["Sand"] = 5
+COMBI.Req["Water_Bottles"] = 2
+
+COMBI.Results = {}
+COMBI.Results["Concrete"] = 1
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/craftablesystem/playermade/dough.lua b/gamemode/craftablesystem/playermade/dough.lua
new file mode 100644
index 0000000..94e33cf
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/dough.lua
@@ -0,0 +1,29 @@
+/* Dough */
+local COMBI = {}
+
+COMBI.Name = "Dough"
+COMBI.Description = "Dough is used for baking."
+
+COMBI.Req = {}
+COMBI.Req["Water_Bottles"] = 1
+COMBI.Req["Flour"] = 2
+
+COMBI.Results = {}
+COMBI.Results["Dough"] = 1
+
+GMS.RegisterCombi( COMBI, "Combinations" )
+
+/* Dough x10 */
+local COMBI = {}
+
+COMBI.Name = "Dough 10x"
+COMBI.Description = "Dough is used for baking."
+
+COMBI.Req = {}
+COMBI.Req["Water_Bottles"] = 7
+COMBI.Req["Flour"] = 15
+
+COMBI.Results = {}
+COMBI.Results["Dough"] = 10
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/craftablesystem/playermade/flour.lua b/gamemode/craftablesystem/playermade/flour.lua
new file mode 100644
index 0000000..f72deca
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/flour.lua
@@ -0,0 +1,14 @@
+local COMBI = {}
+
+COMBI.Name = "Flour"
+COMBI.Description = "Flour can be used for making dough."
+
+COMBI.Req = {}
+COMBI.Req["Stone"] = 1
+COMBI.Req["Grain_Seeds"] = 2
+
+COMBI.Results = {}
+COMBI.Results["Flour"] = 1
+COMBI.Results["Stone"] = 1
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/craftablesystem/playermade/medicine.lua b/gamemode/craftablesystem/playermade/medicine.lua
new file mode 100644
index 0000000..4ad245c
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/medicine.lua
@@ -0,0 +1,13 @@
+local COMBI = {}
+
+COMBI.Name = "Medicine"
+COMBI.Description = "To restore your health."
+
+COMBI.Req = {}
+COMBI.Req["Herbs"] = 7
+COMBI.Req["Urine_Bottles"] = 2
+
+COMBI.Results = {}
+COMBI.Results["Medicine"] = 5
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/craftablesystem/playermade/rope.lua b/gamemode/craftablesystem/playermade/rope.lua
new file mode 100644
index 0000000..f07db29
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/rope.lua
@@ -0,0 +1,15 @@
+/* Rope */
+local COMBI = {}
+
+COMBI.Name = "Rope"
+COMBI.Description = "Allows you to use Rope tool ( Using Rope Tool will consume the Rope ) and used in fishing rod crafting."
+
+COMBI.Req = {}
+COMBI.Req["Herbs"] = 5
+COMBI.Req["Wood"] = 2
+COMBI.Req["Water_Bottles"] = 1
+
+COMBI.Results = {}
+COMBI.Results["Rope"] = 1
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/craftablesystem/playermade/spice.lua b/gamemode/craftablesystem/playermade/spice.lua
new file mode 100644
index 0000000..3172ed5
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/spice.lua
@@ -0,0 +1,15 @@
+/* Spice */
+local COMBI = {}
+
+COMBI.Name = "Spices"
+COMBI.Description = "Spice can be used for various meals."
+
+COMBI.Req = {}
+COMBI.Req["Stone"] = 1
+COMBI.Req["Herbs"] = 2
+
+COMBI.Results = {}
+COMBI.Results["Spices"] = 1
+COMBI.Results["Stone"] = 1
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/craftablesystem/playermade/urine.lua b/gamemode/craftablesystem/playermade/urine.lua
new file mode 100644
index 0000000..9c5761c
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/urine.lua
@@ -0,0 +1,27 @@
+/* Urine */
+local COMBI = {}
+
+COMBI.Name = "Urine"
+COMBI.Description = "Drink some water and wait, used in gunpowder production."
+
+COMBI.Req = {}
+COMBI.Req["Water_Bottles"] = 2
+
+COMBI.Results = {}
+COMBI.Results["Urine_Bottles"] = 1
+
+GMS.RegisterCombi( COMBI, "Combinations" )
+
+/* Urine 10x */
+local COMBI = {}
+
+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.Results = {}
+COMBI.Results["Urine_Bottles"] = 10
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/craftablesystem/playermade/welder.lua b/gamemode/craftablesystem/playermade/welder.lua
new file mode 100644
index 0000000..cedcb97
--- /dev/null
+++ b/gamemode/craftablesystem/playermade/welder.lua
@@ -0,0 +1,15 @@
+/* Welder */
+local COMBI = {}
+
+COMBI.Name = "Welder"
+COMBI.Description = "Allows you to use Weld Tool. You still need the Tool Gun though."
+
+COMBI.Req = {}
+COMBI.Req[ "Wood" ] = 10
+COMBI.Req[ "Stone" ] = 10
+COMBI.Req[ "Water_Bottles" ] = 1
+
+COMBI.Results = {}
+COMBI.Results[ "Welder" ] = 1
+
+GMS.RegisterCombi( COMBI, "Combinations" )
diff --git a/gamemode/init.lua b/gamemode/init.lua
index 98c541d..922d8fd 100644
--- a/gamemode/init.lua
+++ b/gamemode/init.lua
@@ -25,6 +25,7 @@ include( "utility.lua")
AddCSLuaFolder("client",false)
includeFolder("server",false)
+includeFolder("craftablesystem",true)
--Vars
GM.NextSaved = 0
diff --git a/gamemode/utility.lua b/gamemode/utility.lua
index 5346cdc..dd30345 100644
--- a/gamemode/utility.lua
+++ b/gamemode/utility.lua
@@ -1,16 +1,22 @@
//Helper functions to refactor the init
function findRecursive(folderstring,recursive,dofunction)
+ print("Recursive called")
local folderpath = "gamemodes/" .. GM.GAMEMODE_FOLDER_NAME .. "/gamemode/" .. folderstring .. "/"
+ print("Attempting to load folderpath " .. folderpath)
local files, directories = file.Find(folderpath .. "*", "MOD")
+ print("Files:")
+ PrintTable(files)
+ print("Directories:")
+ PrintTable(directories)
+ for k,v in pairs(files) do
+ dofunction(folderstring .. "/".. v)
+ end
if(recursive) then
for k,v in pairs(directories) do
addResourceFolder(folderstring..v,recursive)
end
end
- for k,v in pairs(files) do
- dofunction(folderstring .. "/".. v)
- end
end
//Does AddCSLuaFile() on all files within a folderpath, optionally recursive