aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/cookedmeat.lua
blob: c1565fa29b6f50ab531f110145c85a08334ba409 (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
local ITEM = {}
ITEM.Name 			= "Cooked Meat"
ITEM.Class 			= "food"
ITEM.Desc 			= "Delicious... and prepared!"
ITEM.Model 			= "models/Weapons/w_bugbait.mdl"
ITEM.Icon			= Material("wintersurvival2/hud/ws2_icons/icon_meat.png")

ITEM.Structure = {
	{
		Bone = "ValveBiped.Bip01_R_Hand",
		Model = "models/Weapons/w_bugbait.mdl",
		Size = Vector(0.5,0.5,0.5),
		Pos = Vector(4,-3,-1),
		Ang = Angle(0,0,0),
	},
}

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

	user:SetHealth(math.min(100,user:Health()+40))
	user:AddHunger(-90)
	user:RemoveItem(self.Name,1)
end
RegisterItem(ITEM)