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 formatReturns:
string Formatted currency stringnut.currency.spawn (pos, amount, angle)
nut.currency.spawn
Spawns a physical money entity in the world
Parameters:
Vector pos Position to spawnnumber amount Money value
Angle
angle
optional
Spawn angle