Skip to content

nut.currency

Currency System.

Handles money/currency functionality including display formatting, spawning, and character transactions.

Functions

nut.currency.set (symbol, singular, plural)
nut.currency.set

Sets the currency display properties

Parameters:

string symbol Currency symbol (e.g. "$")

string singular Singular name (e.g. "dollar")

string plural Plural name (e.g. "dollars")

nut.currency.get (amount)
nut.currency.get

Formats an amount into a display string

Parameters:

number amount Amount to format

Returns:

string Formatted currency string

nut.currency.spawn (pos, amount, angle)
nut.currency.spawn

Spawns a physical money entity in the world

Parameters:

Vector pos Position to spawn

number amount Money value

Angle angle optional Spawn angle

Returns:

entity The created money entity