Skip to main content

Refined Dust

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

Overview

refined_dust is a lightweight, elemental consumable item. It functions primarily as low-tier food (restoring minimal hunger) and can be used as bait or traded (e.g., to Rockity). The prefab combines several utility components (edible, tradable, stackable, inventoryitem, bait) and supports being launched and smashed via Hauntables. It is intended for crafting, trading, or minimal sustenance.

Usage example

local inst = Prefab("refined_dust")
inst:AddComponent("edible")
inst.components.edible.foodtype = FOODTYPE.ELEMENTAL
inst.components.edible.hungervalue = 1
inst:AddComponent("tradable")
inst.components.tradable.rocktribute = 1
inst:AddComponent("stackable")
inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM

Dependencies & tags

Components used: edible, tradable, stackable, inventoryitem, bait, inspectable Tags: None identified.

Properties

PropertyTypeDefault ValueDescription
foodtypeFOODTYPE enumFOODTYPE.ELEMENTALCategory of food, used by some systems for food compatibility checks.
hungervaluenumber1Amount of hunger restored when consumed.
maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum stack size.
rocktributenumber1Amount of tribute paid to Rockity when traded.
sinksbooleantrueWhether the item sinks in water when dropped.

Main functions

MakeInventoryPhysics(inst)

  • Description: Sets up basic physics (e.g., gravity, collision) for an inventory item. Typically called internally during prefab creation.
  • Parameters: inst (Entity) — the entity instance to configure.
  • Returns: Nothing.

MakeHauntableLaunchAndSmash(inst)

  • Description: Configures the entity to be affected by Hauntable launch mechanics (pushed by Hauntable projectiles) and to be destroyable by smashing.
  • Parameters: inst (Entity) — the entity instance to configure.
  • Returns: Nothing.

inst.components.inventoryitem:SetSinks(true)

  • Description: Enables sinking behavior — the item will sink instead of float on water.
  • Parameters: should_sink (boolean) — if true, the item sinks when dropped in water.
  • Returns: Nothing.

Events & listeners

  • Listens to: None identified.
  • Pushes: None identified.