Skip to content

Commit

Permalink
CockpitDevice:performClickableAction corrected (#56)
Browse files Browse the repository at this point in the history
argument_id renamed to new_value or value
  • Loading branch information
jdahlblom authored Jan 1, 2024
1 parent ad87a2e commit 91a353d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,4 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
*.bak
2 changes: 1 addition & 1 deletion src/client/DCSInsight/DCSInsight.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWPF>true</UseWPF>
<AssemblyName>dcs-insight</AssemblyName>
<Version>1.0.0</Version>
<AssemblyVersion>1.8.3</AssemblyVersion>
<AssemblyVersion>1.8.4</AssemblyVersion>
<ApplicationIcon>Images\Magnifier_icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions src/server/Scripts/DCS-INSIGHT/lib/DCS_API_defines.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91a353d

Please sign in to comment.