Skip to main content

Honey

Based on game build 714014 | Last updated: 2026-03-05

Overview

honey is a prefab representing a stackable food item in the game. It provides small health and hunger restoration and is designed to be consumed directly by players. The item slowly perishes over time and transforms into spoiled_food upon spoiling. It integrates with multiple systems including inventory, perishability, tradability, and inspectability.

Usage example

local inst = SpawnPrefab("honey")
inst.components.edible.healthvalue = TUNING.HEALING_MEDIUM
inst.components.stackable:SetSize(10)

Dependencies & tags

Components used: edible, stackable, tradable, inspectable, perishable, inventoryitem
Tags: Adds honeyed

Properties

PropertyTypeDefault ValueDescription
healthvaluenumberTUNING.HEALING_SMALLHealth restored upon consumption.
hungervaluenumberTUNING.CALORIES_TINYHunger restored upon consumption.
maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum number of items allowed in a stack.
onperishreplacementstring"spoiled_food"Prefab name to spawn when this item perishes.
perishtimenumberTUNING.PERISH_SUPERSLOWDuration (in seconds) before the item spoils.

Main functions

Not applicable. The component itself is a prefab, not a standalone component class. All component usage occurs through inst.components.* after the prefab is spawned.

Events & listeners

Not applicable. The prefab does not define custom event listeners or events. Perishing behavior and replacements are handled internally by the perishable and edible components.