Brush
Based on game build 714014 | Last updated: 2026-03-04
Overview
The brush prefab is a handheld tool used primarily for grooming Beefalo. It functions as a consumable item with finite uses, integrates with the equippable system to manage visual animation states on the player, and interacts with the weapon component to perform grooming actions. It is typically added to player or Beefalo interaction prefabs and supports network synchronization via inventoryitem, inspectable, and networked finiteuses components.
Usage example
local inst = CreateEntity()
inst:AddComponent("brush")
inst.components.finiteuses:SetUses(10)
inst.components.equippable:SetOnEquip(function(inst, owner)
-- custom equip logic
end)
Dependencies & tags
Components used: weapon, brush, finiteuses, inspectable, inventoryitem, equippable
Tags: Adds weapon during construction (for optimization), and potentially usesdepleted via finiteuses.
Properties
No public properties.
Main functions
fn()
- Description: Constructor function that creates and configures the Brush entity instance. Called automatically when the prefab is instantiated.
- Parameters: None.
- Returns:
inst(Entity) — the fully configured Brush entity. - Error states: Returns early on non-master clients (only the master simulates the brush logic).
Events & listeners
- Listens to: None identified.
- Pushes:
percentusedchange— viafiniteuses:SetUses()when remaining uses change.brushaction— implicitly triggered via grooming interactions (handled bybrushcomponent logic elsewhere in the codebase, but the prefab supports it).