AshitaXI / Ashita

Issue tracker and wiki for the Ashita project.
https://ashitaxi.com/
7 stars 1 forks source link

Expose Addons Plugin Version To Addons #52

Closed atom0s closed 1 year ago

atom0s commented 1 year ago

Feature Description

A feature request that has been made is to add/expose the current Addons plugin version number to addons. This allows addons to test/check for expected functionality and warn users they may need to upgrade their version of Ashita (and/or Addons plugin) in order to use a given addon.

To avoid pollution of the global namespace, an idea on how this could be added is to include it within the existing ashita table. Such as the following:

print(ashita.addons_version);

In this case, addons_version is a Lua number value, matching its double value returned from calling its GetVersion method.

Some positives about implementing things this way:

atom0s commented 1 year ago

This is now added and will be in the next update.

-- number
ashita.addons_version