aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/juice.lua
blob: db27938a8b966aed68c15255040eff1a4f4ed3dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
local ITEM = {}
ITEM.Name 			= "Juice"
ITEM.Class 			= "food"
ITEM.Desc 			= "Restores some thirst."
ITEM.Model 			= "models/props_junk/Rock001a.mdl"
ITEM.Icon			= Material("wintersurvival2/hud/ws1_icons/icon_beer")

ITEM.Recipe		= {
	Resources = {
		["Berry"] = 3,
		["Cup"] = 1,
	},
	Tools = {},
}

function ITEM:OnUse(user)
	if (CLIENT) then return end

	user:SetWater(0)
	user:RemoveItem(self.Name,1)
	user:AddItem(GetItemByName("Cup"))
end
RegisterItem(ITEM)