summaryrefslogtreecommitdiffstats
path: root/source/items/ItemFood.h
blob: 6e5a27d5dea6c9ab59ee8d9ca8bcc64816495af8 (plain) (blame)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

#pragma once

#include "ItemHandler.h"


class cItemFoodHandler : public cItemHandler
{
public:
	cItemFoodHandler(int a_ItemID)
		: cItemHandler(a_ItemID)
	{
	}

	virtual bool IsFood() override
	{
		return true;
	}

	virtual FoodInfo GetFoodInfo() override
	{
		switch(m_ItemID)
		{
		case E_ITEM_BREAD:
			return FoodInfo(5, 6.f);
		case E_ITEM_COOKIE:
			return FoodInfo(2, 0.4f);
		case E_ITEM_MELON_SLICE:
			return FoodInfo(2, 1.2f);
		case E_ITEM_RAW_CHICKEN:
			return FoodInfo(2, 1.2f, 30);
		case E_ITEM_COOKED_CHICKEN:
			return FoodInfo(6, 7.2f);
		case E_ITEM_RAW_BEEF:
		case E_ITEM_RAW_MEAT:
			return FoodInfo(3, 1.8f);
		case E_ITEM_STEAK:
		case E_ITEM_COOKED_MEAT:
			return FoodInfo(8, 12.8f);
		case E_ITEM_RAW_FISH:
			return FoodInfo(2, 1.2f);
		case E_ITEM_COOKED_FISH:
			return FoodInfo(5, 6.f);
		case E_ITEM_RED_APPLE:
			return FoodInfo(4, 2.4f);
		case E_ITEM_GOLDEN_APPLE:
			return FoodInfo(4, 9.6f);
		case E_ITEM_ROTTEN_FLESH:
			return FoodInfo(4, 0.8f, 80);
		case E_ITEM_SPIDER_EYE:
			return FoodInfo(2, 3.2f, 100);
		}
		return FoodInfo(0, 0.f);
	}
	
};