Add functions in server GUI

Add AI enum table
Add some missing functions
This commit is contained in:
omltcat
2024-05-20 15:25:25 -04:00
parent fb09e97c37
commit d8022bc029
9 changed files with 373 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
# DCS World Lua Definitions
This is a [definition addon](https://luals.github.io/wiki/definition-files/) for [VS Code Lua extension](https://marketplace.visualstudio.com/items?itemName=sumneko.lua). It provides types, classes, functions and enumerators from DCS World Scripting Engine, to help with code completion and prevent errors.
This is a [definition addon](https://luals.github.io/wiki/definition-files/) for [VS Code Lua extension](https://marketplace.visualstudio.com/items?itemName=sumneko.lua). It provides types, classes, functions and enumerators from DCS World Scripting Engine, to help with code completion and prevent errors.
```lua
-- For example
@@ -13,9 +13,11 @@ tomcat:getSize()
```
## Credits
These definitions are pulled from Hoggit Wiki [Simulator Scripting Engine Documentation](https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation) and permission was granted by Grimes before sharing or this repo. I take no credit for the content. I simply converted it to a format for Lua extension and did some structuring and cleaning.
These definitions are pulled from Hoggit Wiki [Simulator Scripting Engine Documentation](https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation) and permission was granted by Grimes before sharing or this repo. I take no credit for the content. I simply converted it to a format for Lua extension and did some structuring and cleaning.
## Current State
At this point, *most* of the mission scripting environment definitions are in place. As I started with the most commonly used ones, some may still be missing. If you find any missing or incorrect definitions, you are welcome to open an issue or a pull request.
Other environments, like hooks and export are mostly uncharted territory. I will be working on when mission is complete. Naturally, I would appreciate any help at the mean time as I am not very familiar with them.
@@ -23,9 +25,11 @@ Other environments, like hooks and export are mostly uncharted territory. I will
When this project is more complete, I will PR it to [LLS-Addons](https://github.com/LuaLS/LLS-Addons) so that it can be installed directly from the Lua extension's Addon Manager.
## Installation (for now)
Install the [Lua extension](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) for VS Code.
Create a folder somewhere to store all the Lua addons and clone this repo.
```sh
mkdir lua-addons
cd lua-addons
@@ -33,6 +37,7 @@ git clone https://github.com/omltcat/dcs-lua-definitions.git
```
Then add it to VS Code settings:
```json
"Lua.workspace.userThirdParty": [
"/path/to/lua-addons"
@@ -40,5 +45,6 @@ Then add it to VS Code settings:
```
## Recommended Extensions
- [DCS Lua Runner](https://marketplace.visualstudio.com/items?itemName=omltcat.dcs-lua-runner)
- Made by me. Execute Lua code in running DCS missions straight from VS Code.
- Made by me. Execute Lua code in running DCS missions straight from VS Code.