Dryable
Based on game build 714014 | Last updated: 2026-03-03
Overview
The Dryable component enables an entity to participate in the game's drying mechanic (e.g., in a drying rack or under the sun). It is attached to prefabs that can transition from a raw state to a dried variant, storing metadata required to define the dried output, the time required for drying, and the Prefab/BuildFile references for both raw and dried states. It automatically adds the dryable tag to its host entity upon initialization and removes it when removed.
Usage example
local inst = CreateEntity()
inst:AddComponent("dryable")
inst.components.dryable:SetProduct("dried_meat")
inst.components.dryable:SetDryTime(300) -- 5 minutes
inst.components.dryable:SetBuildFile("builds/meat.fbx")
inst.components.dryable:SetDriedBuildFile("builds/meat_dried.fbx")
Dependencies & tags
Components used: None identified
Tags: Adds dryable; removes dryable on entity removal.
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
product | string or nil | nil | The name of the prefab that replaces this entity after drying completes. |
drytime | number or nil | nil | Duration in seconds required to dry this entity. |
buildfile | string or nil | nil | File path to the 3D model (.fbx) used for the raw state of the entity. |
dried_buildfile | string or nil | nil | File path to the 3D model for the dried state; if not set, falls back to buildfile. |
Main functions
SetProduct(product)
- Description: Sets the prefab name of the item that results from drying this entity.
- Parameters:
product(string) — the name of the dried product prefab. - Returns: Nothing.
GetProduct()
- Description: Returns the currently set dried product prefab name.
- Parameters: None.
- Returns: (string or nil) — the product prefab name, or
nilif unset.
SetDryTime(time)
- Description: Sets the drying duration for this entity.
- Parameters:
time(number) — drying time in seconds. - Returns: Nothing.
GetDryTime()
- Description: Returns the currently set drying duration.
- Parameters: None.
- Returns: (number or nil) — drying time in seconds, or
nilif unset.
SetBuildFile(buildfile)
- Description: Sets the asset file path for the raw (undried) model.
- Parameters:
buildfile(string) — path to the.fbxfile (e.g.,"builds/meat.fbx"). - Returns: Nothing.
GetBuildFile()
- Description: Returns the raw model file path.
- Parameters: None.
- Returns: (string or nil) — the build file path, or
nilif unset.
SetDriedBuildFile(dried_buildfile)
- Description: Sets the asset file path for the dried model.
- Parameters:
dried_buildfile(string) — path to the.fbxfile for the dried state. - Returns: Nothing.
GetDriedBuildFile()
- Description: Returns the dried model file path; if none was explicitly set, returns the raw
buildfileas fallback. - Parameters: None.
- Returns: (string) — the dried build file path, or the raw build file if
dried_buildfileisnil.
Events & listeners
- Listens to: None identified
- Pushes: None identified