aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/recipe_tent.lua
diff options
context:
space:
mode:
authorApickx <Apickx@cogarr.org>2015-12-28 19:10:44 -0500
committerApickx <Apickx@cogarr.org>2015-12-28 19:10:44 -0500
commit5c4ebc932d8c02522802c842d43d863d89aca162 (patch)
tree6be7ad664bdf060127e6df6baa72beaf508aa149 /gamemode/itemsystem/items/recipe_tent.lua
downloadwintersurvival2-5c4ebc932d8c02522802c842d43d863d89aca162.tar.gz
wintersurvival2-5c4ebc932d8c02522802c842d43d863d89aca162.tar.bz2
wintersurvival2-5c4ebc932d8c02522802c842d43d863d89aca162.zip
Initial commit
Diffstat (limited to 'gamemode/itemsystem/items/recipe_tent.lua')
-rw-r--r--gamemode/itemsystem/items/recipe_tent.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/gamemode/itemsystem/items/recipe_tent.lua b/gamemode/itemsystem/items/recipe_tent.lua
new file mode 100644
index 0000000..fd810af
--- /dev/null
+++ b/gamemode/itemsystem/items/recipe_tent.lua
@@ -0,0 +1,27 @@
+
+ITEM.Name = "Recipe: Tent"
+ITEM.Class = "account"
+ITEM.Desc = "A recipe for the tent. Use it to print it on chat!"
+ITEM.Model = "models/Weapons/w_bugbait.mdl"
+ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png")
+
+function ITEM:OnUse(user)
+ if (CLIENT) then return end
+
+ local rec,item = GetRecipeForItem("Tent")
+ local txt = "Recipe: "
+
+ txt = txt.." RESOURCES("
+ for a,b in pairs(rec.Resources) do
+ txt=txt..b.." x "..a..", "
+ end
+ txt = txt..")"
+
+ txt = txt.." TOOLS("
+ for a,b in pairs(rec.Tools) do
+ txt=txt..b.." x "..a..", "
+ end
+ txt = txt..")"
+
+ user:ChatPrint(txt)
+end \ No newline at end of file