CityRP Documentation Repository

ITEM.Food

The food item base. Restores hunger on use.

Registration ID
base_food
Inherits
ITEM → ITEM.Food

Functions

SharedITEM:canUse(ply) → booleanSource ☍

canUse hook/override for this item base.

Parameters

Returns

  1. boolean
SharedITEM:Incrementors(food, alcohol, superfood) → ITEMSource ☍

Set the food and alcohol value of an item.

Parameters

  • foodnumber?Food value.
  • alcoholnumber?Alcohol value.
  • superfoodnumber?Superfood value.

Returns

  1. ITEM
SharedITEM:onDestroy(ply)Source ☍

onDestroy hook/override for this item base.

Parameters

SharedITEM:onDrop(ply, pos)Source ☍

onDrop hook/override for this item base.

Parameters

SharedITEM:onGive(ply, to)Source ☍

onGive hook/override for this item base.

Parameters

SharedITEM:onPlace()Source ☍

onPlace hook/override for this item base.

SharedITEM:onUse(ply) → booleanSource ☍

onUse hook/override for this item base.

Parameters

Returns

  1. boolean
SharedITEM:postUse(ply) → booleanSource ☍

postUse hook/override for this item base.

Parameters

Returns

  1. boolean
SharedITEM:SetFood(f, a, s) → ITEMSource ☍

Set the food / alcohol values for this item, along with the category.

Parameters

  • fnumber?Food value.
  • anumber?Alcohol value.
  • snumber?Superfood value.

Returns

  1. ITEM

Fields

SharedITEM.alcoholvalueSource ☍
SharedITEM.alcoholvalueSource ☍
SharedITEM.foodvalueSource ☍
SharedITEM.foodvalueSource ☍
SharedITEM.SetBottleSource ☍

Set if the food returns an empty bottle after using.

SharedITEM.SetHiddenSource ☍

Set if the food values are hidden for this item.

SharedITEM.SetSoberingSource ☍

Set if the food resets alcohol state.

SharedITEM.superfoodSource ☍
SharedITEM.superfoodSource ☍