3 Commits

Author SHA1 Message Date
Pax1601
0459d5c625 v0.4.13-alpha-rc5 2023-12-08 15:38:56 +01:00
Pax1601
43d28ebe19 Removed notify and added warning follow roads 2023-12-08 14:27:16 +01:00
Pax1601
187b9be57a Added ability to add mods 2023-12-08 11:54:12 +01:00
20 changed files with 49 additions and 17 deletions

View File

@@ -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...")

View File

@@ -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",

View File

@@ -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",

View File

@@ -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 {

View File

@@ -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 */

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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."),

View File

@@ -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

View File

@@ -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
View 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"
}

View File

@@ -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"

View File

@@ -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);

View File

@@ -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");
}

View File

@@ -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"

View File

@@ -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[] =

View File

@@ -1,3 +1,3 @@
{
"version": "v0.4.12-alpha-rc4"
"version": "v0.4.13-alpha-rc5"
}