Release 1.1.7

This commit is contained in:
omltcat
2024-05-10 14:21:34 -04:00
parent 5b0c62efb5
commit 07711a605a
6 changed files with 97 additions and 22 deletions

View File

@@ -116,6 +116,14 @@ function getCurrentFileLua() {
}
export function activate(context: vscode.ExtensionContext) {
// context.globalState.update('firstRunDone', false);
const isFirstRun = !context.globalState.get('firstRunDone');
if (isFirstRun) {
context.globalState.update('firstRunDone', true);
const installMdPath = vscode.Uri.file(context.asAbsolutePath('INSTALL.md'));
vscode.commands.executeCommand('markdown.showPreview', installMdPath);
}
const config = vscode.workspace.getConfiguration('dcsLuaRunner');
let outputChannel = vscode.window.createOutputChannel("DCS Lua Runner");
@@ -191,6 +199,10 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.commands.registerCommand('dcs-lua-runner.set-missionEnv-button', () => updateSetting('runInMissionEnv', true)));
context.subscriptions.push(vscode.commands.registerCommand('dcs-lua-runner.set-guiEnv', () => updateSetting('runInMissionEnv', false)));
context.subscriptions.push(vscode.commands.registerCommand('dcs-lua-runner.set-guiEnv-button', () => updateSetting('runInMissionEnv', false)));
context.subscriptions.push(vscode.commands.registerCommand('dcs-lua-runner.show-setup-guide', () => {
const installMdPath = vscode.Uri.file(context.asAbsolutePath('INSTALL.md'));
vscode.commands.executeCommand('markdown.showPreview', installMdPath);
}));
// Update the 'luaFileActive' context when the active editor changes
vscode.window.onDidChangeActiveTextEditor(editor => {
@@ -230,7 +242,8 @@ export function activate(context: vscode.ExtensionContext) {
{ label: 'DCS Lua: Set Run Code on Remote Server', command: 'dcs-lua-runner.set-remote' },
{ label: 'DCS Lua: Set Run Code in Mission Environment', command: 'dcs-lua-runner.set-missionEnv' },
{ label: 'DCS Lua: Set Run Code in GUI Environment', command: 'dcs-lua-runner.set-guiEnv' },
{ label: 'DCS Lua: Open Settings', command: 'dcs-lua-runner.open-settings' }
{ label: 'DCS Lua: Open Settings', command: 'dcs-lua-runner.open-settings' },
{ label: 'DCS Lua: Show Setup Guide', command: 'dcs-lua-runner.show-setup-guide'}
];
vscode.window.showQuickPick(items).then(selection => {
// the user picked an item from the list

View File

@@ -5,10 +5,10 @@ FIDDLE = {}
-- Configs:
FIDDLE.PORT = 12080 -- keep this at 12080 if you also want to use the DCS Fiddle website.
-- FIDDLE.BIND_IP = '0.0.0.0' -- for remote access
FIDDLE.AUTH = true -- set to true to enable basic auth, recommended for public servers.
FIDDLE.USERNAME = 'username'
FIDDLE.PASSWORD = 'password'
FIDDLE.BIND_IP = '0.0.0.0' -- for remote access
FIDDLE.BYPASS_LOCAL = true -- allow requests to 127.0.0.1:12080 without auth, so DCS Fiddle website can still work. (Not a very secure implementation. Use at your own risk if your 12080 port is public)
--[[
Custom JSON Serialization Module that handles DCS' usage of integers as table keys such as {[1]=1, ["name"]="Enfield11", [2]=1, [3]=1} which is not valid json