Last step of bid folder restructure

This commit is contained in:
kaltokri
2024-01-01 23:44:44 +01:00
parent f31942aef3
commit f15138294b
330 changed files with 7000 additions and 7051 deletions

View File

@@ -0,0 +1,34 @@
---
-- Name: TAD-CGO-000 - CSAR Test
-- Author: FlightControl
-- Date Created: 31 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo CSAR operations.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.RED )
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Rescue" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups )
TaskDispatcher:StartCSARTasks(
"CSAR",
{ ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) },
"One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" ..
"Use the radio menu to let the command center assist you with the CSAR tasking."
)
function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone )
MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll()
end

View File

@@ -0,0 +1,50 @@
---
-- Name: TAD-CGO-001 - Transport Test
-- Author: FlightControl
-- Date Created: 31 Mar 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations.
local HQ = GROUP:FindByName( "HQ", "Bravo" )
local CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
local Mission = MISSION
:New( CommandCenter, "Infantry Transportation", "Tactical",
"Board the engineers into your MIL-8MTV.", coalition.side.RED )
-- Within the mission file, there is a helicopter defined with a player slot (client).
-- It has the name "Transport Helicopter".
-- The SET_GROUP filter will search for all groups that start with the name "Transport" and will add them to the set.
-- The TransportGroups object of type SET_GROUP will be added to the TaskDispatcher as a parameter, to indicate the groups that will transport the cargo.
local TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart()
-- This is the task dispatcher main object!
-- It takes a role in the Mission, for the pilots seated in TransportGroups.
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
-- This zone indicates the location where the engineers can be transported towards.
-- After boarding the engineers, the pilot can ask the HQ to provide routing assistance towards this zone.
TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Stadium" ) )
-- Here we define the "cargo set", which is a collection of cargo objects.
-- The cargo set will be the input for the cargo transportation task.
-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted.
local EngineersSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart()
-- CARGO_GROUP can be used to setup cargo with a GROUP object underneath.
-- We name this group "Engineers", and is of type "SAM Engineers".
-- The cargoset "EngineersSet" will embed all defined cargo of type Engineers (prefix) into its set.
local EngineerGroup1 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#001" ), "Engineers", "SAM Engineers 1", 500 )
local EngineerGroup2 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#002" ), "Engineers", "SAM Engineers 2", 500 )
local EngineerGroup3 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#003" ), "Engineers", "SAM Engineers 3", 500 )
--
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport", EngineersSet, "Transport the SAM Engineers and its equipment to the Stadium." )

View File

@@ -0,0 +1,40 @@
---
-- Name: TAD-CGO-002 - Transport Test - Crate
-- Author: FlightControl
-- Date Created: 04 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Hangar" ) )
-- Here we define the "cargo set", which is a collection of cargo objects.
-- The cargo set will be the input for the cargo transportation task.
-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted.
local CargoSet = SET_CARGO:New():FilterTypes( "Crates" ):FilterStart()
-- Now we add cargo into the battle scene.
local CrateStatic = STATIC:FindByName( "Crate" )
-- CARGO_CRATE can be used to setup cargo as a crate or any other static cargo object.
-- We name this group "Important things", and is of type "Crates".
-- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set.
local CrateCargo = CARGO_CRATE:New( CrateStatic, "Crates", "Important things", 1000, 25 )
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Crates", CargoSet, "Transport the Crates near the Hangar." )

View File

@@ -0,0 +1,49 @@
---
-- Name: TAD-CGO-003 - Transport Test - Infantry and Crate
-- Author: FlightControl
-- Date Created: 05 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate and infantry.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Hangar" ) )
-- Now we add cargo into the battle scene.
local CrateStatic = STATIC:FindByName( "Crate" )
-- CARGO_CRATE can be used to setup cargo as a crate or any other static cargo object.
-- We name this group "Important things", and is of type "Crates".
-- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set.
local CrateCargo = CARGO_CRATE:New( CrateStatic, "Football", "Important things", 1000, 25 )
-- Here we define the "cargo set", which is a collection of cargo objects.
-- The cargo set will be the input for the cargo transportation task.
-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted.
local FootballSet = SET_CARGO:New():FilterTypes( "Football" ):FilterStart()
-- Now we add cargo into the battle scene.
local FootballGroup = GROUP:FindByName( "Anderlecht#001" )
-- CARGO_GROUP can be used to setup cargo with a GROUP object underneath.
-- We name this group "FC Anderlecht", and is of type "Football Players".
-- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set.
local FootballPlayerGroup = CARGO_GROUP:New( FootballGroup, "Football", "FC Anderlecht", 500 )
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", FootballSet, "Transport FC Anderlecht and the equipment near the Hangar." )

View File

@@ -0,0 +1,50 @@
---
-- Name: TAD-CGO-004 - Transport Test - Infantry and Slingload
-- Author: FlightControl
-- Date Created: 05 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate and infantry.
-- Slingload the concrete and board the infantry.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) )
-- Now we add cargo into the battle scene.
local CrateStatic = STATIC:FindByName( "Tetrapod" )
-- CARGO_SLINGLOAD can be used to setup cargo as a crate or any other static cargo object.
-- We name this group "Important Concrete", and is of type "Workmaterials".
-- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set.
local CrateCargo = CARGO_SLINGLOAD:New( CrateStatic, "Workmaterials", "Concrete", 1000, 25 )
-- Here we define the "cargo set", which is a collection of cargo objects.
-- The cargo set will be the input for the cargo transportation task.
-- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted.
local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart()
-- Now we add cargo into the battle scene.
local WorkerGroup = GROUP:FindByName( "Workers" )
-- CARGO_GROUP can be used to setup cargo with a GROUP object underneath.
-- We name this group "Workers", and is of type "Workmaterials".
-- The cargoset "CargoSet" will embed all defined cargo of type Workmaterials (prefix) into its set.
local WorkerCargoGroup = CARGO_GROUP:New( WorkerGroup, "Workmaterials", "Workers", 500 )
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers and the equipment near the Workplace." )

View File

@@ -0,0 +1,51 @@
---
-- Name: TAD-CGO-005 - Transport Test - Various Cargo
-- Author: FlightControl
-- Date Created: 05 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.BLUE )
TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) )
local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart()
local WorkerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Workers" ), "Workmaterials", "Workers", 250 )
WorkerCargoGroup:ReportSmoke( SMOKECOLOR.Green )
local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 100 )
EngineerCargoGroup:ReportSmoke( SMOKECOLOR.Red )
local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 100, 25 )
ConcreteCargo:ReportSmoke( SMOKECOLOR.White )
local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 50, 25 )
CrateCargo:ReportSmoke( SMOKECOLOR.Orange )
local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 25 )
EnginesCargo:ReportFlare( FLARECOLOR.Red )
local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Workmaterials", "Fuel", 200, 25 )
FuelCargo:ReportFlare( FLARECOLOR.Green )
local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 500, 25 )
MetalCargo:ReportFlare( FLARECOLOR.Yellow )
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers, engineers and the equipment near the Workplace." )

View File

@@ -0,0 +1,38 @@
---
-- Name: TAD-CGO-006 - Transport Test - Multiple Clients
-- Author: FlightControl
-- Date Created: 05 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) )
local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart()
local WorkerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Workers" ), "Workmaterials", "Workers", 250 )
local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 100 )
local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 100, 50 )
local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 )
local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 )
local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Workmaterials", "Fuel", 150, 50 )
local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 )
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers, engineers and the equipment near the Workplace." )

View File

@@ -0,0 +1,53 @@
---
-- Name: TAD-CGO-007 - Transport Test - Cargo Fun
-- Author: FlightControl
-- Date Created: 05 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart()
local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 )
local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 )
local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 )
local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 )
local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 )
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport workmaterials", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." )
TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) )
local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart()
local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 )
local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 )
local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 )
local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." )
TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) )
local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart()
local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 )
local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 )
local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 )
local GoodCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 )
local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 )
local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." )
TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) )

View File

@@ -0,0 +1,66 @@
---
-- Name: TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling
-- Author: FlightControl
-- Date Created: 05 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types.
--
-- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ...
-- When cargo is deployed at the Factory, a SAM site is activated ...
-- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ...
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart()
local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 )
local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 )
local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 )
local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 )
local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 )
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." )
TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) )
local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart()
local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 )
local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 )
local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 )
local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." )
TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) )
local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart()
local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 )
local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 )
local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 )
local FoodCargo = CARGO_CRATE:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 )
local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 )
local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." )
TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) )
-- Here we tailor the CargoDeployed event of the TaskDispatcher.
function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone )
MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll()
end

View File

@@ -0,0 +1,82 @@
---
-- Name: TAD-CGO-009 - Transport Test - Respawning Cargo
-- Author: FlightControl
-- Date Created: 05 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types.
--
-- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ...
-- When cargo is deployed at the Factory, a SAM site is activated ...
-- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ...
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart()
local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 ):RespawnOnDestroyed( true )
local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 ):RespawnOnDestroyed( true )
local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ):RespawnOnDestroyed( true )
local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ):RespawnOnDestroyed( true )
local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ):RespawnOnDestroyed(true)
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." )
TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) )
Helos = { SPAWN:New( "Helicopters 1" ), SPAWN:New( "Helicopters 2" ), SPAWN:New( "Helicopters 3" ), SPAWN:New( "Helicopters 4" ), SPAWN:New( "Helicopters 5" ) }
EnemyHelos = { SPAWN:New( "Enemy Helicopters 1" ), SPAWN:New( "Enemy Helicopters 2" ), SPAWN:New( "Enemy Helicopters 3" ) }
function WorkplaceTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone )
Helos[ math.random(1,#Helos) ]:Spawn()
EnemyHelos[ math.random(1,#EnemyHelos) ]:Spawn()
end
local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart()
local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 ):RespawnOnDestroyed( true )
local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 ):RespawnOnDestroyed( true )
local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 ):RespawnOnDestroyed( true )
local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." )
TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) )
SAMSites = { SPAWN:New( "SAM Site 1" ), SPAWN:New( "SAM Site 2" ), SPAWN:New( "SAM Site 3" ), SPAWN:New( "SAM Site 4" ), SPAWN:New( "SAM Site 5" ) }
AirAttack = { SPAWN:New( "Russia Air Attack 1" ), SPAWN:New( "Russia Air Attack 2" ), SPAWN:New( "Russia Air Attack 3" ), SPAWN:New( "Russia Air Attack 4" ) }
function FactoryTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone )
SAMSites[ math.random(1,#SAMSites) ]:Spawn()
AirAttack[ math.random(1,#AirAttack) ]:Spawn()
end
local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart()
local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 ):RespawnOnDestroyed( true )
local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 ):RespawnOnDestroyed( true )
local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 ):RespawnOnDestroyed( true )
local FoodCargo = CARGO_CRATE:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 )
local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 )
local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." )
TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) )
Hungry = { SPAWN:New( "Hungry 1" ), SPAWN:New( "Hungry 2" ), SPAWN:New( "Hungry 3" ), SPAWN:New( "Hungry 4" ), SPAWN:New( "Hungry 5" ) }
function FoodTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone )
Hungry[ math.random(1,#Hungry) ]:Spawn()
end

View File

@@ -0,0 +1,84 @@
---
-- Name: TAD-CGO-010 - Transport Test - Register Cargos
-- Author: FlightControl
-- Date Created: 15 Apr 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types.
--
-- The cargo is defined within the mission editor.
-- Each cargo is identified with a ~CARGO tag in the group name.
--
-- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ...
-- When cargo is deployed at the Factory, a SAM site is activated ...
-- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ...
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
-- This is the most important now. You setup a new SET_CARGO filtering the relevant type.
-- The actual cargo objects are now created by MOOSE in the background.
-- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name.
-- This allows a truly dynamic setup.
local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart()
local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." )
TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) )
Helos = { SPAWN:New( "Helicopters 1" ), SPAWN:New( "Helicopters 2" ), SPAWN:New( "Helicopters 3" ), SPAWN:New( "Helicopters 4" ), SPAWN:New( "Helicopters 5" ) }
EnemyHelos = { SPAWN:New( "Enemy Helicopters 1" ), SPAWN:New( "Enemy Helicopters 2" ), SPAWN:New( "Enemy Helicopters 3" ) }
function WorkplaceTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone )
Helos[ math.random(1,#Helos) ]:Spawn()
EnemyHelos[ math.random(1,#EnemyHelos) ]:Spawn()
end
-- This is the most important now. You setup a new SET_CARGO filtering the relevant type.
-- The actual cargo objects are now created by MOOSE in the background.
-- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name.
-- This allows a truly dynamic setup.
local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart()
local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." )
TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) )
SAMSites = { SPAWN:New( "SAM Site 1" ), SPAWN:New( "SAM Site 2" ), SPAWN:New( "SAM Site 3" ), SPAWN:New( "SAM Site 4" ), SPAWN:New( "SAM Site 5" ) }
AirAttack = { SPAWN:New( "Russia Air Attack 1" ), SPAWN:New( "Russia Air Attack 2" ), SPAWN:New( "Russia Air Attack 3" ), SPAWN:New( "Russia Air Attack 4" ) }
function FactoryTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone )
SAMSites[ math.random(1,#SAMSites) ]:Spawn()
AirAttack[ math.random(1,#AirAttack) ]:Spawn()
end
-- This is the most important now. You setup a new SET_CARGO filtering the relevant type.
-- The actual cargo objects are now created by MOOSE in the background.
-- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name.
-- This allows a truly dynamic setup.
local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart()
local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." )
TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) )
Hungry = { SPAWN:New( "Hungry 1" ), SPAWN:New( "Hungry 2" ), SPAWN:New( "Hungry 3" ), SPAWN:New( "Hungry 4" ), SPAWN:New( "Hungry 5" ) }
function FoodTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone )
Hungry[ math.random(1,#Hungry) ]:Spawn()
end

View File

@@ -0,0 +1,36 @@
---
-- Name: TAD-CGO-011 - CSAR - Zone
-- Author: FlightControl
-- Date Created: 01 Oct 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo CSAR operations.
-- It will only spawn pilots for rescue when the pilots eject in the zones indicated.
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.RED )
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Rescue" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups )
TaskDispatcher:SetCSARZones( SET_ZONE:New():FilterPrefixes("CSAR"):FilterOnce() )
TaskDispatcher:StartCSARTasks(
"CSAR",
{ ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) },
"One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" ..
"Use the radio menu to let the command center assist you with the CSAR tasking."
)
function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone )
MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll()
end

View File

@@ -0,0 +1,36 @@
---
-- Name: TAD-CGO-011 - CSAR - Zone tests
-- Author: FlightControl
-- Date Created: 01 Oct 2018
--
-- # Situation:
--
-- This mission demonstrates the dynamic task dispatching for cargo CSAR operations.
-- It will only spawn pilots for rescue when the pilots eject in the zones indicated.
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.RED )
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Rescue" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups )
TaskDispatcher:SetMaxCSAR( 5 )
TaskDispatcher:StartCSARTasks(
"CSAR",
{ ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) },
"One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" ..
"Use the radio menu to let the command center assist you with the CSAR tasking."
)
function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone )
MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll()
end

View File

@@ -0,0 +1,34 @@
---
-- Name: TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling
-- Author: FlightControl
-- Date Created: 12 Oct 2018
--
-- Test to pickup cargo from the roof of a building.
--
HQ = GROUP:FindByName( "HQ", "Bravo" )
CommandCenter = COMMANDCENTER
:New( HQ, "Lima" )
Mission = MISSION
:New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED )
TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart()
CargoWorkers = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart()
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups )
local WorkersTask = TaskDispatcher:AddTransportTask( "Transport Workers", CargoWorkers, "Transport the workers to the other building." )
TaskDispatcher:SetTransportDeployZone( WorkersTask, ZONE:New( "Workplace" ) )
-- Here we tailor the CargoDeployed event of the TaskDispatcher.
function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone )
MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll()
end