Skip to main content

Charcoal

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

Overview

charcoal is a simple item prefab that functions as both fuel and low-nutrition food (classified as BURNT), and also serves as bait for moles and a decorative item for Snow Man. It uses the standard ECS components stackable, fuel, edible, tradable, bait, inspectable, inventoryitem, and snowmandecor. It also includes helper functions like MakeMediumBurnable, MakeMediumPropagator, and MakeHauntableLaunchAndIgnite to enable interaction with fire-based systems.

Usage example

local inst = SpawnPrefab("charcoal")
-- Stackable: Add more charcoal to stack
inst.components.stackable:StackSize(1)
-- Fuel: Used in fire-based crafting
local fuel_value = inst.components.fuel.fuelvalue
-- Edible: Consume for small hunger/health restoration
inst.components.edible:OnEat(inst)

Dependencies & tags

Components used: stackable, fuel, edible, tradable, bait, inspectable, inventoryitem, snowmandecor
Tags: Adds molebait and decorationsnowman

Properties

PropertyTypeDefault ValueDescription
pickupsoundstring"wood"Sound played when the item is picked up.
components.stackable.maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum stack size for the item.
components.fuel.fuelvaluenumberTUNING.MED_FUELFuel value used when burning the item.
components.edible.foodtypeFOODTYPEFOODTYPE.BURNTFood classification (affects hunger/health restoration).
components.edible.hungervaluenumber20Amount of hunger restored on consumption.
components.edible.healthvaluenumber20Amount of health restored on consumption.

Main functions

No custom public methods are defined in this prefab. It relies entirely on methods provided by its attached components and helper functions.

Events & listeners

None identified.