Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CockpitDevice:performClickableAction corrected #56

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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