Skip to main content

Symbolswapdata

Overview

This component stores persistent metadata for items that have undergone symbol swapping (e.g., recipe substitutions via the "Symbol Swap" mechanic). It records the original build ID, the assigned symbol, and whether the item is skinned—enabling accurate replication and validation during network sync or item reconstruction.

Dependencies & Tags

None identified

Properties

PropertyTypeDefault ValueDescription
instEntitynilReference to the entity the component is attached to (set in constructor).
buildstringnilUnique build identifier of the item before symbol swapping.
symbolstringnilSymbol string used in the swap (e.g., "gears", "rope").
is_skinnedbooleannilWhether the item is currently skinned (i.e., uses a custom texture variant).

Main Functions

SetData(build, symbol, is_skinned)

  • Description: Updates the component's stored metadata with new values.
  • Parameters:
    • build (string): The build ID associated with the item.
    • symbol (string): The symbol used in the swap operation.
    • is_skinned (boolean): Indicates if the item uses a skin variant.

GetDebugString()

  • Description: Returns a formatted string for debugging, displaying all stored fields.
  • Parameters: None

Events & Listeners

None