mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into FF/MasterDevel
This commit is contained in:
@@ -14365,32 +14365,55 @@ function AIRBOSS:_GetOnboardNumbers( group, playeronly )
|
||||
-- Debug text.
|
||||
local text = string.format( "Onboard numbers of group %s:", groupname )
|
||||
|
||||
-- Units of template group.
|
||||
local units = group:GetTemplate().units
|
||||
local template=group:GetTemplate()
|
||||
|
||||
-- Get numbers.
|
||||
local numbers = {}
|
||||
for _, unit in pairs( units ) do
|
||||
if template then
|
||||
|
||||
-- Onboard number and unit name.
|
||||
local n = tostring( unit.onboard_num )
|
||||
local name = unit.name
|
||||
local skill = unit.skill or "Unknown"
|
||||
-- Units of template group.
|
||||
local units = template.units
|
||||
|
||||
-- Debug text.
|
||||
text = text .. string.format( "\n- unit %s: onboard #=%s skill=%s", name, n, tostring( skill ) )
|
||||
-- Get numbers.
|
||||
for _, unit in pairs( units ) do
|
||||
|
||||
if playeronly and skill == "Client" or skill == "Player" then
|
||||
-- There can be only one player in the group, so we skip everything else.
|
||||
return n
|
||||
-- Onboard number and unit name.
|
||||
local n = tostring( unit.onboard_num )
|
||||
local name = unit.name
|
||||
local skill = unit.skill or "Unknown"
|
||||
|
||||
-- Debug text.
|
||||
text = text .. string.format( "\n- unit %s: onboard #=%s skill=%s", name, n, tostring( skill ) )
|
||||
|
||||
if playeronly and skill == "Client" or skill == "Player" then
|
||||
-- There can be only one player in the group, so we skip everything else.
|
||||
return n
|
||||
end
|
||||
|
||||
-- Table entry.
|
||||
numbers[name] = n
|
||||
end
|
||||
|
||||
-- Table entry.
|
||||
numbers[name] = n
|
||||
end
|
||||
-- Debug info.
|
||||
self:T2( self.lid .. text )
|
||||
|
||||
-- Debug info.
|
||||
self:T2( self.lid .. text )
|
||||
else
|
||||
|
||||
if playeronly then
|
||||
return 101
|
||||
else
|
||||
|
||||
local units=group:GetUnits()
|
||||
|
||||
for i,_unit in pairs(units) do
|
||||
local name=_unit:GetName()
|
||||
|
||||
numbers[name]=100+i
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return numbers
|
||||
end
|
||||
|
||||
@@ -292,7 +292,7 @@ CSAR.AircraftType["AH-64D_BLK_II"] = 2
|
||||
CSAR.AircraftType["Bronco-OV-10A"] = 2
|
||||
CSAR.AircraftType["MH-60R"] = 10
|
||||
CSAR.AircraftType["OH-6A"] = 2
|
||||
CSAR.AircraftType["OH-58D"] = 2
|
||||
CSAR.AircraftType["OH58D"] = 2
|
||||
|
||||
--- CSAR class version.
|
||||
-- @field #string version
|
||||
|
||||
@@ -1250,7 +1250,7 @@ CTLD.UnitTypeCapabilities = {
|
||||
["AH-64D_BLK_II"] = {type="AH-64D_BLK_II", crates=false, troops=true, cratelimit = 0, trooplimit = 2, length = 17, cargoweightlimit = 200}, -- 2 ppl **outside** the helo
|
||||
["Bronco-OV-10A"] = {type="Bronco-OV-10A", crates= false, troops=true, cratelimit = 0, trooplimit = 5, length = 13, cargoweightlimit = 1450},
|
||||
["OH-6A"] = {type="OH-6A", crates=false, troops=true, cratelimit = 0, trooplimit = 4, length = 7, cargoweightlimit = 550},
|
||||
["OH-58D"] = {type="OH-58D", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 14, cargoweightlimit = 400},
|
||||
["OH58D"] = {type="OH58D", crates=false, troops=false, cratelimit = 0, trooplimit = 0, length = 14, cargoweightlimit = 400},
|
||||
}
|
||||
|
||||
--- CTLD class version.
|
||||
|
||||
Reference in New Issue
Block a user