Module Runtime

Functions to access general runtime information.

Functions

fromJson (json) Converts a json string into a lua table.
getId () Package id of the app, should be 'info.flowersoft.theotown.theotown'
getModel () Returns model name and manufacturer of the device.
getName () Name of the application, should be 'TheoTown'
getOSVersion () Returns the version code of the os (e.g.
getPlatform () Returns a string that represents that platform TheoTown is running on right now.
getTime () Unix timestamp in milliseconds
getUuid () Returns a random uuid string.
getVersion () Current version of TheoTown, e.g.
getVersionCode () Current version of TheoTown as number, e.g.
isDebug () Returns true iff game is currently running on a debug build.
isPremium () Returns true iff this copy of TheoTown is a premium version.
postpone (func[, delayMS]) Postpones the execution of a function.
toJson (table) Converts a table into a json string.


Functions

fromJson (json)
Converts a json string into a lua table.

Parameters:

Returns:

    table
getId ()
Package id of the app, should be 'info.flowersoft.theotown.theotown'

Returns:

    string
getModel ()
Returns model name and manufacturer of the device.

Returns:

  1. string
  2. string
getName ()
Name of the application, should be 'TheoTown'

Returns:

    string
getOSVersion ()
Returns the version code of the os (e.g. Android API level).

Returns:

  1. number
  2. string
getPlatform ()
Returns a string that represents that platform TheoTown is running on right now. E.g. 'android', 'ios' or 'desktop'.

Returns:

    string
getTime ()
Unix timestamp in milliseconds

Returns:

    int
getUuid ()
Returns a random uuid string.

Returns:

    string
getVersion ()
Current version of TheoTown, e.g. 1.5.15

Returns:

    string
getVersionCode ()
Current version of TheoTown as number, e.g. 1515

Returns:

    int
isDebug ()
Returns true iff game is currently running on a debug build. Should always return false.

Returns:

    bool
isPremium ()
Returns true iff this copy of TheoTown is a premium version.

Returns:

    bool
postpone (func[, delayMS])
Postpones the execution of a function. Postponed functions will be executed synchronously once per frame. You can optionally set a minimum time to wait until execution.

Parameters:

  • func function The function that should be executed.
  • delayMS int Minimum amount of milliseconds to wait until execution. (optional)
toJson (table)
Converts a table into a json string.

Parameters:

Returns:

    string
generated by LDoc 1.4.3 Last updated 2024-09-18 09:14:48