mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Added datalink setup
This commit is contained in:
parent
a55012e383
commit
33f8986317
@ -18,6 +18,7 @@ DCSEx.unitGroupMaker = {}
|
|||||||
do
|
do
|
||||||
local nextGroupID = 1 -- ID of the next generated group
|
local nextGroupID = 1 -- ID of the next generated group
|
||||||
local nextUnitID = 1 -- ID of the next generated unit
|
local nextUnitID = 1 -- ID of the next generated unit
|
||||||
|
local dataLinkID = 201 -- Next datalink ID
|
||||||
|
|
||||||
local function createGroupTable(groupID, groupCategory, options)
|
local function createGroupTable(groupID, groupCategory, options)
|
||||||
local groupTable = {
|
local groupTable = {
|
||||||
@ -442,9 +443,19 @@ do
|
|||||||
unitTable.name = unitTable.callsign.name
|
unitTable.name = unitTable.callsign.name
|
||||||
|
|
||||||
-- Special properties for unit
|
-- Special properties for unit
|
||||||
|
unitTable.AddPropAircraft = {}
|
||||||
if aircraftDB.properties then
|
if aircraftDB.properties then
|
||||||
unitTable.AddPropAircraft = DCSEx.table.deepCopy(aircraftDB.properties)
|
unitTable.AddPropAircraft = DCSEx.table.deepCopy(aircraftDB.properties)
|
||||||
end
|
end
|
||||||
|
-- Setup datalink
|
||||||
|
local datalinkString = tostring(dataLinkID)
|
||||||
|
if #datalinkString == 3 then
|
||||||
|
datalinkString = "00"..datalinkString
|
||||||
|
elseif #datalinkString == 4 then
|
||||||
|
datalinkString = "0"..datalinkString
|
||||||
|
end
|
||||||
|
unitTable.AddPropAircraft["STN_L16"] = datalinkString
|
||||||
|
dataLinkID = dataLinkID + 1
|
||||||
|
|
||||||
-- Common payload (fuel, gun ammo, etc)
|
-- Common payload (fuel, gun ammo, etc)
|
||||||
if aircraftDB.payload then
|
if aircraftDB.payload then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user