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 a bool.
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:

    string,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:

    number,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:

    number
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:

    number
isDebug ()
Returns a bool.

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 number 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 2020-09-27 16:37:25