30 static const FoodInfo RawFishInfos[] =
37 static const FoodInfo CookedFishInfos[] =
42 static const short NumRawFishInfos =
sizeof(RawFishInfos) /
sizeof(
FoodInfo);
43 static const short NumCookedFishInfos =
sizeof(CookedFishInfos) /
sizeof(
FoodInfo);
MTRand & GetRandomProvider()
Returns the current thread's random number source.
virtual FoodInfo GetFoodInfo(const cItem *a_Item) override
Returns the FoodInfo for this item.
virtual bool IsFood(void) override
Indicates if this item is food.
virtual bool EatItem(cPlayer *a_Player, cItem *a_Item) override
Lets the player eat a selected item.
void AddEntityEffect(cEntityEffect::eType a_EffectType, int a_EffectDurationTicks, short a_EffectIntensity, double a_DistanceModifier=1)
Applies an entity effect.
void LOGWARNING(const char *a_Format, fmt::ArgList a_ArgList)
int AddItem(const cItem &a_ItemStack, bool a_AllowNewStacks=true)
Adds as many items out of a_ItemStack as can fit.
cItemFoodHandler(int a_ItemType)
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
virtual bool EatItem(cPlayer *a_Player, cItem *a_Item)
Lets the player eat a selected item.