-
-
Notifications
You must be signed in to change notification settings - Fork 2
Module: Version
Important
Documentation has moved to the docs. This wiki will no longer be updated, and may be deleted in the future.
local Version = require("Starlit/Version")The Version module contains information and utilities relating to the current version of Starlit. This module should be used to ensure the correct version of Starlit is running if your mod depends on a recent feature.
Version.ensureVersion(major: integer, minor: integer, patch: integer) -> compatibility: "toolow"|"toohigh"|"compatible"Checks that the current running version of Starlit is compatible with the specified version. If not, the player will receive a popup informing them of the required version, and directing them to the update page.
Returns either "toolow", "toohigh", or "compatible" for self-explanatory reasons.
TEMP: this should be delayed until at least OnGameStart, or the popup will not appear.
Version.compareVersion(build: integer, major: integer, minor: integer, patch: integer) -> compatibility: "toolow"|"toohigh"|"compatible"Compares the current running version of Starlit to the specified version. Returns either "toolow", "toohigh", or "compatible" for self-explanatory reasons.
Version.VERSION_STRING: stringString name of the current version, e.g. 42-1.2.3
Version.BUILD: integerThe major game build the current version of Starlit is designed for, e.g. 42
Version.MAJOR: integerThe major version of Starlit. Major versions are incremented when non-trivial breaking changes are made to the API.
Version.MINOR: integerThe minor version of Starlit. Minor versions are incremented when new features are added, and old features may be deprecated.
Version.PATCH: integerThe patch version of Starlit. Patch versions are incremented by bug fixes that don't change (intended) functionality.