A feature request that has been made is to add/expose the current Ashita interface 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 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.interface_version);
In this case, interface_version is a Lua number value, matching its double value from the Ashita.h header.
Some positives about implementing things this way:
It does not pollute the global namespace with a new variable.
It does not break any existing addons.
It allows future addons to easily check if the value even exists.
Feature Description
A feature request that has been made is to add/expose the current Ashita interface 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 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:In this case,
interface_version
is a Luanumber
value, matching itsdouble
value from the Ashita.h header.Some positives about implementing things this way: