Module Runtime

Functions to access general runtime information.

Functions

getName () Name of the application, should be 'TheoTown'
getVersion () Current version of TheoTown, e.g.
getVersionCode () Current version of TheoTown as number, e.g.
getId () Package id of the app, should be 'info.flowersoft.theotown.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.
isPremium () Returns true iff this copy of TheoTown is a premium version.
getModel () Returns model name and manufacturer of the device.
isDebug () Returns a bool.
getTime () Unix timestamp in milliseconds
fromJson (json) Converts a json string into a lua table.
toJson (table) Converts a table into a json string.
getUuid () Returns a random uuid string.
postpone (function[, delayMS]) Postpones the execution of a function.


Functions

getName ()
Name of the application, should be 'TheoTown'

Returns:

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

Returns:

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

Returns:

    number
getId ()
Package id of the app, should be 'info.flowersoft.theotown.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
isPremium ()
Returns true iff this copy of TheoTown is a premium version.

Returns:

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

Returns:

    string,string
isDebug ()
Returns a bool.

Returns:

    bool
getTime ()
Unix timestamp in milliseconds

Returns:

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

Parameters:

Returns:

    table
toJson (table)
Converts a table into a json string.

Parameters:

Returns:

    string
getUuid ()
Returns a random uuid string.

Returns:

    string
postpone (function[, 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:

  • function function The function that should be executed.
  • delayMS number Minimum amount of milliseconds to wait until execution. (optional)
generated by LDoc 1.4.3 Last updated 2019-07-28 16:08:29