Skip to content

DCS World Lua scripting functions and class definitions for VS Code hints

Notifications You must be signed in to change notification settings

omltcat/dcs-lua-definitions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DCS World Lua Definitions

This is a definition addon for VS Code Lua extension. It provides types, classes, functions and enumerators from DCS World Scripting Engine, to help with code completion and prevent errors.

-- For example
-- VS Code will now know this is a Unit object
local tomcat = Unit.getByName("Colt 1-1")

-- And it will yell at you if you try to do this
tomcat:getSize()
-- Because getSize is a function for the Group class, not Unit

Credits

These definitions are pulled from Hoggit Wiki 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 and GUI (hook) 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. We are still missing GUI Callbacks definitions.

When this project is more complete, I will PR it to LLS-Addons so that it can be installed directly from the Lua extension's Addon Manager.

Installation (for now)

Install the Lua extension for VS Code.

Create a folder somewhere to store all the Lua addons and clone this repo.

mkdir lua-addons
cd lua-addons
git clone https://github.com/omltcat/dcs-lua-definitions.git

Then add it to VS Code settings:

"Lua.workspace.userThirdParty": [
  "/path/to/lua-addons"
]

Recommended Extensions

  • DCS Lua Runner
    • Made by me. Execute Lua code in running DCS missions straight from VS Code.

About

DCS World Lua scripting functions and class definitions for VS Code hints

Topics

Resources

Stars

Watchers

Forks

Languages