aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/recipe_shack.lua
blob: 060fccb9619ac9f019fb6dbd6fc1de533f8a3aab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ITEM.Name 			= "Recipe: Shack"
ITEM.Class 			= "account"
ITEM.Desc 			= "A recipe for the shack. 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("Shack")
	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