mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Compare commits
3 Commits
v0.4.12-al
...
v0.4.13-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0459d5c625 | ||
|
|
43d28ebe19 | ||
|
|
187b9be57a |
@@ -112,5 +112,5 @@ function onListening() {
|
||||
debug('Listening on ' + bind);
|
||||
}
|
||||
|
||||
console.log("DCS Olympus server v0.4.12-alpha-rc4 started correctly!")
|
||||
console.log("DCS Olympus server v0.4.13-alpha-rc5 started correctly!")
|
||||
console.log("Waiting for connections...")
|
||||
|
||||
4
client/package-lock.json
generated
4
client/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "DCSOlympus",
|
||||
"version": "v0.4.12-alpha-rc4",
|
||||
"version": "v0.4.13-alpha-rc5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "DCSOlympus",
|
||||
"version": "v0.4.12-alpha-rc4",
|
||||
"version": "v0.4.13-alpha-rc5",
|
||||
"dependencies": {
|
||||
"@turf/turf": "^6.5.0",
|
||||
"body-parser": "^1.20.2",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "DCSOlympus",
|
||||
"node-main": "./bin/www",
|
||||
"main": "http://localhost:3000",
|
||||
"version": "v0.4.12-alpha-rc4",
|
||||
"version": "v0.4.13-alpha-rc5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "browserify .\\src\\index.ts --debug -o .\\public\\javascripts\\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ] && copy.bat",
|
||||
|
||||
@@ -29,7 +29,7 @@ import { UnitListPanel } from "./panels/unitlistpanel";
|
||||
import { ContextManager } from "./context/contextmanager";
|
||||
import { Context } from "./context/context";
|
||||
|
||||
var VERSION = "v0.4.12-alpha-rc4";
|
||||
var VERSION = "v0.4.13-alpha-rc5";
|
||||
var DEBUG = false;
|
||||
|
||||
export class OlympusApp {
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ROEDescriptions, ROEs, altitudeIncrements, emissionsCountermeasures, em
|
||||
import { ftToM, knotsToMs, mToFt, msToKnots } from "../other/utils";
|
||||
import { GeneralSettings, Radio, TACAN } from "../interfaces";
|
||||
import { ContextActionSet } from "../unit/contextactionset";
|
||||
import { Popup } from "../popups/popup";
|
||||
|
||||
export class UnitControlPanel extends Panel {
|
||||
#altitudeSlider: Slider;
|
||||
@@ -97,6 +98,8 @@ export class UnitControlPanel extends Panel {
|
||||
/* Follow roads switch */
|
||||
this.#followRoadsSwitch = new Switch("follow-roads-switch", (value: boolean) => {
|
||||
getApp().getUnitsManager().setFollowRoads(value);
|
||||
if (value)
|
||||
(getApp().getPopupsManager().get("infoPopup") as Popup).setText("Warning: follow roads movements can cause lag");
|
||||
});
|
||||
|
||||
/* Operate as */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div id="app-summary">
|
||||
<h2>DCS Olympus</h2>
|
||||
<h4>Dynamic Unit Command</h4>
|
||||
<div class="app-version">Version <span class="app-version-number">v0.4.12-alpha-rc4</span></div>
|
||||
<div class="app-version">Version <span class="app-version-number">v0.4.13-alpha-rc5</span></div>
|
||||
<div class="app-version">Latest version <span id="latest-version" class="app-version-number"></span></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</div>
|
||||
|
||||
<div id="follow-roads" class="switch-control yes-no">
|
||||
<h4>Follow roads <img src="/resources/theme/images/icons/circle-question-regular.svg" title=""></h4>
|
||||
<h4>Follow roads <img src="/resources/theme/images/icons/circle-question-regular.svg" title="WARNING: follow roads movements can cause lag"></h4>
|
||||
<div id="follow-roads-switch" class="ol-switch"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="ol-select-options">
|
||||
<div id="toolbar-summary">
|
||||
<h3>DCS Olympus</h3>
|
||||
<div class="accent-green app-version-number">version v0.4.12-alpha-rc4</div>
|
||||
<div class="accent-green app-version-number">version v0.4.13-alpha-rc5</div>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://discord.gg/wWXyVVBZT7" target="_blank">Discord</a>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define nwjsFolder "..\..\nwjs\"
|
||||
#define nodejsFolder "..\..\node\"
|
||||
#define version "v0.4.12-alpha-rc4"
|
||||
#define version "v0.4.13-alpha-rc5"
|
||||
|
||||
[Setup]
|
||||
AppName=DCS Olympus
|
||||
@@ -47,6 +47,7 @@ Source: "..\img\configurator_logo.png"; DestDir: "{app}\Mods\Services\Olympus\im
|
||||
Source: "{#nwjsFolder}\*.*"; DestDir: "{app}\Mods\Services\Olympus\client"; Flags: ignoreversion recursesubdirs; Check: CheckLocalInstall
|
||||
Source: "{#nodejsFolder}\*.*"; DestDir: "{app}\Mods\Services\Olympus\client"; Flags: ignoreversion recursesubdirs; Check: CheckServerInstall
|
||||
Source: "..\scripts\python\configurator\dist\configurator.exe"; DestDir: "{app}\Mods\Services\Olympus"; Flags: ignoreversion;
|
||||
Source: "..\LEGAL"; DestDir: "{app}\Mods\Services\Olympus"; Flags: ignoreversion;
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\Mods\Services\Olympus\configurator.exe"; Parameters: -a {code:GetAddress} -c {code:GetClientPort} -b {code:GetBackendPort} -p {code:GetPassword} -bp {code:GetBluePassword} -rp {code:GetRedPassword}; Check: CheckCallConfigurator
|
||||
|
||||
@@ -15,7 +15,7 @@ declare_plugin(self_ID,
|
||||
shortName = "Olympus",
|
||||
fileMenuName = "Olympus",
|
||||
|
||||
version = "v0.4.12-alpha-rc4",
|
||||
version = "v0.4.13-alpha-rc5",
|
||||
state = "installed",
|
||||
developerName= "DCS Refugees 767 squadron",
|
||||
info = _("DCS Olympus is a mod for DCS World. It allows users to spawn, control, task, group, and remove units from a DCS World server using a real-time map interface, similarly to Real Time Strategy games. The user interface also provides useful informations units, like loadouts, fuel, tasking, and so on. In the future, more features for DCS World GCI and JTAC will be available."),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local version = "v0.4.12-alpha-rc4"
|
||||
local version = "v0.4.13-alpha-rc5"
|
||||
|
||||
local debug = false -- True enables debug printing using DCS messages
|
||||
|
||||
@@ -40,12 +40,14 @@ local lfs = require('lfs')
|
||||
-- Print a debug message if the debug option is true
|
||||
function Olympus.debug(message, displayFor)
|
||||
if debug == true then
|
||||
Olympus.log:info(message)
|
||||
trigger.action.outText(message, displayFor)
|
||||
end
|
||||
end
|
||||
|
||||
-- Print a notify message
|
||||
function Olympus.notify(message, displayFor)
|
||||
Olympus.log:info(message)
|
||||
trigger.action.outText(message, displayFor)
|
||||
end
|
||||
|
||||
@@ -984,10 +986,16 @@ function Olympus.setUnitsData(arg, time)
|
||||
table["category"] = "GroundUnit"
|
||||
elseif unit:getDesc().category == Unit.Category.SHIP then
|
||||
table["category"] = "NavyUnit"
|
||||
elseif Olympus.modsList ~= nil and Olympus.modsList[unit:getDesc().typeName] ~= nil then
|
||||
table["category"] = Olympus.modsList[unit:getDesc().typeName]
|
||||
end
|
||||
else
|
||||
units[ID] = {isAlive = false}
|
||||
Olympus.units[ID] = nil
|
||||
if Olympus.modsList ~= nil and Olympus.modsList[unit:getDesc().typeName] ~= nil then
|
||||
table["category"] = Olympus.modsList[unit:getDesc().typeName]
|
||||
else
|
||||
units[ID] = {isAlive = false}
|
||||
Olympus.units[ID] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- If the category is handled by Olympus, get the data
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local version = 'v0.4.12-alpha-rc4'
|
||||
local version = 'v0.4.13-alpha-rc5'
|
||||
local lfs = require("lfs")
|
||||
|
||||
Olympus = {}
|
||||
|
||||
11
scripts/mods.lua
Normal file
11
scripts/mods.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Enter here any mods required by your mission as in the example below.
|
||||
-- Possible categories are:
|
||||
-- Aircraft
|
||||
-- Helicopter
|
||||
-- GroundUnit
|
||||
-- NavyUnit
|
||||
|
||||
Olympus.modsList = {
|
||||
["A-4E-C"] = "Aircraft",
|
||||
["Bronco-OV-10A"] = "Aircraft"
|
||||
}
|
||||
@@ -5,7 +5,11 @@
|
||||
function Olympus.protectedCall(...)\n\n \
|
||||
local status, retval = pcall(...)\n \
|
||||
if not status then\n \
|
||||
trigger.action.outText(\"ERROR: \" ..retval, 20)\n \
|
||||
if Olympus.log ~= nil then\n \
|
||||
Olympus.log:error(retval)\n \
|
||||
else\n \
|
||||
trigger.action.outText(\"Olympus critical error: \" ..retval, 20)\n \
|
||||
end\n \
|
||||
end\n \
|
||||
end\n \
|
||||
trigger.action.outText(\"Olympus.protectedCall registered successfully\", 10)\n"
|
||||
|
||||
@@ -59,6 +59,9 @@ extern "C" DllExport int coreInit(lua_State* L, const char* path)
|
||||
log("Initializing core.dll with instance path " + instancePath);
|
||||
|
||||
sessionHash = random_string(16);
|
||||
|
||||
log("Random session hash " + sessionHash);
|
||||
|
||||
unitsManager = new UnitsManager(L);
|
||||
weaponsManager = new WeaponsManager(L);
|
||||
server = new Server(L);
|
||||
|
||||
@@ -42,4 +42,5 @@ void registerLuaFunctions(lua_State* L)
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\OlympusCommand.lua");
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\unitPayloads.lua");
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\templates.lua");
|
||||
executeLuaScript(L, instancePath + "..\\Scripts\\mods.lua");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define VERSION "v0.4.12-alpha-rc4"
|
||||
#define VERSION "v0.4.13-alpha-rc5"
|
||||
#define LOG_NAME "Olympus_log.txt"
|
||||
#define REST_ADDRESS "http://localhost:30000"
|
||||
#define REST_URI "olympus"
|
||||
|
||||
@@ -44,6 +44,7 @@ std::string to_string(const std::wstring& wstr)
|
||||
|
||||
std::string random_string(size_t length)
|
||||
{
|
||||
srand(static_cast<unsigned int>(time(NULL)));
|
||||
auto randchar = []() -> char
|
||||
{
|
||||
const char charset[] =
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "v0.4.12-alpha-rc4"
|
||||
"version": "v0.4.13-alpha-rc5"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user