change to version 1.1.1

add new function
ExportScript.Tools.KeyInTable(Table, Key)
ExportScript.Tools.ValueInTable(Table, Value)
This commit is contained in:
McMicha 2018-09-22 13:24:47 +02:00
parent a0db32902b
commit 6480fbac91

View File

@ -6,7 +6,7 @@
-- Contact dcs2arcaze.micha@farbpigmente.org
ExportScript.Tools = {}
ExportScript.Version.Tools = "1.1.0"
ExportScript.Version.Tools = "1.1.1"
function ExportScript.Tools.WriteToLog(message)
if ExportScript.logFile then
@ -118,9 +118,9 @@ function ExportScript.Tools.ProcessInput()
lDevice = GetDevice(lCommandArgs[1])
if ExportScript.FoundDCSModule and type(lDevice) == "table" then
lDevice:performClickableAction(lCommandArgs[2],lCommandArgs[3])
if ExportScript.Config.Debug then
--if ExportScript.Config.Debug then
ExportScript.Tools.WriteToLog("performClickableAction for Device: "..lCommandArgs[1]..", ButtonID: "..lCommandArgs[2]..", Value: "..lCommandArgs[3])
end
--end
end
elseif lDeviceID == 1000 then
-- ExportScript.genericRadio(key, value)
@ -946,6 +946,24 @@ function ExportScript.Tools.DisplayFormat(String, maxChars, LEFTorRight, DAC)
return lString
end
function ExportScript.Tools.KeyInTable(Table, Key)
for key, value in pairs(Table) do
if key == Key then
return true
end
end
return false
end
function ExportScript.Tools.ValueInTable(Table, Value)
for key, value in pairs(Table) do
if value == Value then
return true
end
end
return false
end
-- Pointed to by ExportScript.ProcessIkarusDCSHighImportance, if the player aircraft is something else
function ExportScript.ProcessIkarusDCSHighImportanceNoConfig(mainPanelDevice)
end