From 91a353d1f1f2e065459757676fa7bfeb00974dd5 Mon Sep 17 00:00:00 2001 From: Jerker Dahlblom Date: Mon, 1 Jan 2024 12:15:46 +0200 Subject: [PATCH] CockpitDevice:performClickableAction corrected (#56) argument_id renamed to new_value or value --- .gitignore | 1 + src/client/DCSInsight/DCSInsight.csproj | 2 +- src/server/Scripts/DCS-INSIGHT/lib/DCS_API_defines.lua | 8 ++++++-- .../lib/commands/PerformClickableActionAPI.lua | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c666cd2..65f329d 100644 --- a/.gitignore +++ b/.gitignore @@ -399,3 +399,4 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml +*.bak diff --git a/src/client/DCSInsight/DCSInsight.csproj b/src/client/DCSInsight/DCSInsight.csproj index dec4952..6f11a53 100644 --- a/src/client/DCSInsight/DCSInsight.csproj +++ b/src/client/DCSInsight/DCSInsight.csproj @@ -6,7 +6,7 @@ true dcs-insight 1.0.0 - 1.8.3 + 1.8.4 Images\Magnifier_icon.ico diff --git a/src/server/Scripts/DCS-INSIGHT/lib/DCS_API_defines.lua b/src/server/Scripts/DCS-INSIGHT/lib/DCS_API_defines.lua index b87682c..8acb9a1 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/DCS_API_defines.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/DCS_API_defines.lua @@ -41,8 +41,8 @@ function CockpitDevice:get_argument_value(argument_id) end --- Makes the device perform an action --- @param command_id integer ---- @param argument number -function CockpitDevice:performClickableAction(command_id, argument) end +--- @param value number +function CockpitDevice:performClickableAction(command_id, value) end --- Gets a device based on the device ID as specified in devices.lua --- @param device_id integer @@ -336,6 +336,10 @@ EngineSide = {} --- @field HydraulicPressure EngineSide --- @diagnostic disable-next-line: duplicate-doc-field --- @field FuelConsumption EngineSide +--- @diagnostic disable-next-line: duplicate-doc-field +--- @field fuel_internal number +--- @diagnostic disable-next-line: duplicate-doc-field +--- @field fuel_external number EngineInformation = {} --- Returns engine information diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua index 4adca5b..62bb14c 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua @@ -14,11 +14,11 @@ local PerformClickableActionAPI = APIBase:new() --- @param apiId integer API ID, must be unique --- @return APIBase function PerformClickableActionAPI:new(o, apiId) - o = o or APIBase:new(o, apiId, false, "GetDevice(device_id):performClickableAction(command_id, argument_id)", 3) + o = o or APIBase:new(o, apiId, false, "GetDevice(device_id):performClickableAction(command_id, new_value)", 3) o:add_param_def(0, ParamName.device_id, ParamType.number) o:add_param_def(1, ParamName.command_id, ParamType.number) - o:add_param_def(2, ParamName.argument_id, ParamType.number) + o:add_param_def(2, ParamName.new_value, ParamType.number) setmetatable(o, self) self.__index = self