v0.3.0
v0.3.0
This release focuses on creating a resilient addon registration
interface that is compatible with the existing Lua module system. It
adds several new utilities for addon developers and a way for addons to
depend on other addons.
Added
-
pso.base_addressis the base address of the psobb.exe module. Added
for addon resilience when running on servers with modified psobb.exes.
However, this does not mean the plugin works with compressed
executables: decompressed executables are still required. -
pso.list_addon_directoriesreturns a list of the directories in
addons/as an array table. It is used inpsointernalfor loading
addons. -
pso_on_init,pso_on_present,pso_on_key_pressed,
pso_on_key_released,pso_on_log, andpso_on_unhandled_error
are all new low-level global functions that can be set to define the
addons/behavior entirely. You don't need this unless you want
to completely change the plugin's behavior. -
util.underscorepackage adds several utility functions,
particularly for functional programming. You can use it like any other
Lua module:local __ = require('util.underscore') local mapped = __.map({1, 2}, function(v) return v+4; end) -- mapped = {5, 6} -
New addon registration process. Your addon module's
init.luashould
export a table with a__addonkey. See the example for details.
Directories underaddons/do not have to export this key if they
are simply regular Lua modules; they will not show up in the addon
list and not be able to register hooks. -
Basic unit testing for Underscore utility library.
Changed
- Addon hook API is overhauled. Most logic is done in pure Lua in place
of C++. With this, also comes a change to the way hooks are
registered. Please see the newaddon_examples/HelloWorldpath in
the source. - All existing addons before this release are broken and must be
updated to the new API. After this release, the addon registration
interface will be mostly stabilized and future releases will not
break old addons (hopefully). - Core UI has been rewritten in pure Lua.
Removed
on_functions have all been removed from thepsoglobal table.