Merge branch 'develop' into FF/Ops

This commit is contained in:
Frank
2021-10-12 22:20:20 +02:00
13 changed files with 1131 additions and 107 deletions

View File

@@ -1611,7 +1611,7 @@ function UTILS.GetOSTime()
end
--- Shuffle a table accoring to Fisher Yeates algorithm
--@param #table table to be shuffled
--@param #table t Table to be shuffled
--@return #table
function UTILS.ShuffleTable(t)
if t == nil or type(t) ~= "table" then
@@ -1640,7 +1640,7 @@ function UTILS.IsLoadingDoorOpen( unit_name )
if unit ~= nil then
local type_name = unit:getTypeName()
if type_name == "Mi-8MT" and unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1 or unit:getDrawArgumentValue(250) == 1 then
if type_name == "Mi-8MT" and unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1 or unit:getDrawArgumentValue(250) < 0 then
BASE:T(unit_name .. " Cargo doors are open or cargo door not present")
ret_val = true
end
@@ -1660,6 +1660,21 @@ function UTILS.IsLoadingDoorOpen( unit_name )
ret_val = true
end
if string.find(type_name, "Hercules") and unit:getDrawArgumentValue(1215) == 1 and unit:getDrawArgumentValue(1216) == 1 then
BASE:T(unit_name .. " rear doors are open")
ret_val = true
end
if string.find(type_name, "Hercules") and (unit:getDrawArgumentValue(1220) == 1 or unit:getDrawArgumentValue(1221) == 1) then
BASE:T(unit_name .. " para doors are open")
ret_val = true
end
if string.find(type_name, "Hercules") and unit:getDrawArgumentValue(1217) == 1 then
BASE:T(unit_name .. " side door is open")
ret_val = true
end
if ret_val == false then
BASE:T(unit_name .. " all doors are closed")
end