mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Created TUM.supportWingmen table
This commit is contained in:
parent
693a280555
commit
f438c73f5a
@ -29,6 +29,7 @@ do
|
||||
|
||||
local function closeMission(removeAllUnits)
|
||||
if removeAllUnits then
|
||||
TUM.wingmen.removeAll()
|
||||
TUM.airForce.removeAll()
|
||||
TUM.ambientWorld.removeAll()
|
||||
TUM.enemyAirDefense.removeAll()
|
||||
@ -73,6 +74,7 @@ do
|
||||
|
||||
TUM.supportAWACS.create() -- Create the AWACS aircraft if it wasn't airborne already
|
||||
|
||||
TUM.wingmen.create()
|
||||
TUM.enemyAirDefense.create() -- Must be called once objectives have been created
|
||||
TUM.airForce.create() -- Must be called once objectives have been created
|
||||
TUM.missionMenu.create() -- Must be called once objectives have been created
|
||||
|
||||
24
Script/The Universal Mission/SupportWingmen.lua
Normal file
24
Script/The Universal Mission/SupportWingmen.lua
Normal file
@ -0,0 +1,24 @@
|
||||
-- ====================================================================================
|
||||
-- TUM.SUPPORTWINGMEN - HANDLES THE PLAYER'S WINGMEN
|
||||
-- ====================================================================================
|
||||
-- ====================================================================================
|
||||
|
||||
TUM.supportWingmen = {}
|
||||
|
||||
do
|
||||
local wingmenGroupID = nil
|
||||
|
||||
function TUM.supportWingmen.create()
|
||||
if TUM.settings.getValue(TUM.settings.id.MULTIPLAYER) then return end -- No wingmen in multiplayer
|
||||
TUM.supportWingmen.removeAll() -- Destroy all pre-existing wingmen
|
||||
TUM.log("Creating wingmen...")
|
||||
end
|
||||
|
||||
function TUM.supportWingmen.removeAll()
|
||||
if wingmenGroupID then TUM.log("Removing all wingmen...") end
|
||||
|
||||
DCSEx.world.destroyGroupByID(wingmenGroupID)
|
||||
|
||||
wingmenGroupID = nil
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user