Cleanup Lua plugin implementation.

* Move the UI code out of the plugin logic.
* Add types where needed.
* Move into game package.
* Improve error handling.
* Simplify settings behavior.
* Don't load disabled plugins.
* Remove knowledge of non-base plugins from game generation.

Fixes https://github.com/Khopa/dcs_liberation/issues/311
This commit is contained in:
Dan Albert
2020-10-24 00:34:23 -07:00
parent 4c394a9e2d
commit 8827f7df34
16 changed files with 357 additions and 341 deletions

View File

@@ -15,8 +15,7 @@ This file is the description of the plugin.
The *base* and *jtacautolase* plugins both are included in the standard dcs-liberation distribution.
You can check their respective `plugin.json` files to understand how they work.
Here's a quick rundown of the file's components :
- `mnemonic` : the short, technical name of the plugin. It's the name of the folder, and the name of the plugin in the application's settings
- `skipUI` : if *true*, this plugin will not appear in the plugins selection user interface. Useful to force a plugin ON or OFF (see the *base* plugin)
- `nameInUI` : the title of the plugin as it will appear in the plugins selection user interface.
- `defaultValue` : the selection value of the plugin, when first installed ; if true, plugin is selected.
@@ -41,29 +40,14 @@ It is mandatory.
This plugin replaces the vanilla JTAC functionality in dcs-liberation.
### The *VEAF framework* plugin
### Known third-party plugins
When enabled, this plugin will inject and configure the VEAF Framework scripts in the mission.
Plugins not included with Liberation can be installed by adding them to the
`resources/plugins` directory and listing them in
`resources/plugins/plugins.json`. Below is a list of other plugins that can be
installed:
These scripts add a lot of runtime functionalities :
- spawning of units and groups (and portable TACANs)
- air-to-ground missions
- air-to-air missions
- transport missions
- carrier operations (not Moose)
- tanker move
- weather and ATC
- shelling a zone, lighting it up
- managing assets (tankers, awacs, aircraft carriers) : getting info, state, respawning them if needed
- managing named points (position, info, ATC)
- managing a dynamic radio menu
- managing remote calls to the mission through NIOD (RPC) and SLMOD (LUA sockets)
- managing security (not allowing everyone to do every action)
- define groups templates
You can find the *VEAF Framework* plugin [on GitHub](https://github.com/VEAF/dcs-liberation-veaf-framework/releases)
For more information, please visit the [VEAF Framework documentation site](https://veaf.github.io/VEAF-Mission-Creation-Tools/) (work in progress)
* [VEAF](https://github.com/VEAF/dcs-liberation-veaf-framework)
## Custom plugins

View File

@@ -1,5 +1,4 @@
{
"mnemonic": "base",
"skipUI": true,
"nameInUI": "",
"defaultValue": true,

View File

@@ -1,5 +1,4 @@
{
"mnemonic": "jtacautolase",
"nameInUI": "JTAC Autolase",
"defaultValue": true,
"specificOptions": [

View File

@@ -1,5 +1,4 @@
{
"mnemonic": "skynetiads",
"nameInUI": "Skynet IADS",
"defaultValue": false,
"specificOptions": [