Skip to main content

Marblebean

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

Overview

marblebean is a prefab representing a small, consumable bean item that functions as both a cat toy and a planter seed. It is primarily used as bait for moles and can be deployed in the world to grow a marblebean_sapling. The prefab uses the stackable, inventoryitem, and deployable components to manage its behavior in inventory and during placement. It is tagged for special interactions (cattoy, molebait, treeseed) and supports hauntable mechanics.

Usage example

-- Create a marblebean instance
local bean = SpawnPrefab("marblebean")

-- Place it in an actor's inventory
actor.components.inventory:GiveItem(bean)

-- Deploy it onto the world (requires a valid transform and world context)
local pt = Vector3(x, y, z)
bean.components.deployable:OnDeploy(pt, actor)

Dependencies & tags

Components used: stackable, inventoryitem, deployable, inspectable, hauntable_launch
Tags added: cattoy, molebait, treeseed

Properties

PropertyTypeDefault ValueDescription
components.stackable.maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum number of items allowed in a single stack.
components.inventoryitem.sinksbooleantrueWhether the item sinks in water when dropped.
components.deployable.modeenumDEPLOYMODE.PLANTDeployment mode (set to planting).
components.deployable.ondeployfunctionondeploy (local)Callback executed when deployed.

Main functions

Not applicable. This is a prefab definition, not a component.

Events & listeners

Not applicable. This prefab definition does not register event listeners directly. Event handling is delegated to components (e.g., deployable.ondeploy).